Author: ion
Date: Sun Jul 23 11:24:20 2006
New Revision: 23235
URL:
http://svn.reactos.org/svn/reactos?rev=23235&view=rev
Log:
- SeAccessCheck should assume failure if no SD was passed. Also fixes bugcheck on startup
since processes don't currently have SDs.
Modified:
trunk/reactos/ntoskrnl/ps/security.c
trunk/reactos/ntoskrnl/se/semgr.c
Modified: trunk/reactos/ntoskrnl/ps/security.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/security.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/security.c (original)
+++ trunk/reactos/ntoskrnl/ps/security.c Sun Jul 23 11:24:20 2006
@@ -263,6 +263,7 @@
SubjectContext.ClientToken = NULL;
/* Do the access check */
+ if (!SecurityDescriptor) DPRINT1("FIX PS SDs!!\n");
Result = SeAccessCheck(SecurityDescriptor,
&SubjectContext,
FALSE,
Modified: trunk/reactos/ntoskrnl/se/semgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=23…
==============================================================================
--- trunk/reactos/ntoskrnl/se/semgr.c (original)
+++ trunk/reactos/ntoskrnl/se/semgr.c Sun Jul 23 11:24:20 2006
@@ -871,6 +871,14 @@
PAGED_CODE();
+ /* Check if we didn't get an SD */
+ if (!SecurityDescriptor)
+ {
+ /* Automatic failure */
+ *AccessStatus = STATUS_ACCESS_DENIED;
+ return FALSE;
+ }
+
CurrentAccess = PreviouslyGrantedAccess;
if (SubjectContextLocked == FALSE)