mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 02:43:09 +00:00
[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. svn path=/trunk/; revision=64169
This commit is contained in:
parent
0c86291749
commit
6342a92b28
1 changed files with 9 additions and 0 deletions
|
@ -361,6 +361,8 @@ SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject)
|
||||||
|
|
||||||
Status = SampRemoveMemberFromGroup(GroupObject,
|
Status = SampRemoveMemberFromGroup(GroupObject,
|
||||||
UserObject->RelativeId);
|
UserObject->RelativeId);
|
||||||
|
if (Status == STATUS_MEMBER_NOT_IN_GROUP)
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
SampCloseDbObject(GroupObject);
|
SampCloseDbObject(GroupObject);
|
||||||
|
|
||||||
|
@ -370,6 +372,13 @@ SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remove all groups from the Groups attribute */
|
||||||
|
Status = SampSetObjectAttribute(UserObject,
|
||||||
|
L"Groups",
|
||||||
|
REG_BINARY,
|
||||||
|
NULL,
|
||||||
|
0);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (GroupsBuffer != NULL)
|
if (GroupsBuffer != NULL)
|
||||||
midl_user_free(GroupsBuffer);
|
midl_user_free(GroupsBuffer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue