mirror of
https://github.com/reactos/reactos.git
synced 2024-09-12 22:02:18 +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
|
@ -468,7 +468,12 @@ NetLocalGroupAdd(
|
||||||
|
|
||||||
done:
|
done:
|
||||||
if (AliasHandle != NULL)
|
if (AliasHandle != NULL)
|
||||||
SamCloseHandle(AliasHandle);
|
{
|
||||||
|
if (ApiStatus != NERR_Success)
|
||||||
|
SamDeleteAlias(AliasHandle);
|
||||||
|
else
|
||||||
|
SamCloseHandle(AliasHandle);
|
||||||
|
}
|
||||||
|
|
||||||
if (DomainHandle != NULL)
|
if (DomainHandle != NULL)
|
||||||
SamCloseHandle(DomainHandle);
|
SamCloseHandle(DomainHandle);
|
||||||
|
|
|
@ -2692,7 +2692,10 @@ NetUserGetGroups(LPCWSTR servername,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ERR("SamLookupNamesInDomain failed (Status %08lx)\n", 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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2846,7 +2849,10 @@ NetUserGetInfo(LPCWSTR servername,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ERR("SamOpenDomain failed (Status %08lx)\n", 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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3029,7 +3035,10 @@ NetUserGetLocalGroups(LPCWSTR servername,
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ERR("SamLookupNamesInDomain failed (Status %08lx)\n", 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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue