From: Andreas Schneider Date: Wed, 29 Oct 2025 09:12:29 +0000 (+0100) Subject: s3:client: Pass a talloc context down to cmd_*() functions X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23c52069e0c9f274e2f24d5d858b0f4f89ce367a;p=thirdparty%2Fsamba.git s3:client: Pass a talloc context down to cmd_*() functions Signed-off-by: Andreas Schneider Reviewed-by: Anoop C S --- diff --git a/source3/client/client.c b/source3/client/client.c index 7641bd3a83f..f0bd8c34e88 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()); @@ -481,7 +481,7 @@ out: Change directory. ****************************************************************************/ -static int cmd_cd(void) +static int cmd_cd(TALLOC_CTX *mem_ctx) { char *buf = NULL; int rc = 0; @@ -499,7 +499,7 @@ 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(".."); } @@ -889,7 +889,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; @@ -944,7 +944,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; @@ -996,7 +996,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; @@ -1167,7 +1167,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; @@ -1285,7 +1285,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; @@ -1353,7 +1353,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; @@ -1469,7 +1469,7 @@ 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); cli = NULL; @@ -1482,7 +1482,7 @@ static int cmd_quit(void) Make a directory. ****************************************************************************/ -static int cmd_mkdir(void) +static int cmd_mkdir(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *mask = NULL; @@ -1562,7 +1562,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; @@ -1821,7 +1821,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; @@ -1977,7 +1977,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; @@ -2069,7 +2069,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; @@ -2161,7 +2161,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; @@ -2307,7 +2307,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; @@ -2329,7 +2329,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; @@ -2377,7 +2377,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; @@ -2432,7 +2432,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; @@ -2569,7 +2569,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; @@ -2683,7 +2683,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; @@ -2736,7 +2736,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; @@ -2793,7 +2793,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; @@ -2862,7 +2862,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; @@ -2929,7 +2929,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; @@ -2985,7 +2985,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; @@ -3035,7 +3035,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; @@ -3085,7 +3085,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; @@ -3143,7 +3143,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; @@ -3165,7 +3165,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; @@ -3251,7 +3251,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; @@ -3308,7 +3308,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; @@ -3350,7 +3350,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; @@ -3406,7 +3406,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; @@ -3453,7 +3453,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; @@ -3525,7 +3525,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; @@ -3582,7 +3582,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; @@ -3646,7 +3646,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; @@ -3807,7 +3807,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; @@ -4004,7 +4004,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; @@ -4063,7 +4063,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; @@ -4117,7 +4117,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; @@ -4234,7 +4234,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; @@ -4300,7 +4300,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; @@ -4398,7 +4398,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; @@ -4523,7 +4523,7 @@ static int cmd_scopy(void) Print the volume name. ****************************************************************************/ -static int cmd_volume(void) +static int cmd_volume(TALLOC_CTX *mem_ctx) { char *volname; uint32_t serial_num; @@ -4547,7 +4547,7 @@ static int cmd_volume(void) Hard link files using the NT call. ****************************************************************************/ -static int cmd_hardlink(void) +static int cmd_hardlink(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *src, *dest; @@ -4609,7 +4609,7 @@ static int cmd_hardlink(void) Toggle the prompt flag. ****************************************************************************/ -static int cmd_prompt(void) +static int cmd_prompt(TALLOC_CTX *mem_ctx) { prompt = !prompt; DEBUG(2,("prompting is now %s\n",prompt?"on":"off")); @@ -4620,7 +4620,7 @@ static int cmd_prompt(void) Set the newer than time. ****************************************************************************/ -static int cmd_newer(void) +static int cmd_newer(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *buf; @@ -4648,7 +4648,7 @@ static int cmd_newer(void) Watch directory changes ****************************************************************************/ -static int cmd_notify(void) +static int cmd_notify(TALLOC_CTX *mem_ctx) { TALLOC_CTX *frame = talloc_stackframe(); char *name, *buf; @@ -4713,7 +4713,7 @@ fail: Set the archive level. ****************************************************************************/ -static int cmd_archive(void) +static int cmd_archive(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *buf; @@ -4731,7 +4731,7 @@ static int cmd_archive(void) Toggle the backup_intent state. ****************************************************************************/ -static int cmd_backup(void) +static int cmd_backup(TALLOC_CTX *mem_ctx) { backup_intent = !backup_intent; cli_set_backup_intent(cli, backup_intent); @@ -4743,7 +4743,7 @@ static int cmd_backup(void) Toggle the lowercaseflag. ****************************************************************************/ -static int cmd_lowercase(void) +static int cmd_lowercase(TALLOC_CTX *mem_ctx) { lowercase = !lowercase; DEBUG(2,("filename lowercasing is now %s\n",lowercase?"on":"off")); @@ -4754,7 +4754,7 @@ static int cmd_lowercase(void) Toggle the case sensitive flag. ****************************************************************************/ -static int cmd_setcase(void) +static int cmd_setcase(TALLOC_CTX *mem_ctx) { bool orig_case_sensitive = cli_set_case_sensitive(cli, false); @@ -4768,7 +4768,7 @@ static int cmd_setcase(void) Toggle the showacls flag. ****************************************************************************/ -static int cmd_showacls(void) +static int cmd_showacls(TALLOC_CTX *mem_ctx) { showacls = !showacls; DEBUG(2,("showacls is now %s\n",showacls?"on":"off")); @@ -4780,7 +4780,7 @@ static int cmd_showacls(void) Toggle the recurse flag. ****************************************************************************/ -static int cmd_recurse(void) +static int cmd_recurse(TALLOC_CTX *mem_ctx) { recurse = !recurse; DEBUG(2,("directory recursion is now %s\n",recurse?"on":"off")); @@ -4791,7 +4791,7 @@ static int cmd_recurse(void) Toggle the translate flag. ****************************************************************************/ -static int cmd_translate(void) +static int cmd_translate(TALLOC_CTX *mem_ctx) { translation = !translation; DEBUG(2,("CR/LF<->LF and print text translation now %s\n", @@ -4803,7 +4803,7 @@ static int cmd_translate(void) Do the lcd command. ****************************************************************************/ -static int cmd_lcd(void) +static int cmd_lcd(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *buf; @@ -4828,7 +4828,7 @@ static int cmd_lcd(void) Get a file restarting at end of local file. ****************************************************************************/ -static int cmd_reget(void) +static int cmd_reget(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *local_name = NULL; @@ -4867,7 +4867,7 @@ static int cmd_reget(void) Put a file restarting at end of local file. ****************************************************************************/ -static int cmd_reput(void) +static int cmd_reput(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *local_name = NULL; @@ -5078,7 +5078,7 @@ static bool list_servers(const char *wk_grp) Print or set current VUID ****************************************************************************/ -static int cmd_vuid(void) +static int cmd_vuid(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *buf; @@ -5097,7 +5097,7 @@ static int cmd_vuid(void) Setup a new VUID, by issuing a session setup ****************************************************************************/ -static int cmd_logon(void) +static int cmd_logon(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *l_username, *l_password; @@ -5150,7 +5150,7 @@ static int cmd_logon(void) * close the session */ -static int cmd_logoff(void) +static int cmd_logoff(TALLOC_CTX *mem_ctx) { NTSTATUS status; @@ -5169,7 +5169,7 @@ static int cmd_logoff(void) * tree connect (connect to a share) */ -static int cmd_tcon(void) +static int cmd_tcon(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *sharename; @@ -5202,7 +5202,7 @@ static int cmd_tcon(void) * tree disconnect (disconnect from a share) */ -static int cmd_tdis(void) +static int cmd_tdis(TALLOC_CTX *mem_ctx) { NTSTATUS status; @@ -5221,7 +5221,7 @@ static int cmd_tdis(void) * get or set tid */ -static int cmd_tid(void) +static int cmd_tid(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *tid_str; @@ -5248,7 +5248,7 @@ static int cmd_tid(void) list active connections ****************************************************************************/ -static int cmd_list_connect(void) +static int cmd_list_connect(TALLOC_CTX *mem_ctx) { cli_cm_display(cli); return 0; @@ -5258,7 +5258,7 @@ static int cmd_list_connect(void) display the current active client connection ****************************************************************************/ -static int cmd_show_connect( void ) +static int cmd_show_connect(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); struct cli_state *targetcli; @@ -5286,7 +5286,7 @@ static int cmd_show_connect( void ) * Read a filename and four times from the client command line and update * the file times. A value of -1 for a time means don't change. */ -static int cmd_utimes(void) +static int cmd_utimes(TALLOC_CTX *mem_ctx) { char *buf; char *fname = NULL; @@ -5433,7 +5433,7 @@ int set_remote_attr(const char *filename, uint32_t new_attr, int mode) * Read a filename and mode from the client command line and update * the file DOS attributes. */ -int cmd_setmode(void) +int cmd_setmode(TALLOC_CTX *mem_ctx) { char *buf; char *fname = NULL; @@ -5518,7 +5518,7 @@ out: iosize command ***************************************************************************/ -static int cmd_iosize(void) +static int cmd_iosize(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *buf; @@ -5569,7 +5569,7 @@ static int cmd_iosize(void) timeout command ***************************************************************************/ -static int cmd_timeout(void) +static int cmd_timeout(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); char *buf; @@ -5593,7 +5593,7 @@ static int cmd_timeout(void) /**************************************************************************** history ****************************************************************************/ -static int cmd_history(void) +static int cmd_history(TALLOC_CTX *mem_ctx) { #if defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_LIST) HIST_ENTRY **hlist; @@ -5624,7 +5624,7 @@ static int cmd_history(void) */ static struct { const char *name; - int (*fn)(void); + int (*fn)(TALLOC_CTX *mem_ctx); const char *description; char compl_args[2]; /* Completion argument info */ } commands[] = { @@ -5760,7 +5760,7 @@ static int process_tok(char *tok) Help. ****************************************************************************/ -static int cmd_help(void) +static int cmd_help(TALLOC_CTX *mem_ctx) { TALLOC_CTX *ctx = talloc_tos(); int i=0,j; @@ -5840,7 +5840,7 @@ static int process_command_string(TALLOC_CTX *mem_ctx, const char *cmd_in) } if ((i = process_tok(tok)) >= 0) { - rc = commands[i].fn(); + rc = commands[i].fn(frame); /* QUIT COMMAND */ if (rc == INT_MAX) { TALLOC_FREE(tok); @@ -6209,7 +6209,7 @@ static int process_stdin(void) } if ((i = process_tok(tok)) >= 0) { - rc = commands[i].fn(); + rc = commands[i].fn(frame); /* QUIT COMMAND */ if (rc == INT_MAX) { rc = 0; diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 28745d7da44..d53e740f7fc 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -231,7 +231,7 @@ struct tar *tar_get_ctx(void) * Read a size from the client command line and update the current * blocksize. */ -int cmd_block(void) +int cmd_block(TALLOC_CTX *mem_ctx) { /* XXX: from client.c */ const extern char *cmd_ptr; @@ -270,7 +270,7 @@ out: * Read one or more modes from the client command line and update the * current tar mode. */ -int cmd_tarmode(void) +int cmd_tarmode(TALLOC_CTX *mem_ctx) { const extern char *cmd_ptr; char *buf; @@ -327,7 +327,7 @@ int cmd_tarmode(void) * * Check presence of argument, parse them and handle the request. */ -int cmd_tar(void) +int cmd_tar(TALLOC_CTX *mem_ctx) { const extern char *cmd_ptr; const char *flag; @@ -1868,19 +1868,19 @@ static NTSTATUS path_base_name(TALLOC_CTX *ctx, const char *path, char **_base) #define NOT_IMPLEMENTED DEBUG(0, ("tar mode not compiled. build used --without-libarchive\n")) -int cmd_block(void) +int cmd_block(TALLOC_CTX *mem_ctx) { NOT_IMPLEMENTED; return 1; } -int cmd_tarmode(void) +int cmd_tarmode(TALLOC_CTX *mem_ctx) { NOT_IMPLEMENTED; return 1; } -int cmd_tar(void) +int cmd_tar(TALLOC_CTX *mem_ctx) { NOT_IMPLEMENTED; return 1; diff --git a/source3/client/clitar_proto.h b/source3/client/clitar_proto.h index 65204768ea9..cb64ed986cd 100644 --- a/source3/client/clitar_proto.h +++ b/source3/client/clitar_proto.h @@ -22,10 +22,10 @@ struct tar; -int cmd_block(void); -int cmd_tarmode(void); -int cmd_setmode(void); -int cmd_tar(void); +int cmd_block(TALLOC_CTX *mem_ctx); +int cmd_tarmode(TALLOC_CTX *mem_ctx); +int cmd_setmode(TALLOC_CTX *mem_ctx); +int cmd_tar(TALLOC_CTX *mem_ctx); int tar_process(struct tar* tar); int tar_parse_args(struct tar *tar, const char *flag, const char **val, int valsize); bool tar_to_process(struct tar *tar);