From 32601c6b3825f71af9db6efd7f048d3d990ae9f3 Mon Sep 17 00:00:00 2001 From: "fredrik@DOLDA2000.COM" Date: Fri, 4 Mar 2005 19:53:59 +0000 Subject: [PATCH] Fixed erroneous string lengths. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@176 959494ce-11ee-0310-bf91-de5d638817bd --- pam_krb5auto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pam_krb5auto.c b/pam_krb5auto.c index 3f7bf00..6f9bc73 100644 --- a/pam_krb5auto.c +++ b/pam_krb5auto.c @@ -183,8 +183,8 @@ static int savecreds(pam_handle_t *pamh, struct options *opts, struct data *data if(opts->debug) log(LOG_DEBUG, "got creds successfully"); snprintf(buf, sizeof(buf), "KRB5CCNAME=FILE:/tmp/krb5cc_%i_XXXXXX", data->uid); - ccname = buf + sizeof("KRB5CCNAME="); - filename = ccname + sizeof("FILE:"); + ccname = buf + sizeof("KRB5CCNAME=") - 1; + filename = ccname + sizeof("FILE:") - 1; if((fd = mkstemp(filename)) < 0) { log(LOG_ERR, "could not create tempfile for credentials cache: %s", strerror(errno)); ret = PAM_SERVICE_ERR; -- 2.11.0