diff --git a/admin/change.c b/admin/change.c index 0fbb313c9..a46d484c1 100644 --- a/admin/change.c +++ b/admin/change.c @@ -147,7 +147,7 @@ kt_change(struct change_options *opt, int argc, char **argv) krb5_key_salt_tuple *kstuple = NULL; const char *enctype; size_t i, j, max, nkstuple; - int keep = 0; + int keep = 1; struct change_set *changeset; int errors = 0; diff --git a/admin/get.c b/admin/get.c index e16a46731..5f1afc74d 100644 --- a/admin/get.c +++ b/admin/get.c @@ -129,7 +129,7 @@ kt_get(struct get_options *opt, int argc, char **argv) unsigned int failed = 0; i = 0; - keep = 0; + keep = 1; if (opt->keepallold_flag) { keep = 2; i++; diff --git a/kadmin/cpw.c b/kadmin/cpw.c index 041f24255..d254add44 100644 --- a/kadmin/cpw.c +++ b/kadmin/cpw.c @@ -158,7 +158,7 @@ cpw_entry(struct passwd_options *opt, int argc, char **argv) * needed to decrypt extant tickets". */ num = 0; - data.keepold = 0; + data.keepold = 1; if (opt->keepold_flag) { data.keepold = 1; num++; diff --git a/kadmin/ext.c b/kadmin/ext.c index 5e2bd79ab..01725d96e 100644 --- a/kadmin/ext.c +++ b/kadmin/ext.c @@ -160,7 +160,7 @@ ext_keytab(struct ext_keytab_options *opt, int argc, char **argv) size_t i; data.random_key_flag = opt->random_key_flag; - data.keep = 0; + data.keep = 1; i = 0; if (opt->keepallold_flag) { data.keep = 2; @@ -171,7 +171,7 @@ ext_keytab(struct ext_keytab_options *opt, int argc, char **argv) i++; } if (opt->pruneall_flag) { - data.keep = 1; + data.keep = 0; i++; } if (i > 1) { diff --git a/kadmin/server.c b/kadmin/server.c index 4a45ca86a..4395347af 100644 --- a/kadmin/server.c +++ b/kadmin/server.c @@ -52,7 +52,7 @@ kadmind_dispatch(void *kadm_handlep, krb5_boolean initial, char *password = NULL, *expression; krb5_keyblock *new_keys; krb5_key_salt_tuple *ks_tuple = NULL; - krb5_boolean keepold = FALSE; + int keepold = FALSE; int n_ks_tuple = 0; int n_keys; char **princs;