diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-09-24 15:01:57 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2013-09-24 15:01:57 -0400 |
commit | a6ab6f63de618180127daadc070d696f6268000f (patch) | |
tree | 21779f1b40aa3a2bf59ea2d97676ede7e5c67c07 /utils/gssd/krb5_util.c | |
parent | 841e83c1caf028bf61ae37030aaa3453f2a2b136 (diff) | |
download | nfs-utils-a6ab6f63de618180127daadc070d696f6268000f.tar.gz nfs-utils-a6ab6f63de618180127daadc070d696f6268000f.tar.xz nfs-utils-a6ab6f63de618180127daadc070d696f6268000f.zip |
gssd: don't use tgtname to find our keytab
From: "J. Bruce Fields" <bfields@redhat.com>
The tgtname is of the form service@hostname. It's not a hostname, and
attempting to look it up here just causes failure of any upcall with a
"target=" field (currently, any upcall on behalf of an nfsv4.0
callback).
I think the theory was that knowning that target= name might help pick
the right keytab, but I don't really know if that's helpful. For now,
just stop trying to do this.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/gssd/krb5_util.c')
-rw-r--r-- | utils/gssd/krb5_util.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c index 83b9651..c6e52fd 100644 --- a/utils/gssd/krb5_util.c +++ b/utils/gssd/krb5_util.c @@ -1149,7 +1149,7 @@ gssd_get_krb5_machine_cred_list(char ***list) if (ple->ccname) { /* Make sure cred is up-to-date before returning it */ retval = gssd_refresh_krb5_machine_credential(NULL, ple, - NULL, NULL); + NULL); if (retval) continue; if (i + 1 > listsize) { @@ -1240,8 +1240,7 @@ gssd_destroy_krb5_machine_creds(void) int gssd_refresh_krb5_machine_credential(char *hostname, struct gssd_k5_kt_princ *ple, - char *service, - char *tgtname) + char *service) { krb5_error_code code = 0; krb5_context context; @@ -1280,10 +1279,7 @@ gssd_refresh_krb5_machine_credential(char *hostname, if (ple == NULL) { krb5_keytab_entry kte; - if (tgtname == NULL) - tgtname = hostname; - - code = find_keytab_entry(context, kt, tgtname, &kte, svcnames); + code = find_keytab_entry(context, kt, hostname, &kte, svcnames); if (code) { printerr(0, "ERROR: %s: no usable keytab entry found " "in keytab %s for connection with host %s\n", |