From 02f8bfdb8e02b5ca0e10664dd451c02150b96cb7 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 11 Mar 2013 21:49:11 +0000 Subject: [PATCH] [SAMSRV] Implement SamrShutdownSamServer. svn path=/trunk/; revision=58473 --- reactos/dll/win32/samsrv/samrpc.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/samsrv/samrpc.c b/reactos/dll/win32/samsrv/samrpc.c index 83aa582b069..24892e596aa 100644 --- a/reactos/dll/win32/samsrv/samrpc.c +++ b/reactos/dll/win32/samsrv/samrpc.c @@ -205,8 +205,23 @@ NTSTATUS NTAPI SamrShutdownSamServer(IN SAMPR_HANDLE ServerHandle) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + PSAM_DB_OBJECT ServerObject; + NTSTATUS Status; + + TRACE("(%p)\n", ServerHandle); + + /* Validate the server handle */ + Status = SampValidateDbObject(ServerHandle, + SamDbServerObject, + SAM_SERVER_SHUTDOWN, + &ServerObject); + if (!NT_SUCCESS(Status)) + return Status; + + /* Shut the server down */ + RpcMgmtStopServerListening(0); + + return STATUS_SUCCESS; }