Author: ekohl
Date: Tue Sep 16 10:32:04 2014
New Revision: 64169
URL:
http://svn.reactos.org/svn/reactos?rev=64169&view=rev
Log:
[SAMSRV]
SampRemoveUserFromAllGroups:
- Do not treat a STATUS_MEMBER_NOT_IN_GROUP, returned by SampRemoveMemberFromGroup, as
error but as success.
- Clear the Groups attribute at the end.
Modified:
trunk/reactos/dll/win32/samsrv/user.c
Modified: trunk/reactos/dll/win32/samsrv/user.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/user.c?re…
==============================================================================
--- trunk/reactos/dll/win32/samsrv/user.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/samsrv/user.c [iso-8859-1] Tue Sep 16 10:32:04 2014
@@ -361,6 +361,8 @@
Status = SampRemoveMemberFromGroup(GroupObject,
UserObject->RelativeId);
+ if (Status == STATUS_MEMBER_NOT_IN_GROUP)
+ Status = STATUS_SUCCESS;
SampCloseDbObject(GroupObject);
@@ -369,6 +371,13 @@
goto done;
}
}
+
+ /* Remove all groups from the Groups attribute */
+ Status = SampSetObjectAttribute(UserObject,
+ L"Groups",
+ REG_BINARY,
+ NULL,
+ 0);
done:
if (GroupsBuffer != NULL)