summaryrefslogtreecommitdiffstats
path: root/source/client
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-08-10 23:20:04 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-08-10 23:20:04 +0000
commite57a896f06b16fe7e336e1ae63a0c9e4cc75fd36 (patch)
treef7b3d654b33739187c4f9fae3ad11f4ef2a52c1d /source/client
parentbb1c4501992650a5e26b4bc743aeae551852becc (diff)
downloadsamba-e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36.tar.gz
samba-e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36.tar.xz
samba-e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36.zip
Fix the %m security bug again - and try to make it harder to reintroduce in
future. This moves us from fstrcpy() and global variables to 'get' and 'set' functions. In particular, the 'set' function sainity-checks the input, in the same way as we always have. Andrew Bartlett
Diffstat (limited to 'source/client')
-rw-r--r--source/client/smbmount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index ad050063ec4..0db990e8bd6 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -29,7 +29,6 @@
extern BOOL in_client;
extern pstring user_socket_options;
extern BOOL append_log;
-extern fstring remote_machine;
static pstring credentials;
static pstring my_netbios_name;
@@ -377,7 +376,7 @@ static void send_fs_socket(char *the_service, char *mount_point, struct cli_stat
}
/* here we are no longer interactive */
- pstrcpy(remote_machine, "smbmount"); /* sneaky ... */
+ set_remote_machine_name("smbmount"); /* sneaky ... */
setup_logging("mount.smbfs", False);
append_log = True;
reopen_logs();