r11170: root free pass on eventlog open access check
[ira/wip.git] / source / rpc_server / srv_eventlog_nt.c
index 577ec48482a2258b0cbe273ba5d267d2b318d2ef..5901f68f5210677ac44e58b3d5d6a346e6611d46 100644 (file)
@@ -88,6 +88,13 @@ static BOOL elog_check_access( EVENTLOG_INFO *info, NT_USER_TOKEN *token )
                return False;
        }
        
+       /* root free pass */
+
+       if ( geteuid() == sec_initial_uid() ) {
+               DEBUG(5,("elog_check_access: using root's token\n"));
+               token = get_root_nt_token();
+       }
+
        /* run the check, try for the max allowed */
        
        ret = se_access_check( sec_desc, token, MAXIMUM_ALLOWED_ACCESS,