X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fauth-krb5.c;h=ca52e63a8bd2f728185ef2e95a8e8514cc5effbb;hb=8b17e919cee63400e6de2c5f699c0a88d226b7e6;hp=995acb477b89bc3320cfd5831c4e6a503eac5d14;hpb=d1a6180d8b1dd4b41c1348ec6f84fde7d74d8cdf;p=doldaconnect.git diff --git a/daemon/auth-krb5.c b/daemon/auth-krb5.c index 995acb4..ca52e63 100644 --- a/daemon/auth-krb5.c +++ b/daemon/auth-krb5.c @@ -305,6 +305,7 @@ static int krbauth(struct authhandle *auth, char *passdata) if(auth->text != NULL) free(auth->text); auth->text = icmbstowcs((char *)error_message(ret), NULL); + free(msg); return(AUTH_DENIED); } free(msg); @@ -369,8 +370,10 @@ static int krbauth(struct authhandle *auth, char *passdata) if((ret = krb5_rd_cred(k5context, data->context, &k5d, &fwdcreds, NULL)) != 0) { flog(LOG_ERR, "krb5_rd_cred returned an error: %s", error_message(ret)); + free(msg); return(AUTH_ERR); } + free(msg); if(*fwdcreds == NULL) { flog(LOG_ERR, "forwarded credentials array was empty (from %s)", data->username); @@ -419,7 +422,7 @@ static int opensess(struct authhandle *auth) flog(LOG_ERR, "could not get passwd entry for forwarded tickets (user %s): %s", data->username, strerror(errno)); return(AUTH_ERR); } - if(confgetint("auth-krb5", "usedefcc")) + if(!confgetint("auth-krb5", "usedefcc")) { buf = sprintf2("/tmp/krb5cc_dc_%i_XXXXXX", pwent->pw_uid); if((fd = mkstemp(buf)) < 0)