summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-03-17 22:39:22 +0100
committerGünther Deschner <gd@samba.org>2011-03-18 10:23:21 +0100
commit4b6a9d96436ca96329a14e4f47fff74a892ba659 (patch)
tree932809aa7e22baa053285e0b8a151a27268e4450 /source4
parenta75818e382040019ff1c2a5202b5b355e0894425 (diff)
downloadsamba-4b6a9d96436ca96329a14e4f47fff74a892ba659.tar.gz
s4-libcli/rap: add smbcli_rap_netuserdelete().
Guenther (cherry picked from commit 980ceb2f708d00c13dd3f50cb00df17f1c593965)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/rap/rap.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/source4/libcli/rap/rap.c b/source4/libcli/rap/rap.c
index 1ad02346aa0..08b02787dcd 100644
--- a/source4/libcli/rap/rap.c
+++ b/source4/libcli/rap/rap.c
@@ -1528,3 +1528,48 @@ NTSTATUS smbcli_rap_netuseradd(struct smbcli_tree *tree,
talloc_free(call);
return result;
}
+
+NTSTATUS smbcli_rap_netuserdelete(struct smbcli_tree *tree,
+ TALLOC_CTX *mem_ctx,
+ struct rap_NetUserDelete *r)
+{
+ struct rap_call *call;
+ NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+
+ if (!(call = new_rap_cli_call(mem_ctx, RAP_WUserDel))) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ rap_cli_push_string(call, r->in.UserName);
+
+ rap_cli_expect_format(call, "");
+ rap_cli_expect_extra_format(call, "");
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_IN_DEBUG(rap_NetUserDelete, r);
+ }
+
+ result = rap_cli_do_call(tree, call);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ result = NT_STATUS_INVALID_PARAMETER;
+
+ NDR_GOTO(ndr_pull_rap_status(call->ndr_pull_param, NDR_SCALARS, &r->out.status));
+ NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.convert));
+
+ result = NT_STATUS_OK;
+
+ if (!NT_STATUS_IS_OK(result)) {
+ goto done;
+ }
+
+ if (DEBUGLEVEL >= 10) {
+ NDR_PRINT_OUT_DEBUG(rap_NetUserDelete, r);
+ }
+
+ done:
+ talloc_free(call);
+ return result;
+}