aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2018-10-15 18:32:31 -0400
committerGreg Hudson <ghudson@mit.edu>2018-10-19 22:38:19 -0400
commit911d592a85cb5d4e793c83cf702178d14ac21e6d (patch)
treeb81f4f9b0dba84ae0e1143679502b93846546af2
parentfa000575085be71bfc326221a4d4d23fc00a1462 (diff)
downloadkrb5-911d592a85cb5d4e793c83cf702178d14ac21e6d.zip
krb5-911d592a85cb5d4e793c83cf702178d14ac21e6d.tar.gz
krb5-911d592a85cb5d4e793c83cf702178d14ac21e6d.tar.bz2
Don't dump policies if principals are specified
If kdb5_util dump is asked to filter for specific principals, do not dump the policy database. ticket: 8752 (new)
-rw-r--r--src/kadmin/dbutil/dump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c
index c792afd..86e046c 100644
--- a/src/kadmin/dbutil/dump.c
+++ b/src/kadmin/dbutil/dump.c
@@ -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);