mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[SERVICES] Assign a World identity authority for Everyone SID, not Null authority
The current code allocates memory and initializes the Everyone "World" security identifier but with a Null authority identifier. This is utterly wrong on so many levels, more so partly because a Null authority identifier is 0 so after the Everyone SID is initialized, it is actually initialized as S-1-0-0 instead of S-1-1-0.
This commit is contained in:
parent
f340524ea4
commit
f559f63063
1 changed files with 2 additions and 1 deletions
|
@ -55,6 +55,7 @@ DWORD
|
|||
ScmCreateSids(VOID)
|
||||
{
|
||||
SID_IDENTIFIER_AUTHORITY NullAuthority = {SECURITY_NULL_SID_AUTHORITY};
|
||||
SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY};
|
||||
SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY};
|
||||
PULONG pSubAuthority;
|
||||
ULONG ulLength1 = RtlLengthRequiredSid(1);
|
||||
|
@ -78,7 +79,7 @@ ScmCreateSids(VOID)
|
|||
return ERROR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
RtlInitializeSid(pWorldSid, &NullAuthority, 1);
|
||||
RtlInitializeSid(pWorldSid, &WorldAuthority, 1);
|
||||
pSubAuthority = RtlSubAuthoritySid(pWorldSid, 0);
|
||||
*pSubAuthority = SECURITY_WORLD_RID;
|
||||
|
||||
|
|
Loading…
Reference in a new issue