]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbcacls: In cli_lsa_lookup_domain_sid(), replace cli_state_save_tcon()/cli_state...
authorJeremy Allison <jra@samba.org>
Wed, 24 Aug 2022 00:37:48 +0000 (17:37 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 15 Sep 2022 18:43:32 +0000 (18:43 +0000)
There are now no more external users of cli_state_save_tcon()/cli_state_restore_tcon()
so we can make them static.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/utils/smbcacls.c

index 7ce7d2415dc5e4084505d215761e9d462c195bf4..d072d396887f0d09f425e9425c91b6e244faaf84 100644 (file)
@@ -109,17 +109,14 @@ static NTSTATUS cli_lsa_lookup_domain_sid(struct cli_state *cli,
 {
        union lsa_PolicyInformation *info = NULL;
        struct smbXcli_tcon *orig_tcon = NULL;
+       char *orig_share = NULL;
        struct rpc_pipe_client *rpc_pipe = NULL;
        struct policy_handle handle;
        NTSTATUS status, result;
        TALLOC_CTX *frame = talloc_stackframe();
 
        if (cli_state_has_tcon(cli)) {
-               orig_tcon = cli_state_save_tcon(cli);
-               if (orig_tcon == NULL) {
-                       status = NT_STATUS_NO_MEMORY;
-                       goto done;
-               }
+               cli_state_save_tcon_share(cli, &orig_tcon, &orig_share);
        }
 
        status = cli_tree_connect(cli, "IPC$", "?????", NULL);
@@ -153,7 +150,7 @@ tdis:
        TALLOC_FREE(rpc_pipe);
        cli_tdis(cli);
 done:
-       cli_state_restore_tcon(cli, orig_tcon);
+       cli_state_restore_tcon_share(cli, orig_tcon, orig_share);
        TALLOC_FREE(frame);
        return status;
 }