mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3-dcerpc: Set flags directly instead of calling unimplemented functions.
This commit is contained in:
parent
7407c979a1
commit
bfe53d4145
@ -721,12 +721,21 @@ static bool pipe_spnego_auth_bind_negotiate(struct pipes_struct *p,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clear flags,
|
||||||
|
* then set them according to requested Auth Level */
|
||||||
|
auth_ntlmssp_and_flags(a, ~(NTLMSSP_NEGOTIATE_SIGN |
|
||||||
|
NTLMSSP_NEGOTIATE_SEAL));
|
||||||
switch (pauth_info->auth_level) {
|
switch (pauth_info->auth_level) {
|
||||||
case DCERPC_AUTH_LEVEL_INTEGRITY:
|
case DCERPC_AUTH_LEVEL_INTEGRITY:
|
||||||
auth_ntlmssp_want_sign(a);
|
auth_ntlmssp_or_flags(a,
|
||||||
|
NTLMSSP_NEGOTIATE_SIGN);
|
||||||
break;
|
break;
|
||||||
case DCERPC_AUTH_LEVEL_PRIVACY:
|
case DCERPC_AUTH_LEVEL_PRIVACY:
|
||||||
auth_ntlmssp_want_seal(a);
|
/* Privacy always implies both sign and seal
|
||||||
|
* for ntlmssp */
|
||||||
|
auth_ntlmssp_or_flags(a,
|
||||||
|
NTLMSSP_NEGOTIATE_SIGN |
|
||||||
|
NTLMSSP_NEGOTIATE_SEAL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -988,12 +997,18 @@ static bool pipe_ntlmssp_auth_bind(struct pipes_struct *p,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clear flags, then set them according to requested Auth Level */
|
||||||
|
auth_ntlmssp_and_flags(a, ~(NTLMSSP_NEGOTIATE_SIGN |
|
||||||
|
NTLMSSP_NEGOTIATE_SEAL));
|
||||||
|
|
||||||
switch (auth_info->auth_level) {
|
switch (auth_info->auth_level) {
|
||||||
case DCERPC_AUTH_LEVEL_INTEGRITY:
|
case DCERPC_AUTH_LEVEL_INTEGRITY:
|
||||||
auth_ntlmssp_want_sign(a);
|
auth_ntlmssp_or_flags(a, NTLMSSP_NEGOTIATE_SIGN);
|
||||||
break;
|
break;
|
||||||
case DCERPC_AUTH_LEVEL_PRIVACY:
|
case DCERPC_AUTH_LEVEL_PRIVACY:
|
||||||
auth_ntlmssp_want_seal(a);
|
/* Privacy always implies both sign and seal for ntlmssp */
|
||||||
|
auth_ntlmssp_or_flags(a, NTLMSSP_NEGOTIATE_SIGN |
|
||||||
|
NTLMSSP_NEGOTIATE_SEAL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user