[SSSD] [PATCH] Fix wrong return value

Stephen Gallagher sgallagh at redhat.com
Tue Apr 27 11:44:24 UTC 2010


On 04/27/2010 07:18 AM, Sumit Bose wrote:
> Hi,
>
> the patch which removes the authentication tokens from the PAM stack
> didn't return the right status code if a password change fails. To make
> it easier to read I introduced a new variable.
>
> bye,
> Sumit
>

Nack.

Under SSS_PAM_AUTHENTICATE:
exp_data = malloc(sizeof(int));
if (exp_data == NULL) {
     D(("malloc failed."));
     ret = PAM_BUF_ERR;
     break;
}

You're still using ret here, which means that instead of returning 
PAM_BUF_ERR from the function, you're returning whatever came back from 
send_and_receive() above.



-- 
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/



More information about the sssd-devel mailing list