summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server/srv_svcctl_nt.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-14 12:49:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:03:38 -0500
commita9b96c6b3d2fa111c2210b57fa816fcbc1946fc5 (patch)
tree38a3c10aac1afbdfb131f63023d6a4e7d7f217a5 /source3/rpc_server/srv_svcctl_nt.c
parentf94d9826465b391faa4a4697e03459104065c115 (diff)
downloadsamba-a9b96c6b3d2fa111c2210b57fa816fcbc1946fc5.tar.gz
samba-a9b96c6b3d2fa111c2210b57fa816fcbc1946fc5.tar.xz
samba-a9b96c6b3d2fa111c2210b57fa816fcbc1946fc5.zip
r10221: add "free pass for root" in svcctl and default winreg access checks
(This used to be commit 24901187962e24bfa5ba7722aba0aeb9397ac7b6)
Diffstat (limited to 'source3/rpc_server/srv_svcctl_nt.c')
-rw-r--r--source3/rpc_server/srv_svcctl_nt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c
index 2e44dc36922..16c3259840e 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -59,10 +59,18 @@ static NTSTATUS svcctl_access_check( SEC_DESC *sec_desc, NT_USER_TOKEN *token,
uint32 access_desired, uint32 *access_granted )
{
NTSTATUS result;
-
+
/* maybe add privilege checks in here later */
se_access_check( sec_desc, token, access_desired, access_granted, &result );
+
+ if ( !NT_STATUS_IS_OK(result) ) {
+ if ( geteuid() == sec_initial_uid() ) {
+ DEBUG(5,("svcctl_access_check: access check bypassed for 'root'\n"));
+ *access_granted = access_desired;
+ return NT_STATUS_OK;
+ }
+ }
return result;
}