summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-28 16:33:00 +0200
committerVolker Lendecke <vl@samba.org>2010-08-29 21:55:23 +0200
commit4a58c640cce3b37d5eef62caddd15f64ef8befbe (patch)
treef39760fd4203157f2151d5d27364334752d5cd38 /source3/smbd
parent8d256b8f30e726bec6755712121840d3a4c9b620 (diff)
downloadsamba-4a58c640cce3b37d5eef62caddd15f64ef8befbe.tar.gz
samba-4a58c640cce3b37d5eef62caddd15f64ef8befbe.tar.bz2
samba-4a58c640cce3b37d5eef62caddd15f64ef8befbe.zip
s3: Set the client_id in substitute.c once
This never changes during a client connection's life, so we can set it once.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 7d257692e9..cbd6a9c405 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -61,6 +61,7 @@ int smbd_server_fd(void)
static void smbd_set_server_fd(int fd)
{
struct smbd_server_connection *sconn = smbd_server_conn;
+ char addr[INET6_ADDRSTRLEN];
const char *name;
server_fd = fd;
@@ -82,6 +83,10 @@ static void smbd_set_server_fd(int fd)
}
sconn->client_id.name =
(name != NULL) ? name : sconn->client_id.addr;
+
+ sub_set_socket_ids(sconn->client_id.addr, sconn->client_id.name,
+ client_socket_addr(sconn->sock, addr,
+ sizeof(addr)));
}
struct event_context *smbd_event_context(void)