Go to the source code of this file.
◆ GetSidTypeName()
◆ GetTextualSid()
Definition at line 29 of file SecurityDescriptor.cpp.
34{
36 DWORD dwSubAuthorities;
40
41
42
44
45
46
48
49
50
52
53
54
55
56 dwSidSize=(15 + 12 + (12 * dwSubAuthorities) + 1) *
sizeof(
TCHAR);
57
58
59
60
61 if (*lpdwBufferLen < dwSidSize)
62 {
63 *lpdwBufferLen = dwSidSize;
66 }
67
68
69
70 dwSidSize=
wsprintf(TextualSid,
TEXT(
"S-%lu-"), dwSidRev );
71
72
73
74 if ( (psia->Value[0] != 0) || (psia->Value[1] != 0) )
75 {
77 TEXT(
"0x%02hx%02hx%02hx%02hx%02hx%02hx"),
84 }
85 else
86 {
89 (
ULONG)(psia->Value[5] ) +
90 (
ULONG)(psia->Value[4] << 8) +
91 (
ULONG)(psia->Value[3] << 16) +
92 (
ULONG)(psia->Value[2] << 24) );
93 }
94
95
96
98 {
99 dwSidSize+=
wsprintf(TextualSid + dwSidSize,
TEXT(
"-%lu"),
101 }
102
104}
#define ERROR_INSUFFICIENT_BUFFER
PDWORD WINAPI GetSidSubAuthority(PSID pSid, DWORD nSubAuthority)
BOOL WINAPI IsValidSid(PSID pSid)
PUCHAR WINAPI GetSidSubAuthorityCount(PSID pSid)
PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid)
* PSID_IDENTIFIER_AUTHORITY
Referenced by CShellCommandDACL::Execute(), CShellCommandOwner::Execute(), and CShellCommandSACL::Execute().