[SAMSRV]
authorEric Kohl <eric.kohl@reactos.org>
Sat, 16 Nov 2013 09:07:37 +0000 (09:07 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sat, 16 Nov 2013 09:07:37 +0000 (09:07 +0000)
SamrDeleteUser: Prepare the removal of a user from groups and aliases.

svn path=/trunk/; revision=61005

reactos/dll/win32/samsrv/samrpc.c
reactos/dll/win32/samsrv/samsrv.h
reactos/dll/win32/samsrv/user.c

index bb1b068..24f684d 100644 (file)
@@ -5427,9 +5427,21 @@ SamrDeleteUser(IN OUT SAMPR_HANDLE *UserHandle)
         goto done;
     }
 
-    /* FIXME: Remove the user from all groups */
+    /* Remove the user from all groups */
+    Status = SampRemoveUserFromAllGroups(UserObject);
+    if (!NT_SUCCESS(Status))
+    {
+        TRACE("SampRemoveUserFromAllGroups() failed (Status 0x%08lx)\n", Status);
+        goto done;
+    }
 
-    /* FIXME: Remove the user from all aliases */
+    /* Remove the user from all aliases */
+    Status = SampRemoveUserFromAllAliases(UserObject);
+    if (!NT_SUCCESS(Status))
+    {
+        TRACE("SampRemoveUserFromAllAliases() failed (Status 0x%08lx)\n", Status);
+        goto done;
+    }
 
     /* Delete the user from the database */
     Status = SampDeleteAccountDbObject(UserObject);
index c7767d7..ffd2617 100644 (file)
@@ -383,6 +383,9 @@ SampSetUserGroupAttributes(IN PSAM_DB_OBJECT DomainObject,
 NTSTATUS
 SampRemoveUserFromAllGroups(IN PSAM_DB_OBJECT UserObject);
 
+NTSTATUS
+SampRemoveUserFromAllAliases(IN PSAM_DB_OBJECT UserObject);
+
 NTSTATUS
 SampSetUserPassword(IN PSAM_DB_OBJECT UserObject,
                     IN PENCRYPTED_NT_OWF_PASSWORD NtPassword,
index 9c8a651..cd38732 100644 (file)
@@ -383,6 +383,14 @@ done:
 }
 
 
+NTSTATUS
+SampRemoveUserFromAllAliases(IN PSAM_DB_OBJECT UserObject)
+{
+    FIXME("(%p)\n", UserObject);
+    return STATUS_SUCCESS;
+}
+
+
 NTSTATUS
 SampSetUserPassword(IN PSAM_DB_OBJECT UserObject,
                     IN PENCRYPTED_NT_OWF_PASSWORD NtPassword,