summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/srv_samr_nt.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index c45be02ab8..11aa4e3609 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3478,14 +3478,26 @@ NTSTATUS _samr_Connect2(pipes_struct *p,
uint32 des_access = r->in.access_mask;
NTSTATUS nt_status;
size_t sd_size;
+ const char *fn = "_samr_Connect2";
+ switch (p->hdr_req.opnum) {
+ case NDR_SAMR_CONNECT2:
+ fn = "_samr_Connect2";
+ break;
+ case NDR_SAMR_CONNECT4:
+ fn = "_samr_Connect4";
+ break;
+ case NDR_SAMR_CONNECT5:
+ fn = "_samr_Connect5";
+ break;
+ }
- DEBUG(5,("_samr_Connect2: %d\n", __LINE__));
+ DEBUG(5,("%s: %d\n", fn, __LINE__));
/* Access check */
if (!pipe_access_check(p)) {
- DEBUG(3, ("access denied to _samr_Connect2\n"));
+ DEBUG(3, ("access denied to %s\n", fn));
return NT_STATUS_ACCESS_DENIED;
}
@@ -3495,7 +3507,7 @@ NTSTATUS _samr_Connect2(pipes_struct *p,
se_map_generic(&des_access, &sam_generic_mapping);
nt_status = access_check_samr_object(psd, p->server_info->ptok,
- NULL, 0, des_access, &acc_granted, "_samr_Connect2");
+ NULL, 0, des_access, &acc_granted, fn);
if ( !NT_STATUS_IS_OK(nt_status) )
return nt_status;
@@ -3511,7 +3523,7 @@ NTSTATUS _samr_Connect2(pipes_struct *p,
if (!create_policy_hnd(p, r->out.connect_handle, free_samr_info, (void *)info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
- DEBUG(5,("_samr_Connect2: %d\n", __LINE__));
+ DEBUG(5,("%s: %d\n", fn, __LINE__));
return nt_status;
}