ReactOS  0.4.14-dev-1233-gf5658fd
user.c File Reference
#include "samsrv.h"
Include dependency graph for user.c:

Go to the source code of this file.

Functions

NTSTATUS SampOpenUserObject (IN PSAM_DB_OBJECT DomainObject, IN ULONG UserId, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *UserObject)
 
NTSTATUS SampAddGroupMembershipToUser (IN PSAM_DB_OBJECT UserObject, IN ULONG GroupId, IN ULONG Attributes)
 
NTSTATUS SampRemoveGroupMembershipFromUser (IN PSAM_DB_OBJECT UserObject, IN ULONG GroupId)
 
NTSTATUS SampGetUserGroupAttributes (IN PSAM_DB_OBJECT DomainObject, IN ULONG UserId, IN ULONG GroupId, OUT PULONG GroupAttributes)
 
NTSTATUS SampSetUserGroupAttributes (IN PSAM_DB_OBJECT DomainObject, IN ULONG UserId, IN ULONG GroupId, IN ULONG GroupAttributes)
 
NTSTATUS SampRemoveUserFromAllGroups (IN PSAM_DB_OBJECT UserObject)
 
NTSTATUS SampRemoveUserFromAllAliases (IN PSAM_DB_OBJECT UserObject)
 
NTSTATUS SampSetUserPassword (IN PSAM_DB_OBJECT UserObject, IN PENCRYPTED_NT_OWF_PASSWORD NtPassword, IN BOOLEAN NtPasswordPresent, IN PENCRYPTED_LM_OWF_PASSWORD LmPassword, IN BOOLEAN LmPasswordPresent)
 
NTSTATUS SampGetLogonHoursAttribute (IN PSAM_DB_OBJECT UserObject, IN OUT PSAMPR_LOGON_HOURS LogonHours)
 
NTSTATUS SampSetLogonHoursAttribute (IN PSAM_DB_OBJECT UserObject, IN PSAMPR_LOGON_HOURS LogonHours)
 

Function Documentation

◆ SampAddGroupMembershipToUser()

NTSTATUS SampAddGroupMembershipToUser ( IN PSAM_DB_OBJECT  UserObject,
IN ULONG  GroupId,
IN ULONG  Attributes 
)

Definition at line 39 of file user.c.

42 {
43  PGROUP_MEMBERSHIP GroupsBuffer = NULL;
44  ULONG GroupsCount = 0;
45  ULONG Length = 0;
46  ULONG i;
48 
49  TRACE("(%p %lu %lx)\n",
50  UserObject, GroupId, Attributes);
51 
52  Status = SampGetObjectAttribute(UserObject,
53  L"Groups",
54  NULL,
55  NULL,
56  &Length);
58  goto done;
59 
60  GroupsBuffer = midl_user_allocate(Length + sizeof(GROUP_MEMBERSHIP));
61  if (GroupsBuffer == NULL)
62  {
64  goto done;
65  }
66 
68  {
69  Status = SampGetObjectAttribute(UserObject,
70  L"Groups",
71  NULL,
72  GroupsBuffer,
73  &Length);
74  if (!NT_SUCCESS(Status))
75  goto done;
76 
77  GroupsCount = Length / sizeof(GROUP_MEMBERSHIP);
78  }
79 
80  for (i = 0; i < GroupsCount; i++)
81  {
82  if (GroupsBuffer[i].RelativeId == GroupId)
83  {
85  goto done;
86  }
87  }
88 
89  GroupsBuffer[GroupsCount].RelativeId = GroupId;
90  GroupsBuffer[GroupsCount].Attributes = Attributes;
91  Length += sizeof(GROUP_MEMBERSHIP);
92 
93  Status = SampSetObjectAttribute(UserObject,
94  L"Groups",
95  REG_BINARY,
96  GroupsBuffer,
97  Length);
98 
99 done:
100  if (GroupsBuffer != NULL)
101  midl_user_free(GroupsBuffer);
102 
103  return Status;
104 }
ULONG Attributes
Definition: ntsam.h:469
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
ULONG RelativeId
Definition: ntsam.h:468
#define REG_BINARY
Definition: nt_native.h:1496
#define midl_user_allocate
Definition: rpc.h:44
NTSTATUS SampSetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, ULONG AttributeType, LPVOID AttributeData, ULONG AttributeSize)
Definition: database.c:499
LONG NTSTATUS
Definition: precomp.h:26
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define STATUS_MEMBER_IN_GROUP
Definition: ntstatus.h:325
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS SampGetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, PULONG AttributeType, LPVOID AttributeData, PULONG AttributeSize)
Definition: database.c:514
static const WCHAR L[]
Definition: oid.c:1250
struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
Status
Definition: gdiplustypes.h:24
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149
unsigned int ULONG
Definition: retypes.h:1

Referenced by SamrAddMemberToGroup().

◆ SampGetLogonHoursAttribute()

NTSTATUS SampGetLogonHoursAttribute ( IN PSAM_DB_OBJECT  UserObject,
IN OUT PSAMPR_LOGON_HOURS  LogonHours 
)

Definition at line 619 of file user.c.

621 {
622  PUCHAR RawBuffer = NULL;
623  ULONG Length = 0;
624  ULONG BufferLength = 0;
626 
627  Status = SampGetObjectAttribute(UserObject,
628  L"LogonHours",
629  NULL,
630  NULL,
631  &Length);
633  {
634  TRACE("SampGetObjectAttribute failed (Status 0x%08lx)\n", Status);
635  return Status;
636  }
637 
639 
640  if (Length == 0)
641  {
642  LogonHours->UnitsPerWeek = 0;
643  LogonHours->LogonHours = NULL;
644  }
645  else
646  {
647  RawBuffer = midl_user_allocate(Length);
648  if (RawBuffer == NULL)
649  {
651  goto done;
652  }
653 
654  Status = SampGetObjectAttribute(UserObject,
655  L"LogonHours",
656  NULL,
657  (PVOID)RawBuffer,
658  &Length);
659  if (!NT_SUCCESS(Status))
660  goto done;
661 
662  LogonHours->UnitsPerWeek = *((PUSHORT)RawBuffer);
663 
664  BufferLength = (((ULONG)LogonHours->UnitsPerWeek) + 7) / 8;
665 
666  LogonHours->LogonHours = midl_user_allocate(BufferLength);
667  if (LogonHours->LogonHours == NULL)
668  {
669  TRACE("Failed to allocate LogonHours buffer!\n");
671  goto done;
672  }
673 
674  memcpy(LogonHours->LogonHours,
675  &(RawBuffer[2]),
676  BufferLength);
677  }
678 
679 done:
680 
681  if (RawBuffer != NULL)
682  midl_user_free(RawBuffer);
683 
684  return Status;
685 }
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define midl_user_allocate
Definition: rpc.h:44
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG BufferLength
Definition: usbdlib.h:225
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS SampGetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, PULONG AttributeType, LPVOID AttributeData, PULONG AttributeSize)
Definition: database.c:514
static const WCHAR L[]
Definition: oid.c:1250
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
Status
Definition: gdiplustypes.h:24
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
unsigned int ULONG
Definition: retypes.h:1
return STATUS_SUCCESS
Definition: btrfs.c:2938
unsigned short * PUSHORT
Definition: retypes.h:2

Referenced by SampQueryUserAccount(), SampQueryUserAll(), SampQueryUserLogon(), and SampQueryUserLogonHours().

◆ SampGetUserGroupAttributes()

NTSTATUS SampGetUserGroupAttributes ( IN PSAM_DB_OBJECT  DomainObject,
IN ULONG  UserId,
IN ULONG  GroupId,
OUT PULONG  GroupAttributes 
)

Definition at line 183 of file user.c.

187 {
188  PSAM_DB_OBJECT UserObject = NULL;
189  PGROUP_MEMBERSHIP GroupsBuffer = NULL;
190  ULONG Length = 0;
191  ULONG i;
193 
194  Status = SampOpenUserObject(DomainObject,
195  UserId,
196  0,
197  &UserObject);
198  if (!NT_SUCCESS(Status))
199  {
200  return Status;
201  }
202 
203  SampGetObjectAttribute(UserObject,
204  L"Groups",
205  NULL,
206  NULL,
207  &Length);
208 
209  if (Length == 0)
210  return STATUS_UNSUCCESSFUL; /* FIXME */
211 
212  GroupsBuffer = midl_user_allocate(Length);
213  if (GroupsBuffer == NULL)
214  {
216  goto done;
217  }
218 
219  Status = SampGetObjectAttribute(UserObject,
220  L"Groups",
221  NULL,
222  GroupsBuffer,
223  &Length);
224  if (!NT_SUCCESS(Status))
225  goto done;
226 
227  for (i = 0; i < (Length / sizeof(GROUP_MEMBERSHIP)); i++)
228  {
229  if (GroupsBuffer[i].RelativeId == GroupId)
230  {
231  *GroupAttributes = GroupsBuffer[i].Attributes;
232  goto done;
233  }
234  }
235 
236 done:
237  if (GroupsBuffer != NULL)
238  midl_user_free(GroupsBuffer);
239 
240  if (UserObject != NULL)
241  SampCloseDbObject(UserObject);
242 
243  return Status;
244 }
ULONG Attributes
Definition: ntsam.h:469
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define midl_user_allocate
Definition: rpc.h:44
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS SampOpenUserObject(IN PSAM_DB_OBJECT DomainObject, IN ULONG UserId, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *UserObject)
Definition: user.c:14
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
NTSTATUS SampCloseDbObject(PSAM_DB_OBJECT DbObject)
Definition: database.c:344
NTSTATUS SampGetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, PULONG AttributeType, LPVOID AttributeData, PULONG AttributeSize)
Definition: database.c:514
static const WCHAR L[]
Definition: oid.c:1250
struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
Status
Definition: gdiplustypes.h:24
unsigned int ULONG
Definition: retypes.h:1

Referenced by SamrGetMembersInGroup().

◆ SampOpenUserObject()

NTSTATUS SampOpenUserObject ( IN PSAM_DB_OBJECT  DomainObject,
IN ULONG  UserId,
IN ACCESS_MASK  DesiredAccess,
OUT PSAM_DB_OBJECT UserObject 
)

Definition at line 14 of file user.c.

18 {
19  WCHAR szRid[9];
20 
21  TRACE("(%p %lu %lx %p)\n",
22  DomainObject, UserId, DesiredAccess, UserObject);
23 
24  /* Convert the RID into a string (hex) */
25  swprintf(szRid, L"%08lX", UserId);
26 
27  /* Create the user object */
28  return SampOpenDbObject(DomainObject,
29  L"Users",
30  szRid,
31  UserId,
34  UserObject);
35 }
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define swprintf(buf, format,...)
Definition: sprintf.c:56
static const WCHAR L[]
Definition: oid.c:1250
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
NTSTATUS SampOpenDbObject(IN PSAM_DB_OBJECT ParentObject, IN LPWSTR ContainerName, IN LPWSTR ObjectName, IN ULONG RelativeId, IN SAM_DB_OBJECT_TYPE ObjectType, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *DbObject)
Definition: database.c:171

Referenced by SampGetUserGroupAttributes(), SampSetUserGroupAttributes(), SamrAddMemberToGroup(), and SamrRemoveMemberFromGroup().

◆ SampRemoveGroupMembershipFromUser()

NTSTATUS SampRemoveGroupMembershipFromUser ( IN PSAM_DB_OBJECT  UserObject,
IN ULONG  GroupId 
)

Definition at line 108 of file user.c.

110 {
111  PGROUP_MEMBERSHIP GroupsBuffer = NULL;
112  ULONG GroupsCount = 0;
113  ULONG Length = 0;
114  ULONG i;
116 
117  TRACE("(%p %lu)\n",
118  UserObject, GroupId);
119 
120  SampGetObjectAttribute(UserObject,
121  L"Groups",
122  NULL,
123  NULL,
124  &Length);
125 
126  if (Length == 0)
128 
129  GroupsBuffer = midl_user_allocate(Length);
130  if (GroupsBuffer == NULL)
131  {
133  goto done;
134  }
135 
136  Status = SampGetObjectAttribute(UserObject,
137  L"Groups",
138  NULL,
139  GroupsBuffer,
140  &Length);
141  if (!NT_SUCCESS(Status))
142  goto done;
143 
145 
146  GroupsCount = Length / sizeof(GROUP_MEMBERSHIP);
147  for (i = 0; i < GroupsCount; i++)
148  {
149  if (GroupsBuffer[i].RelativeId == GroupId)
150  {
151  Length -= sizeof(GROUP_MEMBERSHIP);
153 
154  if (GroupsCount - i - 1 > 0)
155  {
156  CopyMemory(&GroupsBuffer[i],
157  &GroupsBuffer[i + 1],
158  (GroupsCount - i - 1) * sizeof(GROUP_MEMBERSHIP));
159  }
160 
161  break;
162  }
163  }
164 
165  if (!NT_SUCCESS(Status))
166  goto done;
167 
168  Status = SampSetObjectAttribute(UserObject,
169  L"Groups",
170  REG_BINARY,
171  GroupsBuffer,
172  Length);
173 
174 done:
175  if (GroupsBuffer != NULL)
176  midl_user_free(GroupsBuffer);
177 
178  return Status;
179 }
#define STATUS_MEMBER_NOT_IN_GROUP
Definition: ntstatus.h:326
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define REG_BINARY
Definition: nt_native.h:1496
#define midl_user_allocate
Definition: rpc.h:44
NTSTATUS SampSetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, ULONG AttributeType, LPVOID AttributeData, ULONG AttributeSize)
Definition: database.c:499
LONG NTSTATUS
Definition: precomp.h:26
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define CopyMemory
Definition: winbase.h:1646
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS SampGetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, PULONG AttributeType, LPVOID AttributeData, PULONG AttributeSize)
Definition: database.c:514
static const WCHAR L[]
Definition: oid.c:1250
struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
Status
Definition: gdiplustypes.h:24
unsigned int ULONG
Definition: retypes.h:1
return STATUS_SUCCESS
Definition: btrfs.c:2938

Referenced by SamrRemoveMemberFromGroup().

◆ SampRemoveUserFromAllAliases()

NTSTATUS SampRemoveUserFromAllAliases ( IN PSAM_DB_OBJECT  UserObject)

Definition at line 391 of file user.c.

392 {
393  FIXME("(%p)\n", UserObject);
394  return STATUS_SUCCESS;
395 }
#define FIXME(fmt,...)
Definition: debug.h:110
return STATUS_SUCCESS
Definition: btrfs.c:2938

Referenced by SamrDeleteUser().

◆ SampRemoveUserFromAllGroups()

NTSTATUS SampRemoveUserFromAllGroups ( IN PSAM_DB_OBJECT  UserObject)

Definition at line 319 of file user.c.

320 {
321  PGROUP_MEMBERSHIP GroupsBuffer = NULL;
322  PSAM_DB_OBJECT GroupObject;
323  ULONG Length = 0;
324  ULONG i;
326 
327  SampGetObjectAttribute(UserObject,
328  L"Groups",
329  NULL,
330  NULL,
331  &Length);
332 
333  if (Length == 0)
334  return STATUS_SUCCESS;
335 
336  GroupsBuffer = midl_user_allocate(Length);
337  if (GroupsBuffer == NULL)
338  {
340  goto done;
341  }
342 
343  Status = SampGetObjectAttribute(UserObject,
344  L"Groups",
345  NULL,
346  GroupsBuffer,
347  &Length);
348  if (!NT_SUCCESS(Status))
349  goto done;
350 
351  for (i = 0; i < (Length / sizeof(GROUP_MEMBERSHIP)); i++)
352  {
353  Status = SampOpenGroupObject(UserObject->ParentObject,
354  GroupsBuffer[i].RelativeId,
355  0,
356  &GroupObject);
357  if (!NT_SUCCESS(Status))
358  {
359  goto done;
360  }
361 
362  Status = SampRemoveMemberFromGroup(GroupObject,
363  UserObject->RelativeId);
366 
367  SampCloseDbObject(GroupObject);
368 
369  if (!NT_SUCCESS(Status))
370  {
371  goto done;
372  }
373  }
374 
375  /* Remove all groups from the Groups attribute */
376  Status = SampSetObjectAttribute(UserObject,
377  L"Groups",
378  REG_BINARY,
379  NULL,
380  0);
381 
382 done:
383  if (GroupsBuffer != NULL)
384  midl_user_free(GroupsBuffer);
385 
386  return Status;
387 }
#define STATUS_MEMBER_NOT_IN_GROUP
Definition: ntstatus.h:326
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define REG_BINARY
Definition: nt_native.h:1496
#define midl_user_allocate
Definition: rpc.h:44
NTSTATUS SampSetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, ULONG AttributeType, LPVOID AttributeData, ULONG AttributeSize)
Definition: database.c:499
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS SampRemoveMemberFromGroup(IN PSAM_DB_OBJECT GroupObject, IN ULONG MemberId)
Definition: group.c:103
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
Definition: glfuncs.h:248
NTSTATUS SampOpenGroupObject(IN PSAM_DB_OBJECT DomainObject, IN ULONG GroupId, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *GroupObject)
Definition: group.c:14
smooth NULL
Definition: ftsmooth.c:416
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS SampCloseDbObject(PSAM_DB_OBJECT DbObject)
Definition: database.c:344
NTSTATUS SampGetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, PULONG AttributeType, LPVOID AttributeData, PULONG AttributeSize)
Definition: database.c:514
static const WCHAR L[]
Definition: oid.c:1250
struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
Status
Definition: gdiplustypes.h:24
unsigned int ULONG
Definition: retypes.h:1
return STATUS_SUCCESS
Definition: btrfs.c:2938

Referenced by SamrDeleteUser().

◆ SampSetLogonHoursAttribute()

NTSTATUS SampSetLogonHoursAttribute ( IN PSAM_DB_OBJECT  UserObject,
IN PSAMPR_LOGON_HOURS  LogonHours 
)

Definition at line 689 of file user.c.

691 {
692  PUCHAR RawBuffer = NULL;
694  ULONG Length = 0;
696 
697  if (LogonHours->UnitsPerWeek > 0)
698  {
699  BufferLength = (((ULONG)LogonHours->UnitsPerWeek) + 7) / 8;
700 
701  Length = BufferLength + sizeof(USHORT);
702 
703  RawBuffer = midl_user_allocate(Length);
704  if (RawBuffer == NULL)
705  {
707  goto done;
708  }
709 
710  *((PUSHORT)RawBuffer) = LogonHours->UnitsPerWeek;
711 
712  memcpy(&(RawBuffer[2]),
713  LogonHours->LogonHours,
714  BufferLength);
715  }
716 
717  Status = SampSetObjectAttribute(UserObject,
718  L"LogonHours",
719  REG_BINARY,
720  RawBuffer,
721  Length);
722 
723 done:
724  if (RawBuffer != NULL)
725  midl_user_free(RawBuffer);
726 
727  return Status;
728 }
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define REG_BINARY
Definition: nt_native.h:1496
#define midl_user_allocate
Definition: rpc.h:44
NTSTATUS SampSetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, ULONG AttributeType, LPVOID AttributeData, ULONG AttributeSize)
Definition: database.c:499
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG BufferLength
Definition: usbdlib.h:225
smooth NULL
Definition: ftsmooth.c:416
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
static const WCHAR L[]
Definition: oid.c:1250
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
Status
Definition: gdiplustypes.h:24
unsigned short USHORT
Definition: pedump.c:61
unsigned int ULONG
Definition: retypes.h:1
unsigned short * PUSHORT
Definition: retypes.h:2

Referenced by SampSetUserAll(), and SamrSetInformationUser().

◆ SampSetUserGroupAttributes()

NTSTATUS SampSetUserGroupAttributes ( IN PSAM_DB_OBJECT  DomainObject,
IN ULONG  UserId,
IN ULONG  GroupId,
IN ULONG  GroupAttributes 
)

Definition at line 248 of file user.c.

252 {
253  PSAM_DB_OBJECT UserObject = NULL;
254  PGROUP_MEMBERSHIP GroupsBuffer = NULL;
255  ULONG Length = 0;
256  ULONG i;
258 
259  Status = SampOpenUserObject(DomainObject,
260  UserId,
261  0,
262  &UserObject);
263  if (!NT_SUCCESS(Status))
264  {
265  return Status;
266  }
267 
268  SampGetObjectAttribute(UserObject,
269  L"Groups",
270  NULL,
271  NULL,
272  &Length);
273 
274  if (Length == 0)
275  return STATUS_UNSUCCESSFUL; /* FIXME */
276 
277  GroupsBuffer = midl_user_allocate(Length);
278  if (GroupsBuffer == NULL)
279  {
281  goto done;
282  }
283 
284  Status = SampGetObjectAttribute(UserObject,
285  L"Groups",
286  NULL,
287  GroupsBuffer,
288  &Length);
289  if (!NT_SUCCESS(Status))
290  goto done;
291 
292  for (i = 0; i < (Length / sizeof(GROUP_MEMBERSHIP)); i++)
293  {
294  if (GroupsBuffer[i].RelativeId == GroupId)
295  {
296  GroupsBuffer[i].Attributes = GroupAttributes;
297  break;
298  }
299  }
300 
301  Status = SampSetObjectAttribute(UserObject,
302  L"Groups",
303  REG_BINARY,
304  GroupsBuffer,
305  Length);
306 
307 done:
308  if (GroupsBuffer != NULL)
309  midl_user_free(GroupsBuffer);
310 
311  if (UserObject != NULL)
312  SampCloseDbObject(UserObject);
313 
314  return Status;
315 }
ULONG Attributes
Definition: ntsam.h:469
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define REG_BINARY
Definition: nt_native.h:1496
#define midl_user_allocate
Definition: rpc.h:44
NTSTATUS SampSetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, ULONG AttributeType, LPVOID AttributeData, ULONG AttributeSize)
Definition: database.c:499
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS SampOpenUserObject(IN PSAM_DB_OBJECT DomainObject, IN ULONG UserId, IN ACCESS_MASK DesiredAccess, OUT PSAM_DB_OBJECT *UserObject)
Definition: user.c:14
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
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
NTSTATUS SampCloseDbObject(PSAM_DB_OBJECT DbObject)
Definition: database.c:344
NTSTATUS SampGetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, PULONG AttributeType, LPVOID AttributeData, PULONG AttributeSize)
Definition: database.c:514
static const WCHAR L[]
Definition: oid.c:1250
struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
Status
Definition: gdiplustypes.h:24
unsigned int ULONG
Definition: retypes.h:1

Referenced by SamrSetMemberAttributesOfGroup().

◆ SampSetUserPassword()

NTSTATUS SampSetUserPassword ( IN PSAM_DB_OBJECT  UserObject,
IN PENCRYPTED_NT_OWF_PASSWORD  NtPassword,
IN BOOLEAN  NtPasswordPresent,
IN PENCRYPTED_LM_OWF_PASSWORD  LmPassword,
IN BOOLEAN  LmPasswordPresent 
)

Definition at line 399 of file user.c.

404 {
405  PENCRYPTED_NT_OWF_PASSWORD NtHistory = NULL;
406  PENCRYPTED_LM_OWF_PASSWORD LmHistory = NULL;
407  ULONG NtHistoryLength = 0;
408  ULONG LmHistoryLength = 0;
409  ULONG CurrentHistoryLength;
410  ULONG MaxHistoryLength = 3;
411  ULONG Length = 0;
412  BOOLEAN UseNtPassword;
413  BOOLEAN UseLmPassword;
415 
416  UseNtPassword =
417  ((NtPasswordPresent != FALSE) &&
418  (NtPassword != NULL) &&
419  (memcmp(NtPassword, &EmptyNtHash, sizeof(ENCRYPTED_NT_OWF_PASSWORD)) != 0));
420 
421  UseLmPassword =
422  ((LmPasswordPresent != FALSE) &&
423  (LmPassword != NULL) &&
424  (memcmp(LmPassword, &EmptyLmHash, sizeof(ENCRYPTED_LM_OWF_PASSWORD)) != 0));
425 
426  /* Update the NT password history only if we have a new non-empty NT password */
427  if (UseNtPassword)
428  {
429  /* Get the size of the NT history */
430  SampGetObjectAttribute(UserObject,
431  L"NTPwdHistory",
432  NULL,
433  NULL,
434  &Length);
435 
436  CurrentHistoryLength = Length / sizeof(ENCRYPTED_NT_OWF_PASSWORD);
437  if (CurrentHistoryLength < MaxHistoryLength)
438  {
439  NtHistoryLength = (CurrentHistoryLength + 1) * sizeof(ENCRYPTED_NT_OWF_PASSWORD);
440  }
441  else
442  {
443  NtHistoryLength = MaxHistoryLength * sizeof(ENCRYPTED_NT_OWF_PASSWORD);
444  }
445 
446  /* Allocate the history buffer */
447  NtHistory = midl_user_allocate(NtHistoryLength);
448  if (NtHistory == NULL)
450 
451  if (Length > 0)
452  {
453  /* Get the history */
454  Status = SampGetObjectAttribute(UserObject,
455  L"NTPwdHistory",
456  NULL,
457  NtHistory,
458  &Length);
459  if (!NT_SUCCESS(Status))
460  goto done;
461  }
462 
463  /* Move the old passwords down by one entry */
464  if (NtHistoryLength > sizeof(ENCRYPTED_NT_OWF_PASSWORD))
465  {
466  MoveMemory(&(NtHistory[1]),
467  &(NtHistory[0]),
468  NtHistoryLength - sizeof(ENCRYPTED_NT_OWF_PASSWORD));
469  }
470 
471  /* Add the new password to the top of the history */
472  if (NtPasswordPresent)
473  {
474  CopyMemory(&(NtHistory[0]),
475  NtPassword,
476  sizeof(ENCRYPTED_NT_OWF_PASSWORD));
477  }
478  else
479  {
480  ZeroMemory(&(NtHistory[0]),
481  sizeof(ENCRYPTED_NT_OWF_PASSWORD));
482  }
483 
484  /* Set the history */
485  Status = SampSetObjectAttribute(UserObject,
486  L"NTPwdHistory",
487  REG_BINARY,
488  (PVOID)NtHistory,
489  NtHistoryLength);
490  if (!NT_SUCCESS(Status))
491  goto done;
492  }
493 
494  /* Update the LM password history only if we have a new non-empty LM password */
495  if (UseLmPassword)
496  {
497  /* Get the size of the LM history */
498  Length = 0;
499  SampGetObjectAttribute(UserObject,
500  L"LMPwdHistory",
501  NULL,
502  NULL,
503  &Length);
504 
505  CurrentHistoryLength = Length / sizeof(ENCRYPTED_LM_OWF_PASSWORD);
506  if (CurrentHistoryLength < MaxHistoryLength)
507  {
508  LmHistoryLength = (CurrentHistoryLength + 1) * sizeof(ENCRYPTED_LM_OWF_PASSWORD);
509  }
510  else
511  {
512  LmHistoryLength = MaxHistoryLength * sizeof(ENCRYPTED_LM_OWF_PASSWORD);
513  }
514 
515  /* Allocate the history buffer */
516  LmHistory = midl_user_allocate(LmHistoryLength);
517  if (LmHistory == NULL)
519 
520  if (Length > 0)
521  {
522  /* Get the history */
523  Status = SampGetObjectAttribute(UserObject,
524  L"LMPwdHistory",
525  NULL,
526  LmHistory,
527  &Length);
528  if (!NT_SUCCESS(Status))
529  goto done;
530  }
531 
532  /* Move the old passwords down by one entry */
533  if (LmHistoryLength > sizeof(ENCRYPTED_LM_OWF_PASSWORD))
534  {
535  MoveMemory(&(LmHistory[1]),
536  &(LmHistory[0]),
537  LmHistoryLength - sizeof(ENCRYPTED_LM_OWF_PASSWORD));
538  }
539 
540  /* Add the new password to the top of the history */
541  if (LmPasswordPresent)
542  {
543  CopyMemory(&(LmHistory[0]),
544  LmPassword,
545  sizeof(ENCRYPTED_LM_OWF_PASSWORD));
546  }
547  else
548  {
549  ZeroMemory(&(LmHistory[0]),
550  sizeof(ENCRYPTED_LM_OWF_PASSWORD));
551  }
552 
553  /* Set the LM password history */
554  Status = SampSetObjectAttribute(UserObject,
555  L"LMPwdHistory",
556  REG_BINARY,
557  (PVOID)LmHistory,
558  LmHistoryLength);
559  if (!NT_SUCCESS(Status))
560  goto done;
561  }
562 
563  /* Set the new NT password */
564  if (UseNtPassword)
565  {
566  Status = SampSetObjectAttribute(UserObject,
567  L"NTPwd",
568  REG_BINARY,
569  (PVOID)NtPassword,
570  sizeof(ENCRYPTED_NT_OWF_PASSWORD));
571  if (!NT_SUCCESS(Status))
572  goto done;
573  }
574  else
575  {
576  Status = SampSetObjectAttribute(UserObject,
577  L"NTPwd",
578  REG_BINARY,
579  &EmptyNtHash,
580  sizeof(ENCRYPTED_NT_OWF_PASSWORD));
581  if (!NT_SUCCESS(Status))
582  goto done;
583  }
584 
585  /* Set the new LM password */
586  if (UseLmPassword)
587  {
588  Status = SampSetObjectAttribute(UserObject,
589  L"LMPwd",
590  REG_BINARY,
591  (PVOID)LmPassword,
592  sizeof(ENCRYPTED_LM_OWF_PASSWORD));
593  if (!NT_SUCCESS(Status))
594  goto done;
595  }
596  else
597  {
598  Status = SampSetObjectAttribute(UserObject,
599  L"LMPwd",
600  REG_BINARY,
601  &EmptyLmHash,
602  sizeof(ENCRYPTED_LM_OWF_PASSWORD));
603  if (!NT_SUCCESS(Status))
604  goto done;
605  }
606 
607 done:
608  if (NtHistory != NULL)
609  midl_user_free(NtHistory);
610 
611  if (LmHistory != NULL)
612  midl_user_free(LmHistory);
613 
614  return Status;
615 }
#define midl_user_free
Definition: rpc.h:45
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define REG_BINARY
Definition: nt_native.h:1496
#define midl_user_allocate
Definition: rpc.h:44
NTSTATUS SampSetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, ULONG AttributeType, LPVOID AttributeData, ULONG AttributeSize)
Definition: database.c:499
LONG NTSTATUS
Definition: precomp.h:26
#define ZeroMemory
Definition: winbase.h:1648
#define MoveMemory
Definition: winbase.h:1645
ENCRYPTED_NT_OWF_PASSWORD EmptyNtHash
Definition: samsrv.c:26
struct _ENCRYPTED_LM_OWF_PASSWORD ENCRYPTED_LM_OWF_PASSWORD
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define CopyMemory
Definition: winbase.h:1646
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS SampGetObjectAttribute(PSAM_DB_OBJECT DbObject, LPWSTR AttributeName, PULONG AttributeType, LPVOID AttributeData, PULONG AttributeSize)
Definition: database.c:514
static const WCHAR L[]
Definition: oid.c:1250
Status
Definition: gdiplustypes.h:24
ENCRYPTED_LM_OWF_PASSWORD EmptyLmHash
Definition: samsrv.c:27
struct _ENCRYPTED_LM_OWF_PASSWORD ENCRYPTED_NT_OWF_PASSWORD
unsigned int ULONG
Definition: retypes.h:1

Referenced by SampSetUserAll(), SampSetUserInternal1(), and SamrChangePasswordUser().