]> git.ipfire.org Git - thirdparty/krb5.git/commit
Allow realm in kadm5_init service names
authorGreg Hudson <ghudson@mit.edu>
Thu, 19 Dec 2013 18:33:33 +0000 (13:33 -0500)
committerGreg Hudson <ghudson@mit.edu>
Sat, 21 Dec 2013 05:06:22 +0000 (00:06 -0500)
commit5341cfde2b3e607e294bb0d057dc3540172a8b1b
treea98ec833ae1b0789f277367e70bdfba357559b2b
parent33b06596be92f7d8458ac6b136f092e235dec834
Allow realm in kadm5_init service names

Previously, if you passed a service name with a realm part to a
kadm5_init function, you would get a KRB5_PARSE_MALFORMED error
because the code would internally append its own '@realm' suffix
before parsing the name.  Fix this as follows:

Change gic_iter so instead of producing a full service name, it
produces a krb5_principal which is taken from the cred it acquires.
Pass the client and full service name around as principals, rather
than strings, and use the gss_nt_krb5_principal name type to import
them in setup_gss().  Don't append a realm to the input service name;
instead, pass the input service name directly to the gic functions
(which do not need a realm in the service name and will ignore the
realm if one is present).  For the INIT_CREDS case, parse the input
service name with KRB5_PRINCIPAL_PARSE_IGNORE_REALM and then set the
realm.

ticket: 7800
src/lib/kadm5/clnt/client_init.c