projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f8c51ec
)
[NTOSKRNL] On process primary token change, dereference device map
author
Pierre Schweitzer
<pierre@reactos.org>
Sun, 2 Jun 2019 07:50:05 +0000
(09:50 +0200)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sun, 2 Jun 2019 08:00:17 +0000
(10:00 +0200)
ntoskrnl/ps/security.c
patch
|
blob
|
history
diff --git
a/ntoskrnl/ps/security.c
b/ntoskrnl/ps/security.c
index
e245dde
..
619ff56
100644
(file)
--- a/
ntoskrnl/ps/security.c
+++ b/
ntoskrnl/ps/security.c
@@
-325,6
+325,14
@@
PspSetPrimaryToken(IN PEPROCESS Process,
STANDARD_RIGHTS_ALL |
PROCESS_SET_QUOTA);
}
STANDARD_RIGHTS_ALL |
PROCESS_SET_QUOTA);
}
+
+ /*
+ * In case LUID device maps are enable, we may not be using
+ * system device map for this process, but a logon LUID based
+ * device map. Because we change primary token, this usage is
+ * no longer valid, so dereference the process device map
+ */
+ if (ObIsLUIDDeviceMapsEnabled()) ObDereferenceDeviceMap(Process);
}
/* Dereference the token */
}
/* Dereference the token */