diff options
author | Marc Horowitz <marc@mit.edu> | 1996-07-22 20:49:46 +0000 |
---|---|---|
committer | Marc Horowitz <marc@mit.edu> | 1996-07-22 20:49:46 +0000 |
commit | edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1 (patch) | |
tree | 6c2974a97b448c040fa4a31708ec5e02f187526c /src/clients | |
parent | 013bb1391582ed9e653ae706e398ddb8d08cfcc9 (diff) | |
download | krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.tar.gz krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.tar.xz krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.zip |
this commit includes all the changes on the OV_9510_INTEGRATION and
OV_MERGE branches. This includes, but is not limited to, the new openvision
admin system, and major changes to gssapi to add functionality, and bring
the implementation in line with rfc1964. before committing, the
code was built and tested for netbsd and solaris.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8774 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/clients')
-rw-r--r-- | src/clients/kinit/ChangeLog | 5 | ||||
-rw-r--r-- | src/clients/kinit/kinit.M | 5 | ||||
-rw-r--r-- | src/clients/kinit/kinit.c | 36 |
3 files changed, 34 insertions, 12 deletions
diff --git a/src/clients/kinit/ChangeLog b/src/clients/kinit/ChangeLog index 75f9fa8529..7fa4f102bd 100644 --- a/src/clients/kinit/ChangeLog +++ b/src/clients/kinit/ChangeLog @@ -9,6 +9,11 @@ Sun Jul 7 15:21:58 1996 Ezra Peisach <epeisach@kangaroo.mit.edu> and only new tgt is stored. (main): New option -R to renew tickets. +Thu Jun 20 20:19:44 1996 Marc Horowitz <marc@mit.edu> + + * kinit.M, kinit.c (main): Add a -s option to kinit which specifies + the service name to be used in the TGS_REQ. + Fri May 3 00:28:10 1996 Mark Eichin <eichin@cygnus.com> * kinit.c (krb5_validate_tgt): new function, takes a credential diff --git a/src/clients/kinit/kinit.M b/src/clients/kinit/kinit.M index 9d05b2d589..3108a0aad4 100644 --- a/src/clients/kinit/kinit.M +++ b/src/clients/kinit/kinit.M @@ -94,6 +94,11 @@ option is not used, the default cache is used. Any contents of the cache are destroyed by .IR kinit . .PP +The +.B \-s +option can be used to specify an alternate service name to use when +getting initial tickets. +.PP The default credentials cache may vary between systems; however, if the .B KRB5CCNAME environment variable is set, its value is used to name the default diff --git a/src/clients/kinit/kinit.c b/src/clients/kinit/kinit.c index 555b1b8610..df8d449e48 100644 --- a/src/clients/kinit/kinit.c +++ b/src/clients/kinit/kinit.c @@ -60,6 +60,7 @@ main(argc, argv) krb5_ccache ccache = NULL; char *cache_name = NULL; /* -f option */ char *keytab_name = NULL; /* -t option */ + char *service_name = NULL; /* -s option */ krb5_deltat lifetime = KRB5_DEFAULT_LIFE; /* -l option */ krb5_timestamp starttime = 0; krb5_deltat rlife = 0; @@ -90,7 +91,7 @@ main(argc, argv) if (strrchr(argv[0], '/')) argv[0] = strrchr(argv[0], '/')+1; - while ((option = getopt(argc, argv, "r:Rfpl:s:c:kt:v")) != EOF) { + while ((option = getopt(argc, argv, "r:Rfpl:s:c:kt:vS:")) != EOF) { switch (option) { case 'r': options |= KDC_OPT_RENEWABLE; @@ -108,6 +109,9 @@ main(argc, argv) /* validate the ticket */ options |= KDC_OPT_VALIDATE; break; + case 'S': + service_name = optarg; + break; case 'p': options |= KDC_OPT_PROXIABLE; break; @@ -186,7 +190,7 @@ main(argc, argv) } if (errflg) { - fprintf(stderr, "Usage: %s [-r time] [-R] [-s time] [-v] [-puf] [-l lifetime] [-c cachename] [-k] [-t keytab] [principal]\n", argv[0]); + fprintf(stderr, "Usage: %s [-r time] [-R] [-s time] [-v] [-puf] [-l lifetime] [-c cachename] [-k] [-t keytab] [-S target_service] [principal]\n", argv[0]); exit(2); } @@ -250,17 +254,25 @@ main(argc, argv) my_creds.client = me; - if((code = krb5_build_principal_ext(kcontext, &server, - krb5_princ_realm(kcontext, me)->length, - krb5_princ_realm(kcontext, me)->data, - tgtname.length, tgtname.data, - krb5_princ_realm(kcontext, me)->length, - krb5_princ_realm(kcontext, me)->data, - 0))) { - com_err(argv[0], code, "while building server name"); - exit(1); + if (service_name == NULL) { + if((code = krb5_build_principal_ext(kcontext, &server, + krb5_princ_realm(kcontext, me)->length, + krb5_princ_realm(kcontext, me)->data, + tgtname.length, tgtname.data, + krb5_princ_realm(kcontext, me)->length, + krb5_princ_realm(kcontext, me)->data, + 0))) { + com_err(argv[0], code, "while building server name"); + exit(1); + } + } else { + if (code = krb5_parse_name(kcontext, service_name, &server)) { + com_err(argv[0], code, "while parsing service name %s", + service_name); + exit(1); + } } - + my_creds.server = server; if (options & KDC_OPT_POSTDATED) { |