X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fgssd%2Fkrb5_util.c;h=3030c3fc05ecf261deb44d3e4a5acdbd29144d53;hp=5f3e490c75c1a338ea42a0215315c9e7b15f9c5b;hb=a6037e23a8c9d649bf5946ac9d23114f9097b997;hpb=804a7ea8bffb1b26a0e8632eb8fb61ef30cdbf68;ds=inline diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c index 5f3e490..3030c3f 100644 --- a/utils/gssd/krb5_util.c +++ b/utils/gssd/krb5_util.c @@ -158,7 +158,7 @@ select_krb5_ccache(const struct dirent *d) } /* - * Look in the GSSD_DEFAULT_CRED_DIR for files that look like they + * Look in the ccachedir for files that look like they * are Kerberos Credential Cache files for a given UID. Return * non-zero and the dirent pointer for the entry most likely to be * what we want. Otherwise, return zero and no dirent pointer. @@ -179,7 +179,7 @@ gssd_find_existing_krb5_ccache(uid_t uid, struct dirent **d) struct stat best_match_stat, tmp_stat; *d = NULL; - n = scandir(GSSD_DEFAULT_CRED_DIR, &namelist, select_krb5_ccache, 0); + n = scandir(ccachedir, &namelist, select_krb5_ccache, 0); if (n < 0) { perror("scandir looking for krb5 credentials caches"); } @@ -195,7 +195,7 @@ gssd_find_existing_krb5_ccache(uid_t uid, struct dirent **d) if (strstr(namelist[i]->d_name, substring) || !strcmp(namelist[i]->d_name, fullstring)) { snprintf(statname, sizeof(statname), - "%s/%s", GSSD_DEFAULT_CRED_DIR, + "%s/%s", ccachedir, namelist[i]->d_name); if (stat(statname, &tmp_stat)) { printerr(0, "Error doing stat " @@ -626,13 +626,12 @@ gssd_setup_krb5_user_gss_ccache(uid_t uid, char *servername) memset(buf, 0, sizeof(buf)); if (gssd_find_existing_krb5_ccache(uid, &d)) { snprintf(buf, sizeof(buf), "FILE:%s/%s", - GSSD_DEFAULT_CRED_DIR, d->d_name); + ccachedir, d->d_name); free(d); } else snprintf(buf, sizeof(buf), "FILE:%s/%s%u", - GSSD_DEFAULT_CRED_DIR, - GSSD_DEFAULT_CRED_PREFIX, uid); + ccachedir, GSSD_DEFAULT_CRED_PREFIX, uid); printerr(2, "using %s as credentials cache for client with " "uid %u for server %s\n", buf, uid, servername); gssd_set_krb5_ccache_name(buf);