summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_connect_sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/winbind/wb_connect_sam.c')
-rw-r--r--source4/winbind/wb_connect_sam.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source4/winbind/wb_connect_sam.c b/source4/winbind/wb_connect_sam.c
index e3b9c82310..1817785508 100644
--- a/source4/winbind/wb_connect_sam.c
+++ b/source4/winbind/wb_connect_sam.c
@@ -102,24 +102,32 @@ static void connect_samr_recv_pipe(struct composite_context *ctx)
switch (state->auth_type) {
case DCERPC_AUTH_TYPE_NONE:
ctx = dcerpc_bind_auth_none_send(state, state->samr_pipe,
- &dcerpc_table_samr);
+ &dcerpc_table_samr);
composite_continue(state->ctx, ctx,
connect_samr_recv_anon_bind, state);
break;
case DCERPC_AUTH_TYPE_NTLMSSP:
case DCERPC_AUTH_TYPE_SCHANNEL:
+ {
+ uint8_t auth_type;
+ if (lp_winbind_sealed_pipes()) {
+ auth_type = DCERPC_AUTH_LEVEL_PRIVACY;
+ } else {
+ auth_type = DCERPC_AUTH_LEVEL_INTEGRITY;
+ }
if (state->creds == NULL) {
composite_error(state->ctx, NT_STATUS_INTERNAL_ERROR);
return;
}
- state->samr_pipe->conn->flags |= (DCERPC_SIGN | DCERPC_SEAL);
ctx = dcerpc_bind_auth_send(state, state->samr_pipe,
- &dcerpc_table_samr,
+ &dcerpc_table_samr,
state->creds, state->auth_type,
+ auth_type,
NULL);
composite_continue(state->ctx, ctx,
connect_samr_recv_auth_bind, state);
break;
+ }
default:
composite_error(state->ctx, NT_STATUS_INTERNAL_ERROR);
}