summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-06-16 15:45:18 +0200
committerAndrew Bartlett <abartlet@samba.org>2011-07-04 18:28:24 +1000
commitae05a7aec62d9ffcb02ee17d0f5f18e1e7ab1803 (patch)
tree1088c0054f22f438ce7641ef4538724cbe405321 /source3
parentad0f765a096015f223fbb45ed96c19b821e0bb44 (diff)
downloadsamba-ae05a7aec62d9ffcb02ee17d0f5f18e1e7ab1803.tar.gz
samba-ae05a7aec62d9ffcb02ee17d0f5f18e1e7ab1803.tar.xz
samba-ae05a7aec62d9ffcb02ee17d0f5f18e1e7ab1803.zip
s3-smbd: Replace client_id in smbd reply.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 28a3f2d1c10..72fee8cee16 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -39,6 +39,7 @@
#include "libsmb/nmblib.h"
#include "auth.h"
#include "smbprofile.h"
+#include "../lib/tsocket/tsocket.h"
/****************************************************************************
Ensure we check the path in *exactly* the same way as W2K for a findfirst/findnext
@@ -572,7 +573,15 @@ void reply_special(struct smbd_server_connection *sconn, char *inbuf, size_t inb
*/
if (strequal(name1, "*SMBSERVER ")
|| strequal(name1, "*SMBSERV ")) {
- fstrcpy(name1, sconn->client_id.addr);
+ char *raddr;
+
+ raddr = tsocket_address_inet_addr_string(sconn->remote_address,
+ talloc_tos());
+ if (raddr == NULL) {
+ exit_server_cleanly("could not allocate raddr");
+ }
+
+ fstrcpy(name1, raddr);
}
set_local_machine_name(name1, True);