summaryrefslogtreecommitdiff
path: root/source3/client/smbmount.c
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
commit6ddba1e99b48afc53cf5bc7a2900279490c7a8f6 (patch)
tree132f199e9e0fa6bdf750488487f097f090a2f671 /source3/client/smbmount.c
parent3fce46ac7d790fbe9fcdd2426277857612bb252a (diff)
downloadsamba-6ddba1e99b48afc53cf5bc7a2900279490c7a8f6.tar.gz
samba-6ddba1e99b48afc53cf5bc7a2900279490c7a8f6.tar.bz2
samba-6ddba1e99b48afc53cf5bc7a2900279490c7a8f6.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 (This used to be commit e57a896f06b16fe7e336e1ae63a0c9e4cc75fd36)
Diffstat (limited to 'source3/client/smbmount.c')
-rw-r--r--source3/client/smbmount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/client/smbmount.c b/source3/client/smbmount.c
index ad050063ec..0db990e8bd 100644
--- a/source3/client/smbmount.c
+++ b/source3/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();