diff options
author | Luke Howard <lukeh@padl.com> | 2009-09-11 06:05:39 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2009-09-11 06:05:39 +0000 |
commit | ab3bafce97b37b34471a4e133cc82782e6c63fd6 (patch) | |
tree | 7c06a7574210c0db0ce35e993363ca12ff69047f | |
parent | 04a77a2abfdce34c502bab3297dde5f36f12a1f8 (diff) | |
download | krb5-ab3bafce97b37b34471a4e133cc82782e6c63fd6.zip krb5-ab3bafce97b37b34471a4e133cc82782e6c63fd6.tar.gz krb5-ab3bafce97b37b34471a4e133cc82782e6c63fd6.tar.bz2 |
* kvno should check for -P without -k after parsing all of the
options, so that option order is not important.
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/s4u@22720 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/clients/kvno/kvno.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/clients/kvno/kvno.c b/src/clients/kvno/kvno.c index 7796fdf..28855b0 100644 --- a/src/clients/kvno/kvno.c +++ b/src/clients/kvno/kvno.c @@ -91,11 +91,6 @@ int main(int argc, char *argv[]) break; case 'P': proxy = 1; /* S4U2Proxy - constrained delegation */ - if (keytab_name == NULL) { - fprintf(stderr, "Option -P (constrained delegation) " - "requires keytab to be specified\n"); - xusage(); - } break; case 'S': sname = optarg; @@ -120,6 +115,12 @@ int main(int argc, char *argv[]) } } + if (proxy && keytab_name == NULL) { + fprintf(stderr, "Option -P (constrained delegation) " + "requires keytab to be specified\n"); + xusage(); + } + if ((argc - optind) < 1) xusage(); @@ -223,7 +224,7 @@ static void do_v5_kvno (int count, char *names[], if (sname != NULL) { ret = krb5_sname_to_principal(context, names[i], sname, KRB5_NT_SRV_HST, - &in_creds.server); + &server); } else { ret = krb5_parse_name(context, names[i], &server); } |