summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-15 14:19:52 -0800
committerJeremy Allison <jra@samba.org>2007-11-15 14:19:52 -0800
commit68be9a820059ee96dd26c527efd7c14e679d3f2c (patch)
treec3c853a01013fc7977ab02a31e673fe17b4135e6 /source3/client
parent8e1b0f81c27dc332560f19de27fb86ac96c59775 (diff)
downloadsamba-68be9a820059ee96dd26c527efd7c14e679d3f2c.tar.gz
samba-68be9a820059ee96dd26c527efd7c14e679d3f2c.tar.bz2
samba-68be9a820059ee96dd26c527efd7c14e679d3f2c.zip
More pstring removal. This one was tricky. I had to add
one horror (pstring_clean_name()) which will have to remain until I've removed all pstrings from the client code. Jeremy. (This used to be commit 1ea3ac80146b83c2522b69e7747c823366a2b47d)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c16
-rw-r--r--source3/client/clitar.c2
-rw-r--r--source3/client/smbctool.c11
3 files changed, 16 insertions, 13 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 94dc52d9d5..1c54b2d3f7 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -283,7 +283,7 @@ static int do_cd(char *newdir)
}
}
- clean_name(cur_dir);
+ pstring_clean_name(cur_dir);
pstrcpy( dname, cur_dir );
if ( !cli_resolve_path( "", cli, dname, &targetcli, targetpath ) ) {
@@ -313,7 +313,7 @@ static int do_cd(char *newdir)
}
} else {
pstrcat( targetpath, CLI_DIRSEP_STR );
- clean_name( targetpath );
+ pstring_clean_name( targetpath );
if ( !cli_chkpath(targetcli, targetpath) ) {
d_printf("cd %s: %s\n", dname, cli_errstr(targetcli));
@@ -953,7 +953,7 @@ static int cmd_get(void)
return 1;
}
pstrcpy(lname,p);
- clean_name(rname);
+ pstring_clean_name(rname);
next_token_nr(NULL,lname,NULL,sizeof(lname));
@@ -1054,7 +1054,7 @@ static int cmd_more(void)
unlink(lname);
return 1;
}
- clean_name(rname);
+ pstring_clean_name(rname);
rc = do_get(rname, lname, False);
@@ -1393,7 +1393,7 @@ static int cmd_put(void)
else
pstrcat(rname,lname);
- clean_name(rname);
+ pstring_clean_name(rname);
{
SMB_STRUCT_STAT st;
@@ -2949,7 +2949,7 @@ static int cmd_reget(void)
return 1;
}
pstrcpy(local_name, p);
- clean_name(remote_name);
+ pstring_clean_name(remote_name);
next_token_nr(NULL, local_name, NULL, sizeof(local_name));
@@ -2987,7 +2987,7 @@ static int cmd_reput(void)
else
pstrcat(remote_name, local_name);
- clean_name(remote_name);
+ pstring_clean_name(remote_name);
return do_put(remote_name, local_name, True);
}
@@ -3960,6 +3960,7 @@ static int do_message_op(void)
POPT_COMMON_CREDENTIALS
POPT_TABLEEND
};
+ TALLOC_CTX *frame = talloc_stackframe();
load_case_tables();
@@ -4205,5 +4206,6 @@ static int do_message_op(void)
}
talloc_destroy( ctx);
+ talloc_destroy(frame);
return rc;
}
diff --git a/source3/client/clitar.c b/source3/client/clitar.c
index 0c820177b0..4ce92c674d 100644
--- a/source3/client/clitar.c
+++ b/source3/client/clitar.c
@@ -651,7 +651,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1)
fnum = cli_open(cli, rname, O_RDONLY, DENY_NONE);
- clean_name(rname);
+ pstring_clean_name(rname);
if (fnum == -1) {
DEBUG(0,("%s opening remote file %s (%s)\n",
diff --git a/source3/client/smbctool.c b/source3/client/smbctool.c
index e7ac80222c..b563a33f66 100644
--- a/source3/client/smbctool.c
+++ b/source3/client/smbctool.c
@@ -367,7 +367,7 @@ static int do_cd(char *newdir)
all_string_sub(cur_dir, "/./", "/", 0);
/* Format the directory in a libmsmbclient friendly way */
- clean_name(cur_dir);
+ pstring_clean_name(cur_dir);
all_string_sub(cur_dir, "/./", "/", 0);
pstrcpy(targetpath, "smb:");
pstrcat(targetpath, service);
@@ -1129,7 +1129,7 @@ static int cmd_more(void)
unlink(lname);
return 1;
}
- clean_name(rname);
+ pstring_clean_name(rname);
rc = do_get(rname, lname, False);
@@ -2677,7 +2677,7 @@ static int cmd_reget(void)
return 1;
}
pstrcpy(local_name, p);
- clean_name(remote_name);
+ pstring_clean_name(remote_name);
next_token_nr(NULL, local_name, NULL, sizeof(local_name));
@@ -2715,7 +2715,7 @@ static int cmd_reput(void)
else
pstrcat(remote_name, local_name);
- clean_name(remote_name);
+ pstring_clean_name(remote_name);
return do_put(remote_name, local_name, True);
}
@@ -3549,7 +3549,7 @@ static int do_message_op(void)
POPT_COMMON_CREDENTIALS
POPT_TABLEEND
};
-
+ TALLOC_CTX *frame = talloc_stackframe();
#ifdef KANJI
pstrcpy(term_code, KANJI);
@@ -3766,5 +3766,6 @@ static int do_message_op(void)
return 1;
}
+ TALLOC_FREE(frame);
return rc;
}