git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@176
959494ce-11ee-0310-bf91-
de5d638817bd
if(opts->debug)
log(LOG_DEBUG, "got creds successfully");
snprintf(buf, sizeof(buf), "KRB5CCNAME=FILE:/tmp/krb5cc_%i_XXXXXX", data->uid);
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;
if((fd = mkstemp(filename)) < 0) {
log(LOG_ERR, "could not create tempfile for credentials cache: %s", strerror(errno));
ret = PAM_SERVICE_ERR;