summaryrefslogtreecommitdiff
path: root/source3/smbd/sesssetup.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/smbd/sesssetup.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/smbd/sesssetup.c')
-rw-r--r--source3/smbd/sesssetup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 2e9e54b8d9..f6d536f301 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -385,7 +385,6 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
uint32 auth_flags = AUTH_FLAG_NONE;
auth_usersupplied_info *user_info = NULL;
auth_serversupplied_info *server_info = NULL;
- extern fstring remote_machine;
/* we must have setup the auth context by now */
if (!ntlmssp_auth_context) {
@@ -422,7 +421,9 @@ static int reply_spnego_auth(connection_struct *conn, char *inbuf, char *outbuf,
/* the client has given us its machine name (which we otherwise would not get on port 445).
we need to possibly reload smb.conf if smb.conf includes depend on the machine name */
- fstrcpy(remote_machine, machine);
+
+ set_remote_machine_name(machine);
+
reload_services(True);
#if 0