mirror of
https://github.com/reactos/reactos.git
synced 2024-08-23 11:52:51 +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)
|
||||||
|
{
|
||||||
|
if (ApiStatus != NERR_Success)
|
||||||
|
SamDeleteAlias(AliasHandle);
|
||||||
|
else
|
||||||
SamCloseHandle(AliasHandle);
|
SamCloseHandle(AliasHandle);
|
||||||
|
}
|
||||||
|
|
||||||
if (DomainHandle != NULL)
|
if (DomainHandle != NULL)
|
||||||
SamCloseHandle(DomainHandle);
|
SamCloseHandle(DomainHandle);
|
||||||
|
|
|
@ -2692,6 +2692,9 @@ 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);
|
||||||
|
if (Status == STATUS_NONE_MAPPED)
|
||||||
|
ApiStatus = NERR_UserNotFound;
|
||||||
|
else
|
||||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -2846,6 +2849,9 @@ 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);
|
||||||
|
if (Status == STATUS_NONE_MAPPED)
|
||||||
|
ApiStatus = NERR_UserNotFound;
|
||||||
|
else
|
||||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
@ -3029,6 +3035,9 @@ 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);
|
||||||
|
if (Status == STATUS_NONE_MAPPED)
|
||||||
|
ApiStatus = NERR_UserNotFound;
|
||||||
|
else
|
||||||
ApiStatus = NetpNtStatusToApiStatus(Status);
|
ApiStatus = NetpNtStatusToApiStatus(Status);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue