s3:rpcclient: remove unused code from cmd_lsa_get_username()
authorStefan Metzmacher <metze@samba.org>
Mon, 13 Jan 2014 09:18:02 +0000 (10:18 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 16 Jan 2014 15:22:52 +0000 (16:22 +0100)
lsa_GetUserName() doesn't require a policy handle.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/rpcclient/cmd_lsarpc.c

index 9117ce655976c240b2784424d48796f6ecf72f6c..a6c3280c2fe34b0c5f5cf8f8cc5e752fa1f0912d 100644 (file)
@@ -1469,7 +1469,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx, int argc,
                                      const char **argv)
 {
-       struct policy_handle pol;
        NTSTATUS status, result;
        const char *servername = cli->desthost;
        struct lsa_String *account_name = NULL;
@@ -1481,14 +1480,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
                return NT_STATUS_OK;
        }
 
-       status = rpccli_lsa_open_policy(cli, mem_ctx, true,
-                                       SEC_FLAG_MAXIMUM_ALLOWED,
-                                       &pol);
-
-       if (!NT_STATUS_IS_OK(status)) {
-               goto done;
-       }
-
        status = dcerpc_lsa_GetUserName(b, mem_ctx,
                                        servername,
                                        &account_name,
@@ -1508,7 +1499,6 @@ static NTSTATUS cmd_lsa_get_username(struct rpc_pipe_client *cli,
                account_name->string, authority_name ? authority_name->string :
                "");
 
-       dcerpc_lsa_Close(b, mem_ctx, &pol, &result);
  done:
        return status;
 }