summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_reg_nt.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_reg_nt.c')
-rw-r--r--source3/rpc_server/srv_reg_nt.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index 7a48b8dd22..9ffc77fce8 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -45,16 +45,15 @@ NTSTATUS registry_access_check( SEC_DESC *sec_desc, NT_USER_TOKEN *token,
NTSTATUS result;
se_map_generic( &access_desired, &reg_generic_map );
- se_access_check( sec_desc, token, access_desired, access_granted, &result );
- if ( !NT_STATUS_IS_OK(result) ) {
- if ( geteuid() == sec_initial_uid() ) {
- DEBUG(5,("registry_access_check: access check bypassed for 'root'\n"));
- *access_granted = access_desired;
- return NT_STATUS_OK;
- }
+ if ( geteuid() == sec_initial_uid() ) {
+ DEBUG(5,("registry_access_check: access check bypassed for 'root'\n"));
+ *access_granted = access_desired;
+ return NT_STATUS_OK;
}
-
+
+ se_access_check( sec_desc, token, access_desired, access_granted, &result );
+
return result;
}