diff --git a/kuser/kinit.1 b/kuser/kinit.1 index 8005a7b97..1793530f8 100644 --- a/kuser/kinit.1 +++ b/kuser/kinit.1 @@ -129,7 +129,7 @@ then the default cache may be either or .Ar FILE:/tmp/krb5cc_%{uid} if the principal is the default principal for the user, meaning -that it is of rht form +that it is of the form .Ar ${USER}@${user_realm} or .Ar ${USER}@${default_realm} . diff --git a/kuser/kinit.c b/kuser/kinit.c index 617207cde..c57bd6fa3 100644 --- a/kuser/kinit.c +++ b/kuser/kinit.c @@ -192,8 +192,8 @@ static struct getargs args[] = { { "change-default", 0, arg_negative_flag, &switch_cache_flags, NP_("switch the default cache to the new credentials cache", ""), NULL }, - { "default-for-principal", 0, arg_negative_flag, &default_for, - NP_("use a default cache appropriate for the client principal name", ""), NULL }, + { "default-for-principal", 0, arg_flag, &default_for, + NP_("Use a default cache appropriate for the client principal", ""), NULL }, { "ok-as-delegate", 0, arg_flag, &ok_as_delegate_flag, NP_("honor ok-as-delegate on tickets", ""), NULL }, @@ -1551,6 +1551,7 @@ main(int argc, char **argv) krb5_cc_get_name(context, ccache)); setenv("KRB5CCNAME", s, 1); unique_ccache = TRUE; + switch_cache_flags = 0; } else if (default_for) { ret = krb5_cc_default_for(context, principal, &ccache); if (switch_cache_flags == -1)