mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[NETAPI32]
- NetLocalGroupAdd: Delete the newly created alias if setting alias information fails. - NetUserGetGroups, NetUserGetInfo and NetUserGetLocalGroups: Return NERR_UserNotFound if no matching user was found. svn path=/trunk/; revision=60199
This commit is contained in:
parent
ac5205086d
commit
6d4f083d6f
2 changed files with 18 additions and 4 deletions
|
@ -468,7 +468,12 @@ NetLocalGroupAdd(
|
|||
|
||||
done:
|
||||
if (AliasHandle != NULL)
|
||||
SamCloseHandle(AliasHandle);
|
||||
{
|
||||
if (ApiStatus != NERR_Success)
|
||||
SamDeleteAlias(AliasHandle);
|
||||
else
|
||||
SamCloseHandle(AliasHandle);
|
||||
}
|
||||
|
||||
if (DomainHandle != NULL)
|
||||
SamCloseHandle(DomainHandle);
|
||||
|
|
|
@ -2692,7 +2692,10 @@ NetUserGetGroups(LPCWSTR servername,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ERR("SamLookupNamesInDomain failed (Status %08lx)\n", Status);
|
||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||
if (Status == STATUS_NONE_MAPPED)
|
||||
ApiStatus = NERR_UserNotFound;
|
||||
else
|
||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -2846,7 +2849,10 @@ NetUserGetInfo(LPCWSTR servername,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ERR("SamOpenDomain failed (Status %08lx)\n", Status);
|
||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||
if (Status == STATUS_NONE_MAPPED)
|
||||
ApiStatus = NERR_UserNotFound;
|
||||
else
|
||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -3029,7 +3035,10 @@ NetUserGetLocalGroups(LPCWSTR servername,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ERR("SamLookupNamesInDomain failed (Status %08lx)\n", Status);
|
||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||
if (Status == STATUS_NONE_MAPPED)
|
||||
ApiStatus = NERR_UserNotFound;
|
||||
else
|
||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue