Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (netapi32) |
|
NTSTATUS | GetAccountDomainSid (IN PUNICODE_STRING ServerName, OUT PSID *AccountDomainSid) |
|
NTSTATUS | GetBuiltinDomainSid (OUT PSID *BuiltinDomainSid) |
|
NTSTATUS | OpenAccountDomain (IN SAM_HANDLE ServerHandle, IN PUNICODE_STRING ServerName, IN ULONG DesiredAccess, OUT PSAM_HANDLE DomainHandle) |
|
NTSTATUS | OpenBuiltinDomain (IN SAM_HANDLE ServerHandle, IN ULONG DesiredAccess, OUT PSAM_HANDLE DomainHandle) |
|
NET_API_STATUS | BuildSidFromSidAndRid (IN PSID SrcSid, IN ULONG RelativeId, OUT PSID *DestSid) |
|
VOID | CopySidFromSidAndRid (_Out_ PSID DstSid, _In_ PSID SrcSid, _In_ ULONG RelativeId) |
|
◆ BuildSidFromSidAndRid()
Definition at line 177 of file utils.c.
180{
187
189 if (RidCount >= 8)
191
193
195 &DstSid);
197 return ApiStatus;
198
201 RidCount + 1);
202
203 for (
i = 0;
i < (
ULONG)RidCount;
i++)
204 {
208 }
209
212
213 *DestSid = DstSid;
214
216}
#define ERROR_INVALID_PARAMETER
NET_API_STATUS WINAPI NetApiBufferAllocate(DWORD ByteCount, LPVOID *Buffer)
GLdouble GLdouble GLdouble GLdouble q
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
NTSYSAPI PULONG NTAPI RtlSubAuthoritySid(_In_ PSID Sid, _In_ ULONG SubAuthority)
NTSYSAPI ULONG NTAPI RtlLengthRequiredSid(IN ULONG SubAuthorityCount)
NTSYSAPI PSID_IDENTIFIER_AUTHORITY NTAPI RtlIdentifierAuthoritySid(PSID Sid)
NTSYSAPI PUCHAR NTAPI RtlSubAuthorityCountSid(IN PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlInitializeSid(IN OUT PSID Sid, IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount)
Referenced by BuildSidListFromDomainAndName(), GetUserPrivileges(), and NetUserGetLocalGroups().
◆ CopySidFromSidAndRid()
Definition at line 220 of file utils.c.
224{
228
230 if (RidCount >= 8)
231 return;
232
235 RidCount + 1);
236
237 for (
i = 0;
i < (
ULONG)RidCount;
i++)
238 {
242 }
243
246}
Referenced by BuildUserInfoBuffer().
◆ GetAccountDomainSid()
Definition at line 23 of file utils.c.
25{
31
33
37 &PolicyHandle);
39 {
40 ERR(
"LsaOpenPolicy failed (Status %08lx)\n",
Status);
42 }
43
46 (
PVOID *)&AccountDomainInfo);
48 {
49 ERR(
"LsaQueryInformationPolicy failed (Status %08lx)\n",
Status);
50 goto done;
51 }
52
54
57 {
58 ERR(
"Failed to allocate SID\n");
60 goto done;
61 }
62
64
65done:
66 if (AccountDomainInfo !=
NULL)
68
70
72}
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
NTSTATUS WINAPI LsaOpenPolicy(IN PLSA_UNICODE_STRING SystemName OPTIONAL, IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
NTSTATUS WINAPI LsaQueryInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
NTSTATUS WINAPI LsaFreeMemory(IN PVOID Buffer)
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
#define memcpy(s1, s2, n)
NTSYSAPI ULONG NTAPI RtlLengthSid(IN PSID Sid)
_In_ ULONG _In_ ULONG _In_ ULONG Length
@ PolicyAccountDomainInformation
#define POLICY_VIEW_LOCAL_INFORMATION
#define STATUS_INSUFFICIENT_RESOURCES
Referenced by OpenAccountDomain().
◆ GetBuiltinDomainSid()
Definition at line 76 of file utils.c.
77{
81
83
85 0,
89
92 1);
94 goto done;
95
98
100
101done:
103 {
106 }
107
109}
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
static SID_IDENTIFIER_AUTHORITY NtAuthority
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
#define SECURITY_BUILTIN_DOMAIN_RID
Referenced by NetUserEnum(), NetUserGetInfo(), and OpenBuiltinDomain().
◆ OpenAccountDomain()
Definition at line 113 of file utils.c.
117{
120
122 &DomainSid);
124 {
125 ERR(
"GetAccountDomainSid failed (Status %08lx)\n",
Status);
127 }
128
131 DomainSid,
132 DomainHandle);
133
135
137 {
138 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
139 }
140
142}
NTSTATUS GetAccountDomainSid(IN PUNICODE_STRING ServerName, OUT PSID *AccountDomainSid)
NTSTATUS NTAPI SamOpenDomain(IN SAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT PSAM_HANDLE DomainHandle)
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Referenced by NetGetDisplayInformationIndex(), NetGroupAdd(), NetGroupAddUser(), NetGroupDel(), NetGroupDelUser(), NetGroupEnum(), NetGroupGetInfo(), NetGroupGetUsers(), NetGroupSetInfo(), NetGroupSetUsers(), NetLocalGroupAdd(), NetLocalGroupAddMembers(), NetLocalGroupDel(), NetLocalGroupDelMembers(), NetLocalGroupEnum(), NetLocalGroupGetInfo(), NetLocalGroupGetMembers(), NetLocalGroupSetInfo(), NetQueryDisplayInformation(), NetUserAdd(), NetUserDel(), and NetUserSetInfo().
◆ OpenBuiltinDomain()
Definition at line 146 of file utils.c.
149{
152
155 {
156 ERR(
"GetBuiltinDomainSid failed (Status %08lx)\n",
Status);
158 }
159
162 DomainSid,
163 DomainHandle);
164
166
168 {
169 ERR(
"SamOpenDomain failed (Status %08lx)\n",
Status);
170 }
171
173}
NTSTATUS GetBuiltinDomainSid(OUT PSID *BuiltinDomainSid)
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
netapi32 |
| ) |
|
◆ NtAuthority