[PATCH] s4/auth/ntlm/auth_unix.c: add parens

Uri Simchoni uri at samba.org
Wed Mar 9 18:11:47 UTC 2016


On 03/09/2016 06:55 PM, Jeremy Allison wrote:
> On Wed, Mar 09, 2016 at 04:42:04PM +0100, Aurélien Aptel wrote:
>> Hi,
>>
>> Another PVS fix.
>>
>> Operator | has lower precedence than ?:
>> so add parens to have the expected result.
>>
>> Please review&push.
>
> LGTM. Second Team reviewer please ?
>
RB+ me.

>> --
>> Aurélien Aptel / SUSE Labs Samba Team
>> GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
>> SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
>> GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
>> Nürnberg)
>
>>  From 9e0f3acf1c20ea0b1d16ea8b01fcf9814e013e39 Mon Sep 17 00:00:00 2001
>> From: Aurelien Aptel <aaptel at suse.com>
>> Date: Wed, 9 Mar 2016 11:43:16 +0100
>> Subject: [PATCH] s4/auth/ntlm/auth_unix.c: add parens
>>
>> operator | has lower precedence than ?:
>> so add parens to have the expected result.
>>
>> Signed-off-by: Aurelien Aptel <aaptel at suse.com>
>> ---
>>   source4/auth/ntlm/auth_unix.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
>> index 2b0512a..46e82f4 100644
>> --- a/source4/auth/ntlm/auth_unix.c
>> +++ b/source4/auth/ntlm/auth_unix.c
>> @@ -329,7 +329,7 @@ static NTSTATUS smb_pam_auth(pam_handle_t *pamh, bool allow_null_passwords, cons
>>   	
>>   	DEBUG(4,("smb_pam_auth: PAM: Authenticate User: %s\n", user));
>>
>> -	pam_error = pam_authenticate(pamh, PAM_SILENT | allow_null_passwords ? 0 : PAM_DISALLOW_NULL_AUTHTOK);
>> +	pam_error = pam_authenticate(pamh, PAM_SILENT | (allow_null_passwords ? 0 : PAM_DISALLOW_NULL_AUTHTOK));
>>   	switch( pam_error ){
>>   		case PAM_AUTH_ERR:
>>   			DEBUG(2, ("smb_pam_auth: PAM: Authentication Error for user %s\n", user));
>> --
>> 2.1.4
>>
>
>
>
>




More information about the samba-technical mailing list