diff options
author | Simo Sorce <simo@redhat.com> | 2016-06-07 09:57:26 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2016-06-09 10:10:31 -0400 |
commit | b3b115bcde2550d2b3f84ae4e1cd7872da829fd3 (patch) | |
tree | f60c9596067f4dd6c4ac0365905e86672ec1dc25 | |
parent | 3d4e90fde8880d5c6aeee868413e342b9a9d4f41 (diff) | |
download | mod_auth_gssapi-b3b115bcde2550d2b3f84ae4e1cd7872da829fd3.tar.gz mod_auth_gssapi-b3b115bcde2550d2b3f84ae4e1cd7872da829fd3.tar.xz mod_auth_gssapi-b3b115bcde2550d2b3f84ae4e1cd7872da829fd3.zip |
Fix cred cache detection
The stat call was not using the full path name, therefore it was always
failing.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Jan Pazdziora <jpazdziora@redhat.com>
Close #91
-rw-r--r-- | src/environ.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/environ.c b/src/environ.c index c0be4f8..8fefb8e 100644 --- a/src/environ.c +++ b/src/environ.c @@ -248,16 +248,19 @@ static void mag_set_KRB5CCNAME(request_rec *req, const char *dir, { apr_status_t status; apr_finfo_t finfo; + char *path; char *value; - status = apr_stat(&finfo, ccname, APR_FINFO_MIN, req->pool); + path = apr_psprintf(req->pool, "%s/%s", dir, ccname); + + status = apr_stat(&finfo, path, APR_FINFO_MIN, req->pool); if (status != APR_SUCCESS && status != APR_INCOMPLETE) { /* set the file cache anyway, but warn */ ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, req, - "KRB5CCNAME file (%s) lookup failed!", ccname); + "KRB5CCNAME file (%s) lookup failed!", path); } - value = apr_psprintf(req->pool, "FILE:%s/%s", dir, ccname); + value = apr_psprintf(req->pool, "FILE:%s", path); apr_table_set(req->subprocess_env, "KRB5CCNAME", value); } |