diff options
author | Günther Deschner <gd@samba.org> | 2008-06-11 01:23:43 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-06-13 23:39:08 +0200 |
commit | 26694e6fa09a024371276df5ceb0f58ce947e906 (patch) | |
tree | e8b6fe7caea3196ce66350403b3be0013829d70d /source3/utils | |
parent | 1bc1b1ac0af4baef266e3f9ea9adb7d8d252cc03 (diff) | |
download | samba-26694e6fa09a024371276df5ceb0f58ce947e906.tar.gz samba-26694e6fa09a024371276df5ceb0f58ce947e906.tar.bz2 samba-26694e6fa09a024371276df5ceb0f58ce947e906.zip |
net_vampire: let dump_database() return NTSTATUS.
Guenther
(This used to be commit b5a0e2d18f8d5c98326fefbda5972c02f898ed82)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 44c95f9509..323f67cc5a 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -324,12 +324,12 @@ static void display_sam_entry(struct netr_DELTA_ENUM *r) } } -static void dump_database(struct rpc_pipe_client *pipe_hnd, - enum netr_SamDatabaseID database_id) +static NTSTATUS dump_database(struct rpc_pipe_client *pipe_hnd, + enum netr_SamDatabaseID database_id) { - NTSTATUS result; + NTSTATUS result; int i; - TALLOC_CTX *mem_ctx; + TALLOC_CTX *mem_ctx; const char *logon_server = pipe_hnd->desthost; const char *computername = global_myname(); struct netr_Authenticator credential; @@ -341,7 +341,7 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd, ZERO_STRUCT(return_authenticator); if (!(mem_ctx = talloc_init("dump_database"))) { - return; + return NT_STATUS_NO_MEMORY; } switch(database_id) { @@ -380,7 +380,7 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd, if (!netlogon_creds_client_check(pipe_hnd->dc, &return_authenticator.cred)) { DEBUG(0,("credentials chain check failed\n")); - return; + return NT_STATUS_ACCESS_DENIED; } if (NT_STATUS_IS_ERR(result)) { @@ -405,6 +405,8 @@ static void dump_database(struct rpc_pipe_client *pipe_hnd, } while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)); talloc_destroy(mem_ctx); + + return result; } /* dump sam database via samsync rpc calls */ |