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)
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());
Change directory.
****************************************************************************/
-static int cmd_cd(void)
+static int cmd_cd(TALLOC_CTX *mem_ctx)
{
char *buf = NULL;
int rc = 0;
Change directory.
****************************************************************************/
-static int cmd_cd_oneup(void)
+static int cmd_cd_oneup(TALLOC_CTX *mem_ctx)
{
return do_cd("..");
}
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;
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;
return rc;
}
-static int cmd_echo(void)
+static int cmd_echo(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *num;
Get a file.
****************************************************************************/
-static int cmd_get(void)
+static int cmd_get(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *lname = NULL;
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;
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;
Exit client.
****************************************************************************/
-static int cmd_quit(void)
+static int cmd_quit(TALLOC_CTX *mem_ctx)
{
cli_shutdown(cli);
cli = NULL;
Make a directory.
****************************************************************************/
-static int cmd_mkdir(void)
+static int cmd_mkdir(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
Show alt name.
****************************************************************************/
-static int cmd_altname(void)
+static int cmd_altname(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
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;
Put a file.
****************************************************************************/
-static int cmd_put(void)
+static int cmd_put(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *lname;
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;
mput some files.
****************************************************************************/
-static int cmd_mput(void)
+static int cmd_mput(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *p = NULL;
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;
Print a file.
****************************************************************************/
-static int cmd_print(void)
+static int cmd_print(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *lname = NULL;
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;
Delete some files.
****************************************************************************/
-static int cmd_del(void)
+static int cmd_del(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
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;
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;
/****************************************************************************
****************************************************************************/
-static int cmd_open(void)
+static int cmd_open(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
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;
/****************************************************************************
****************************************************************************/
-static int cmd_posix_open(void)
+static int cmd_posix_open(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
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;
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;
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;
return 0;
}
-static int cmd_mkfifo(void)
+static int cmd_mkfifo(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
return 0;
}
-static int cmd_close(void)
+static int cmd_close(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *buf = NULL;
return 0;
}
-static int cmd_posix(void)
+static int cmd_posix(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
uint16_t major, minor;
return 0;
}
-static int cmd_lock(void)
+static int cmd_lock(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *buf = NULL;
return 0;
}
-static int cmd_unlock(void)
+static int cmd_unlock(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *buf = NULL;
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;
Remove a directory.
****************************************************************************/
-static int cmd_rmdir(void)
+static int cmd_rmdir(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
UNIX hardlink.
****************************************************************************/
-static int cmd_link(void)
+static int cmd_link(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *oldname = NULL;
UNIX readlink.
****************************************************************************/
-static int cmd_readlink(void)
+static int cmd_readlink(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *name= NULL;
UNIX symlink.
****************************************************************************/
-static int cmd_symlink(void)
+static int cmd_symlink(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *link_target = NULL;
UNIX chmod.
****************************************************************************/
-static int cmd_chmod(void)
+static int cmd_chmod(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *src = NULL;
UNIX getfacl.
****************************************************************************/
-static int cmd_getfacl(void)
+static int cmd_getfacl(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *src = NULL;
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;
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;
UNIX stat.
****************************************************************************/
-static int cmd_stat(void)
+static int cmd_stat(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *src = NULL;
UNIX chown.
****************************************************************************/
-static int cmd_chown(void)
+static int cmd_chown(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *src = NULL;
Rename some file.
****************************************************************************/
-static int cmd_rename(void)
+static int cmd_rename(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *src, *dest;
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;
Print the volume name.
****************************************************************************/
-static int cmd_volume(void)
+static int cmd_volume(TALLOC_CTX *mem_ctx)
{
char *volname;
uint32_t serial_num;
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;
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"));
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;
Watch directory changes
****************************************************************************/
-static int cmd_notify(void)
+static int cmd_notify(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *frame = talloc_stackframe();
char *name, *buf;
Set the archive level.
****************************************************************************/
-static int cmd_archive(void)
+static int cmd_archive(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *buf;
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);
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"));
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);
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"));
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"));
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",
Do the lcd command.
****************************************************************************/
-static int cmd_lcd(void)
+static int cmd_lcd(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *buf;
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;
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;
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;
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;
* close the session
*/
-static int cmd_logoff(void)
+static int cmd_logoff(TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
* 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;
* tree disconnect (disconnect from a share)
*/
-static int cmd_tdis(void)
+static int cmd_tdis(TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
* 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;
list active connections
****************************************************************************/
-static int cmd_list_connect(void)
+static int cmd_list_connect(TALLOC_CTX *mem_ctx)
{
cli_cm_display(cli);
return 0;
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;
* 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;
* 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;
iosize command
***************************************************************************/
-static int cmd_iosize(void)
+static int cmd_iosize(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *buf;
timeout command
***************************************************************************/
-static int cmd_timeout(void)
+static int cmd_timeout(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
char *buf;
/****************************************************************************
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;
*/
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[] = {
Help.
****************************************************************************/
-static int cmd_help(void)
+static int cmd_help(TALLOC_CTX *mem_ctx)
{
TALLOC_CTX *ctx = talloc_tos();
int i=0,j;
}
if ((i = process_tok(tok)) >= 0) {
- rc = commands[i].fn();
+ rc = commands[i].fn(frame);
/* QUIT COMMAND */
if (rc == INT_MAX) {
TALLOC_FREE(tok);
}
if ((i = process_tok(tok)) >= 0) {
- rc = commands[i].fn();
+ rc = commands[i].fn(frame);
/* QUIT COMMAND */
if (rc == INT_MAX) {
rc = 0;