]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Don't dump policies if principals are specified 862/head
authorGreg Hudson <ghudson@mit.edu>
Mon, 15 Oct 2018 22:32:31 +0000 (18:32 -0400)
committerGreg Hudson <ghudson@mit.edu>
Sat, 20 Oct 2018 02:38:19 +0000 (22:38 -0400)
If kdb5_util dump is asked to filter for specific principals, do not
dump the policy database.

ticket: 8752 (new)

src/kadmin/dbutil/dump.c

index c792afd1a6a7c1a0fca147a032b06652769cb779..86e046c429bb6ceeeff200befe3b0e298621f1d1 100644 (file)
@@ -1453,7 +1453,8 @@ dump_db(int argc, char **argv)
         goto error;
     }
 
-    if (dump->dump_policy != NULL) {
+    /* Don't dump policies if specific principal entries were requested. */
+    if (dump->dump_policy != NULL && args.nnames == 0) {
         ret = krb5_db_iter_policy(util_context, "*", dump->dump_policy, &args);
         if (ret) {
             com_err(progname, ret, _("performing %s dump"), dump->name);