net: use netapi for rpc_sh_share_delete as well.
authorGünther Deschner <gd@samba.org>
Thu, 4 Sep 2008 13:46:21 +0000 (15:46 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 5 Sep 2008 10:35:11 +0000 (12:35 +0200)
Guenther
(This used to be commit b56ec0b9952dbad9f552c4be30eaae36faa9131c)

source3/utils/net_rpc.c

index f0a0f448b01eddce9cef966b72458fc560ed2bd9..904729073d36eae6ec726699e7edd2bd4966c5ed 100644 (file)
@@ -4675,21 +4675,12 @@ static NTSTATUS rpc_sh_share_delete(struct net_context *c,
                                    struct rpc_pipe_client *pipe_hnd,
                                    int argc, const char **argv)
 {
-       WERROR result;
-       NTSTATUS status;
-
        if (argc != 1) {
                d_fprintf(stderr, "usage: %s <share>\n", ctx->whoami);
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       status = rpccli_srvsvc_NetShareDel(pipe_hnd, mem_ctx,
-                                          pipe_hnd->desthost,
-                                          argv[0],
-                                          0,
-                                          &result);
-
-       return status;
+       return werror_to_ntstatus(W_ERROR(NetShareDel(pipe_hnd->desthost, argv[0], 0)));
 }
 
 static NTSTATUS rpc_sh_share_info(struct net_context *c,