mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 04:26:32 +00:00
[SAMSRV] Return correct status for existing groups and users
[NETAPI32] NetpNtStatusToApiStatus: Update accordingly This fixes net command output in PR #4096.
This commit is contained in:
parent
2ea30b2ed3
commit
cde6339155
2 changed files with 10 additions and 2 deletions
|
@ -301,6 +301,14 @@ NetpNtStatusToApiStatus(
|
|||
ApiStatus = NERR_BadUsername;
|
||||
break;
|
||||
|
||||
case STATUS_USER_EXISTS:
|
||||
ApiStatus = NERR_UserExists;
|
||||
break;
|
||||
|
||||
case STATUS_GROUP_EXISTS:
|
||||
ApiStatus = NERR_GroupExists;
|
||||
break;
|
||||
|
||||
case STATUS_PASSWORD_RESTRICTION:
|
||||
ApiStatus = NERR_PasswordTooShort;
|
||||
break;
|
||||
|
|
|
@ -157,7 +157,7 @@ SampCheckAccountNameInDomain(IN PSAM_DB_OBJECT DomainObject,
|
|||
if (Status == STATUS_SUCCESS)
|
||||
{
|
||||
SampRegCloseKey(&NamesKey);
|
||||
Status = STATUS_ALIAS_EXISTS;
|
||||
Status = STATUS_GROUP_EXISTS;
|
||||
}
|
||||
else if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
Status = STATUS_SUCCESS;
|
||||
|
@ -192,7 +192,7 @@ SampCheckAccountNameInDomain(IN PSAM_DB_OBJECT DomainObject,
|
|||
if (Status == STATUS_SUCCESS)
|
||||
{
|
||||
SampRegCloseKey(&NamesKey);
|
||||
Status = STATUS_ALIAS_EXISTS;
|
||||
Status = STATUS_USER_EXISTS;
|
||||
}
|
||||
else if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
Status = STATUS_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue