Author: ekohl
Date: Tue Sep 17 20:37:47 2013
New Revision: 60184
URL:
http://svn.reactos.org/svn/reactos?rev=60184&view=rev
Log:
[NETAPI32]
NetuserAdd: Delete the newly create user account if user information could not be set.
Modified:
trunk/reactos/dll/win32/netapi32/user.c
Modified: trunk/reactos/dll/win32/netapi32/user.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/user.c?…
==============================================================================
--- trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/user.c [iso-8859-1] Tue Sep 17 20:37:47 2013
@@ -2096,7 +2096,12 @@
done:
if (UserHandle != NULL)
- SamCloseHandle(UserHandle);
+ {
+ if (ApiStatus != NERR_Success)
+ SamDeleteUser(UserHandle);
+ else
+ SamCloseHandle(UserHandle);
+ }
if (DomainHandle != NULL)
SamCloseHandle(DomainHandle);