From 6ddba1e99b48afc53cf5bc7a2900279490c7a8f6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 10 Aug 2002 23:20:04 +0000 Subject: 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) --- source3/client/smbmount.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/client') 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(); -- cgit