summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-12 22:25:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:44 -0500
commit18bb363537cf486002ce83a12c824b32adbb6470 (patch)
tree151a1228bcaea181203c47e3f90f9341cb247b6a
parentb4a1e760c9b8c8ff05e36fd93ef16d9ee5889073 (diff)
downloadsamba-18bb363537cf486002ce83a12c824b32adbb6470.tar.gz
samba-18bb363537cf486002ce83a12c824b32adbb6470.tar.bz2
samba-18bb363537cf486002ce83a12c824b32adbb6470.zip
r10946: Use the right name for the remote workstation, and always initialise it.
Should fix a valgrind error volker is seeing. Andrew Bartlett (This used to be commit 11957c5f37fe0a0be465a9ce9d6d256724c5951c)
-rw-r--r--source4/smb_server/sesssetup.c8
-rw-r--r--source4/smb_server/smb_server.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c
index 6cdf398860..1fa04b99e5 100644
--- a/source4/smb_server/sesssetup.c
+++ b/source4/smb_server/sesssetup.c
@@ -63,8 +63,8 @@ static NTSTATUS sesssetup_old(struct smbsrv_request *req, union smb_sesssetup *s
req->smb_conn->negotiate.max_send = sess->old.in.bufsize;
}
- if (req->smb_conn->negotiate.called_name) {
- remote_machine = req->smb_conn->negotiate.called_name->name;
+ if (req->smb_conn->negotiate.calling_name) {
+ remote_machine = req->smb_conn->negotiate.calling_name->name;
}
if (!remote_machine) {
@@ -172,8 +172,8 @@ static NTSTATUS sesssetup_nt1(struct smbsrv_request *req, union smb_sesssetup *s
auth_context = req->smb_conn->negotiate.auth_context;
}
- if (req->smb_conn->negotiate.called_name) {
- remote_machine = req->smb_conn->negotiate.called_name->name;
+ if (req->smb_conn->negotiate.calling_name) {
+ remote_machine = req->smb_conn->negotiate.calling_name->name;
}
if (!remote_machine) {
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index d1fdd2b116..ccfc6c9c7b 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -767,6 +767,9 @@ static void smbsrv_accept(struct stream_connection *conn)
smb_conn->negotiate.zone_offset = get_time_zone(time(NULL));
+ smb_conn->negotiate.called_name = NULL;
+ smb_conn->negotiate.calling_name = NULL;
+
smbsrv_vuid_init(smb_conn);
srv_init_signing(smb_conn);