From: Ken Raeburn Date: Thu, 31 Jul 2008 13:33:36 +0000 (+0000) Subject: Reuse more k5beta7 code for iprop X-Git-Tag: krb5-1.7-alpha1~553 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=915deb505f7446c4c5a43fe01e983b5e0355ad95;p=krb5.git Reuse more k5beta7 code for iprop git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20591 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c index ee45464b6..96f4eb8c6 100644 --- a/src/kadmin/dbutil/dump.c +++ b/src/kadmin/dbutil/dump.c @@ -81,8 +81,6 @@ static krb5_error_code dump_k5beta6_iterator (krb5_pointer, static krb5_error_code dump_k5beta6_iterator_ext (krb5_pointer, krb5_db_entry *, int); -static krb5_error_code dump_iprop_iterator (krb5_pointer, - krb5_db_entry *); static krb5_error_code dump_k5beta7_princ (krb5_pointer, krb5_db_entry *); static krb5_error_code dump_k5beta7_princ_ext (krb5_pointer, @@ -90,8 +88,6 @@ static krb5_error_code dump_k5beta7_princ_ext (krb5_pointer, int); static krb5_error_code dump_k5beta7_princ_withpolicy (krb5_pointer, krb5_db_entry *); -static krb5_error_code dump_iprop_princ (krb5_pointer, - krb5_db_entry *); static krb5_error_code dump_ov_princ (krb5_pointer, krb5_db_entry *); static void dump_k5beta7_policy (void *, osa_policy_ent_t); @@ -152,7 +148,7 @@ dump_version iprop_version = { "iprop", 0, 0, - dump_iprop_princ, + dump_k5beta7_princ_withpolicy, dump_k5beta7_policy, process_k5beta7_record, }; @@ -843,17 +839,6 @@ dump_k5beta6_iterator_ext(ptr, entry, kadm) return(retval); } -/* - * dump_iprop_iterator() - Output a dump record in iprop format. - */ -static krb5_error_code -dump_iprop_iterator(ptr, entry) - krb5_pointer ptr; - krb5_db_entry *entry; -{ - return dump_k5beta6_iterator_ext(ptr, entry, 1); -} - /* * dump_k5beta7_iterator() - Output a dump record in krb5b7 format. */ @@ -916,51 +901,6 @@ dump_k5beta7_princ_withpolicy(ptr, entry) return dump_k5beta7_princ_ext(ptr, entry, 1); } -/* - * dump_iprop_princ() - Output a dump record in iprop format. - * This was created in order to dump more data, such as kadm5 tl - */ -static krb5_error_code -dump_iprop_princ(ptr, entry) - krb5_pointer ptr; - krb5_db_entry *entry; -{ - krb5_error_code retval; - struct dump_args *arg; - char *name; - int tmp_nnames; - - /* Initialize */ - arg = (struct dump_args *) ptr; - name = (char *) NULL; - - /* - * Flatten the principal name. - */ - if ((retval = krb5_unparse_name(arg->kcontext, - entry->princ, - &name))) { - fprintf(stderr, _(pname_unp_err), - arg->programname, error_message(retval)); - return(retval); - } - /* - * If we don't have any match strings, or if our name matches, then - * proceed with the dump, otherwise, just forget about it. - */ - if (!arg->nnames || name_matches(name, arg)) { - fprintf(arg->ofile, "princ\t"); - - /* save the callee from matching the name again */ - tmp_nnames = arg->nnames; - arg->nnames = 0; - retval = dump_iprop_iterator(ptr, entry); - arg->nnames = tmp_nnames; - } - free(name); - return (retval); -} - void dump_k5beta7_policy(void *data, osa_policy_ent_t entry) { struct dump_args *arg;