The branch, master has been updated
       via  b4ce96bdcd8 s3-client: Use the passed down memory context for 
cli_connect_nb()
       via  a5a6253775c s3:libsmb: Use a long living context for 
cli_resolve_path()
       via  959ea545fbd s3:libsmb: Add a talloc context to the internal data 
structure
       via  c306aa08eee s3:client: Use a long living memory context for 
cli_cm_open()
       via  27e6bcb1c2f s3:client: Pass down a talloc context to do_cd()
       via  23c52069e0c s3:client: Pass a talloc context down to cmd_*() 
functions
       via  61fe8c90792 s3:client: Pass down a talloc context to 
process_command_string()
       via  6c297006829 s3:client: Pass down a talloc context to do_tar_op()
       via  3175c50a231 s3:client: Pass down a talloc context to do_message_op()
       via  1ab135a9424 s3:client: Pass down a talloc context to do_host_query()
       via  99ca04d42b7 s3:client: Pass down a talloc context to process()
       via  c8b5997698a s3:client: Use a stackframe in process_command_string()
       via  a9f9c07f5b2 s3:client: Only allocate the stackframe once in 
process_stdin()
       via  8d74ba4cb03 s3:client: Do not call exit() in cmd_quit()
       via  dc15e1a397d s3:client: Always goto out (destructor) in do_cd()
       via  e8bd06a748d s3:client: Make cmd_iosize() static
      from  2be7c0c2f92 s3-smbd: send notifications for ACL changes

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b4ce96bdcd84ec861d61e3592bc3fbc752a1d7dc
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 11:16:53 2025 +0100

    s3-client: Use the passed down memory context for cli_connect_nb()
    
    With the patches coming before this patch, we can use main talloc
    context to allocate the connections on and make sure we only free them
    after we don't need them anymore.
    
    This fixes a lot of memory leaks found by LeakSanitizer. One example is:
    
    ==838668==ERROR: LeakSanitizer: detected memory leaks
    
    Indirect leak of 4784 byte(s) in 13 object(s) allocated from:
        #0 0x7fdb1ef21c2b in malloc (/lib64/libasan.so.8+0x121c2b) (BuildId: 
cbfe49f3b7600c4f194d4c54774c977296e9d98a)
        #1 0x7fdb1ebbb6a0 in __talloc_with_prefix ../../lib/talloc/talloc.c:783
        #2 0x7fdb1ebbcf75 in __talloc ../../lib/talloc/talloc.c:825
        #3 0x7fdb1ebbcf75 in _talloc_named_const ../../lib/talloc/talloc.c:982
        #4 0x7fdb1ebbcf75 in _talloc_zero ../../lib/talloc/talloc.c:2421
        #5 0x7fdb1cfd1b25 in idr_pre_get ../../lib/util/idtree.c:98
        #6 0x7fdb1cfd1b25 in idr_get_new_above_int ../../lib/util/idtree.c:202
        #7 0x7fdb1cfd2c30 in idr_get_new_above ../../lib/util/idtree.c:368
        #8 0x7fdb1de3246f in map_smb2_handle_to_fnum 
../../source3/libsmb/cli_smb2_fnum.c:95
        #9 0x7fdb1de3246f in cli_smb2_create_fnum_done 
../../source3/libsmb/cli_smb2_fnum.c:438
        #10 0x7fdb1dbaca05 in _tevent_req_notify_callback 
../../lib/tevent/tevent_req.c:177
        #11 0x7fdb1dbacc3c in tevent_req_finish 
../../lib/tevent/tevent_req.c:234
        #12 0x7fdb1dbacca4 in _tevent_req_done ../../lib/tevent/tevent_req.c:240
        #13 0x7fdb1ed0eb35 in smb2cli_create_done 
../../libcli/smb/smb2cli_create.c:483
        #14 0x7fdb1dbaca05 in _tevent_req_notify_callback 
../../lib/tevent/tevent_req.c:177
        #15 0x7fdb1dbacc3c in tevent_req_finish 
../../lib/tevent/tevent_req.c:234
        #16 0x7fdb1dbacd74 in tevent_req_trigger 
../../lib/tevent/tevent_req.c:291
        #17 0x7fdb1dbaad1e in tevent_common_invoke_immediate_handler 
../../lib/tevent/tevent_immediate.c:190
        #18 0x7fdb1dbaad5b in tevent_common_loop_immediate 
../../lib/tevent/tevent_immediate.c:236
        #19 0x7fdb1dbbe42f in epoll_event_loop_once 
../../lib/tevent/tevent_epoll.c:908
        #20 0x7fdb1dbb7787 in std_event_loop_once 
../../lib/tevent/tevent_standard.c:110
        #21 0x7fdb1dba7466 in _tevent_loop_once ../../lib/tevent/tevent.c:860
        #22 0x7fdb1dbad082 in tevent_req_poll ../../lib/tevent/tevent_req.c:342
        #23 0x7fdb1eaa93d4 in tevent_req_poll_ntstatus 
../../lib/util/tevent_ntstatus.c:109
        #24 0x7fdb1de138bb in cli_list ../../source3/libsmb/clilist.c:1188
        #25 0x000000239f0f in do_list ../../source3/client/client.c:853
        #26 0x00000023a93a in cmd_dir ../../source3/client/client.c:936
        #27 0x00000023f090 in process_stdin ../../source3/client/client.c:6215
        #28 0x00000023f090 in process ../../source3/client/client.c:6269
        #29 0x00000023f090 in main ../../source3/client/client.c:6811
        #30 0x7fdb1ac2b2fa in __libc_start_call_main (/lib64/libc.so.6+0x2b2fa) 
(BuildId: 8523b213e7586a93ab00f6dd476418b1e521e62c)
        #31 0x7ffd7d5613af  ([stack]+0x3a3af)
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>
    
    Autobuild-User(master): Anoop C S <[email protected]>
    Autobuild-Date(master): Thu Nov  6 09:58:52 UTC 2025 on atb-devel-224

commit a5a6253775c764c036de1616cba0852bbca955d9
Author: Andreas Schneider <[email protected]>
Date:   Thu Oct 30 11:03:35 2025 +0100

    s3:libsmb: Use a long living context for cli_resolve_path()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    v

commit 959ea545fbd899dba14dc1216b8f4dca8cdb9b52
Author: Andreas Schneider <[email protected]>
Date:   Thu Oct 30 10:56:43 2025 +0100

    s3:libsmb: Add a talloc context to the internal data structure
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit c306aa08eeedb4b35ea3c67cf94442c16ea3c2d9
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 15:11:37 2025 +0100

    s3:client: Use a long living memory context for cli_cm_open()
    
    This will fix memory leaks with a later commit.
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 27e6bcb1c2f193e4b581eb2b76ac4c7cd676dcf3
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 11:21:58 2025 +0100

    s3:client: Pass down a talloc context to do_cd()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 23c52069e0c9f274e2f24d5d858b0f4f89ce367a
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 10:12:29 2025 +0100

    s3:client: Pass a talloc context down to cmd_*() functions
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 61fe8c907920ab4832cbee58ae47c371fff0d5be
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 11:07:08 2025 +0100

    s3:client: Pass down a talloc context to process_command_string()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 6c297006829e36920ef6386d53b8cff6932ad217
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 11:03:45 2025 +0100

    s3:client: Pass down a talloc context to do_tar_op()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 3175c50a2312e206deb88b6260c9135d67df7cbe
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 11:00:18 2025 +0100

    s3:client: Pass down a talloc context to do_message_op()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 1ab135a9424e5c5634c7ae60464b8da3352c597c
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 10:58:56 2025 +0100

    s3:client: Pass down a talloc context to do_host_query()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 99ca04d42b73af05d2d6b09d977dfeacfe97f03f
Author: Andreas Schneider <[email protected]>
Date:   Mon Oct 27 15:08:53 2025 +0100

    s3:client: Pass down a talloc context to process()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit c8b5997698ae1b09774ba796883eb11c613601b7
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 10:35:16 2025 +0100

    s3:client: Use a stackframe in process_command_string()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit a9f9c07f5b25068557dd7b85f25b57a36431d3ea
Author: Andreas Schneider <[email protected]>
Date:   Tue Oct 28 10:01:00 2025 +0100

    s3:client: Only allocate the stackframe once in process_stdin()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit 8d74ba4cb037abc393ea4a0603e41b8b09f98091
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 10:13:44 2025 +0100

    s3:client: Do not call exit() in cmd_quit()
    
    We want to go through deallocation in the main function.
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit dc15e1a397dbf5fcdebf3aaaabfcbadf4afc8e88
Author: Andreas Schneider <[email protected]>
Date:   Tue Oct 28 10:06:25 2025 +0100

    s3:client: Always goto out (destructor) in do_cd()
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

commit e8bd06a748d57a2cbae837780af3864fb81b193b
Author: Andreas Schneider <[email protected]>
Date:   Wed Oct 29 10:25:39 2025 +0100

    s3:client: Make cmd_iosize() static
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Anoop C S <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 source3/client/client.c           | 270 +++++++++++++++++++++-----------------
 source3/client/client_proto.h     |   1 -
 source3/client/clitar.c           |  12 +-
 source3/client/clitar_proto.h     |   8 +-
 source3/include/libsmb_internal.h |   2 +
 source3/libsmb/clidfs.c           |  58 +++++++-
 source3/libsmb/libsmb_context.c   |  22 ++--
 source3/libsmb/libsmb_dir.c       |  21 ++-
 source3/libsmb/libsmb_file.c      |   6 +-
 source3/libsmb/libsmb_stat.c      |   3 +-
 source3/libsmb/libsmb_xattr.c     |   6 +-
 11 files changed, 248 insertions(+), 161 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index c8b157bb0c3..1d3656aab34 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -66,7 +66,7 @@ static int io_timeout = (CLIENT_TIMEOUT/1000); /* Per 
operation timeout (in seco
 static int name_type = 0x20;
 
 static int process_tok(char *tok);
-static int cmd_help(void);
+static int cmd_help(TALLOC_CTX *mem_ctx);
 
 /* value for unused fid field in trans2 secondary request */
 #define FID_UNUSED (0xFFFF)
@@ -332,7 +332,7 @@ static int do_dskattr(void)
  Show cd/pwd.
 ****************************************************************************/
 
-static int cmd_pwd(void)
+static int cmd_pwd(TALLOC_CTX *mem_ctx)
 {
        d_printf("Current directory is %s",service);
        d_printf("%s\n",client_get_cur_dir());
@@ -385,7 +385,7 @@ char *client_clean_name(TALLOC_CTX *ctx, const char *name)
  Change directory - inner section.
 ****************************************************************************/
 
-static int do_cd(const char *new_dir)
+static int do_cd(TALLOC_CTX *mem_ctx, const char *new_dir)
 {
        char *newdir = NULL;
        char *saved_dir = NULL;
@@ -399,8 +399,7 @@ static int do_cd(const char *new_dir)
 
        newdir = talloc_strdup(ctx, new_dir);
        if (!newdir) {
-               TALLOC_FREE(ctx);
-               return 1;
+               goto out;
        }
 
        normalize_name(newdir);
@@ -409,8 +408,7 @@ static int do_cd(const char *new_dir)
 
        saved_dir = talloc_strdup(ctx, client_get_cur_dir());
        if (!saved_dir) {
-               TALLOC_FREE(ctx);
-               return 1;
+               goto out;
        }
 
        if (*newdir == CLI_DIRSEP_CHAR) {
@@ -437,7 +435,12 @@ static int do_cd(const char *new_dir)
        new_cd = client_clean_name(ctx, new_cd);
        client_set_cur_dir(new_cd);
 
-       status = cli_resolve_path(ctx, "",
+       /*
+        * This needs to use a long lived memory context, as it might return a
+        * new or already existing cli context.
+        */
+       status = cli_resolve_path(mem_ctx,
+                                 "",
                                  creds,
                                cli, new_cd, &targetcli, &targetpath);
        if (!NT_STATUS_IS_OK(status)) {
@@ -447,8 +450,8 @@ static int do_cd(const char *new_dir)
        }
 
        if (strequal(targetpath,CLI_DIRSEP_STR )) {
-               TALLOC_FREE(ctx);
-               return 0;
+               ret = 0;
+               goto out;
        }
 
 
@@ -483,13 +486,13 @@ out:
  Change directory.
 ****************************************************************************/
 
-static int cmd_cd(void)
+static int cmd_cd(TALLOC_CTX *mem_ctx)
 {
        char *buf = NULL;
        int rc = 0;
 
        if (next_token_talloc(talloc_tos(), &cmd_ptr, &buf,NULL)) {
-               rc = do_cd(buf);
+               rc = do_cd(mem_ctx, buf);
        } else {
                d_printf("Current directory is %s\n",client_get_cur_dir());
        }
@@ -501,9 +504,9 @@ static int cmd_cd(void)
  Change directory.
 ****************************************************************************/
 
-static int cmd_cd_oneup(void)
+static int cmd_cd_oneup(TALLOC_CTX *mem_ctx)
 {
-       return do_cd("..");
+       return do_cd(mem_ctx, "..");
 }
 
 /*******************************************************************
@@ -891,7 +894,7 @@ NTSTATUS do_list(const char *mask,
  Get a directory listing.
 ****************************************************************************/
 
-static int cmd_dir(void)
+static int cmd_dir(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        uint32_t attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | 
FILE_ATTRIBUTE_HIDDEN;
@@ -946,7 +949,7 @@ static int cmd_dir(void)
  Get a directory listing.
 ****************************************************************************/
 
-static int cmd_du(void)
+static int cmd_du(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        uint32_t attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | 
FILE_ATTRIBUTE_HIDDEN;
@@ -998,7 +1001,7 @@ static int cmd_du(void)
        return rc;
 }
 
-static int cmd_echo(void)
+static int cmd_echo(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *num;
@@ -1169,7 +1172,7 @@ static int do_get(const char *rname, const char 
*lname_in, bool reget)
  Get a file.
 ****************************************************************************/
 
-static int cmd_get(void)
+static int cmd_get(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *lname = NULL;
@@ -1287,7 +1290,7 @@ static NTSTATUS do_mget(struct cli_state *cli_state, 
struct file_info *finfo,
  View the file using the pager.
 ****************************************************************************/
 
-static int cmd_more(void)
+static int cmd_more(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *rname = NULL;
@@ -1355,7 +1358,7 @@ static int cmd_more(void)
  Do a mget command.
 ****************************************************************************/
 
-static int cmd_mget(void)
+static int cmd_mget(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        uint32_t attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
@@ -1471,19 +1474,20 @@ static bool do_altname(const char *name)
  Exit client.
 ****************************************************************************/
 
-static int cmd_quit(void)
+static int cmd_quit(TALLOC_CTX *mem_ctx)
 {
        cli_shutdown(cli);
-       exit(0);
-       /* NOTREACHED */
-       return 0;
+       cli = NULL;
+
+       /* Use INT_MAX for QUIT */
+       return INT_MAX;
 }
 
 /****************************************************************************
  Make a directory.
 ****************************************************************************/
 
-static int cmd_mkdir(void)
+static int cmd_mkdir(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -1563,7 +1567,7 @@ static int cmd_mkdir(void)
  Show alt name.
 ****************************************************************************/
 
-static int cmd_altname(void)
+static int cmd_altname(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *name;
@@ -1822,7 +1826,7 @@ static int do_allinfo(const char *name)
  Show all info we can get
 ****************************************************************************/
 
-static int cmd_allinfo(void)
+static int cmd_allinfo(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *name;
@@ -1978,7 +1982,7 @@ static int do_put(const char *rname, const char *lname, 
bool reput)
  Put a file.
 ****************************************************************************/
 
-static int cmd_put(void)
+static int cmd_put(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *lname;
@@ -2070,7 +2074,7 @@ static bool seek_list(struct file_list *list, char *name)
  Set the file selection mask.
 ****************************************************************************/
 
-static int cmd_select(void)
+static int cmd_select(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *new_fs = NULL;
@@ -2162,7 +2166,7 @@ static int file_find(TALLOC_CTX *ctx,
  mput some files.
 ****************************************************************************/
 
-static int cmd_mput(void)
+static int cmd_mput(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *p = NULL;
@@ -2308,7 +2312,7 @@ static int do_cancel(int job)
  Cancel a print job.
 ****************************************************************************/
 
-static int cmd_cancel(void)
+static int cmd_cancel(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *buf = NULL;
@@ -2330,7 +2334,7 @@ static int cmd_cancel(void)
  Print a file.
 ****************************************************************************/
 
-static int cmd_print(void)
+static int cmd_print(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *lname = NULL;
@@ -2378,7 +2382,7 @@ static void queue_fn(struct print_job_info *p)
  Show a print queue.
 ****************************************************************************/
 
-static int cmd_queue(void)
+static int cmd_queue(TALLOC_CTX *mem_ctx)
 {
        cli_print_queue(cli, queue_fn);
        return 0;
@@ -2433,7 +2437,7 @@ out:
  Delete some files.
 ****************************************************************************/
 
-static int cmd_del(void)
+static int cmd_del(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -2570,7 +2574,7 @@ static NTSTATUS do_deltree_list(struct cli_state 
*cli_state,
        return NT_STATUS_OK;
 }
 
-static int cmd_deltree(void)
+static int cmd_deltree(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *buf = NULL;
@@ -2684,7 +2688,7 @@ static int cmd_deltree(void)
  Wildcard delete some files.
 ****************************************************************************/
 
-static int cmd_wdel(void)
+static int cmd_wdel(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -2737,7 +2741,7 @@ static int cmd_wdel(void)
 /****************************************************************************
 ****************************************************************************/
 
-static int cmd_open(void)
+static int cmd_open(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -2794,7 +2798,7 @@ static int cmd_open(void)
        return 0;
 }
 
-static int cmd_posix_encrypt(void)
+static int cmd_posix_encrypt(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -2863,7 +2867,7 @@ static int cmd_posix_encrypt(void)
 /****************************************************************************
 ****************************************************************************/
 
-static int cmd_posix_open(void)
+static int cmd_posix_open(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -2930,7 +2934,7 @@ static int cmd_posix_open(void)
        return 0;
 }
 
-static int cmd_posix_mkdir(void)
+static int cmd_posix_mkdir(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -2986,7 +2990,7 @@ static int cmd_posix_mkdir(void)
        return 0;
 }
 
-static int cmd_posix_unlink(void)
+static int cmd_posix_unlink(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -3036,7 +3040,7 @@ static int cmd_posix_unlink(void)
        return 0;
 }
 
-static int cmd_posix_rmdir(void)
+static int cmd_posix_rmdir(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -3086,7 +3090,7 @@ static int cmd_posix_rmdir(void)
        return 0;
 }
 
-static int cmd_mkfifo(void)
+static int cmd_mkfifo(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -3144,7 +3148,7 @@ static int cmd_mkfifo(void)
        return 0;
 }
 
-static int cmd_close(void)
+static int cmd_close(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *buf = NULL;
@@ -3166,7 +3170,7 @@ static int cmd_close(void)
        return 0;
 }
 
-static int cmd_posix(void)
+static int cmd_posix(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        uint16_t major, minor;
@@ -3252,7 +3256,7 @@ static int cmd_posix(void)
        return 0;
 }
 
-static int cmd_lock(void)
+static int cmd_lock(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *buf = NULL;
@@ -3309,7 +3313,7 @@ static int cmd_lock(void)
        return 0;
 }
 
-static int cmd_unlock(void)
+static int cmd_unlock(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *buf = NULL;
@@ -3351,7 +3355,7 @@ static int cmd_unlock(void)
        return 0;
 }
 
-static int cmd_posix_whoami(void)
+static int cmd_posix_whoami(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -3407,7 +3411,7 @@ static int cmd_posix_whoami(void)
  Remove a directory.
 ****************************************************************************/
 
-static int cmd_rmdir(void)
+static int cmd_rmdir(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *mask = NULL;
@@ -3454,7 +3458,7 @@ static int cmd_rmdir(void)
  UNIX hardlink.
 ****************************************************************************/
 
-static int cmd_link(void)
+static int cmd_link(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *oldname = NULL;
@@ -3526,7 +3530,7 @@ static int cmd_link(void)
  UNIX readlink.
 ****************************************************************************/
 
-static int cmd_readlink(void)
+static int cmd_readlink(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *name= NULL;
@@ -3583,7 +3587,7 @@ static int cmd_readlink(void)
  UNIX symlink.
 ****************************************************************************/
 
-static int cmd_symlink(void)
+static int cmd_symlink(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *link_target = NULL;
@@ -3647,7 +3651,7 @@ static int cmd_symlink(void)
  UNIX chmod.
 ****************************************************************************/
 
-static int cmd_chmod(void)
+static int cmd_chmod(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src = NULL;
@@ -3808,7 +3812,7 @@ static char *perms_to_string(fstring permstr, unsigned 
char perms)
  UNIX getfacl.
 ****************************************************************************/
 
-static int cmd_getfacl(void)
+static int cmd_getfacl(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src = NULL;
@@ -4005,7 +4009,7 @@ static int cmd_getfacl(void)
  Get the EA list of a file
 ****************************************************************************/
 
-static int cmd_geteas(void)
+static int cmd_geteas(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src = NULL;
@@ -4064,7 +4068,7 @@ static int cmd_geteas(void)
  Set an EA of a file
 ****************************************************************************/
 
-static int cmd_setea(void)
+static int cmd_setea(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src = NULL;
@@ -4118,7 +4122,7 @@ static int cmd_setea(void)
  UNIX stat.
 ****************************************************************************/
 
-static int cmd_stat(void)
+static int cmd_stat(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src = NULL;
@@ -4235,7 +4239,7 @@ static int cmd_stat(void)
  UNIX chown.
 ****************************************************************************/
 
-static int cmd_chown(void)
+static int cmd_chown(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src = NULL;
@@ -4301,7 +4305,7 @@ static int cmd_chown(void)
  Rename some file.
 ****************************************************************************/
 
-static int cmd_rename(void)
+static int cmd_rename(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src, *dest;
@@ -4399,7 +4403,7 @@ static int scopy_status(off_t written, void *priv)
  Server-Side copy some file.
 ****************************************************************************/
 
-static int cmd_scopy(void)
+static int cmd_scopy(TALLOC_CTX *mem_ctx)
 {
        TALLOC_CTX *ctx = talloc_tos();
        char *src, *dest;
@@ -4524,7 +4528,7 @@ static int cmd_scopy(void)


-- 
Samba Shared Repository

Reply via email to