summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-15 09:24:30 +0200
committerVolker Lendecke <vl@samba.org>2010-08-16 22:39:24 +0200
commit05604b315b41a8af02dc7e28436625cd5236bfbd (patch)
tree9262fbf1afc8534845f0e00b1d3ecae87fa6abc2 /source3
parenta98604d7f281f890fefd23e23e887c2199842484 (diff)
downloadsamba-05604b315b41a8af02dc7e28436625cd5236bfbd.tar.gz
samba-05604b315b41a8af02dc7e28436625cd5236bfbd.tar.bz2
samba-05604b315b41a8af02dc7e28436625cd5236bfbd.zip
s3: Remove smbd_server_fd() from setup_new_vc_session
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/sesssetup.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 1d8fe16203..a80e4f0b8c 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -1408,7 +1408,7 @@ static int shutdown_other_smbds(const struct connections_key *key,
return 0;
}
-static void setup_new_vc_session(struct messaging_context *msg_ctx)
+static void setup_new_vc_session(struct smbd_server_connection *sconn)
{
DEBUG(2,("setup_new_vc_session: New VC == 0, if NT4.x "
"compatible we would close all old resources.\n"));
@@ -1417,12 +1417,18 @@ static void setup_new_vc_session(struct messaging_context *msg_ctx)
invalidate_all_vuids();
#endif
if (lp_reset_on_zero_vc()) {
- char addr[INET6_ADDRSTRLEN];
+ char *addr;
struct shutdown_state state;
- state.ip = client_addr(smbd_server_fd(),addr,sizeof(addr));
- state.msg_ctx = msg_ctx;
+ addr = tsocket_address_inet_addr_string(
+ sconn->remote_address, talloc_tos());
+ if (addr == NULL) {
+ return;
+ }
+ state.ip = addr;
+ state.msg_ctx = sconn->msg_ctx;
connections_forall_read(shutdown_other_smbds, &state);
+ TALLOC_FREE(addr);
}
}
@@ -1477,7 +1483,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
}
if (SVAL(req->vwv+4, 0) == 0) {
- setup_new_vc_session(req->sconn->msg_ctx);
+ setup_new_vc_session(req->sconn);
}
reply_sesssetup_and_X_spnego(req);
@@ -1674,7 +1680,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
}
if (SVAL(req->vwv+4, 0) == 0) {
- setup_new_vc_session(req->sconn->msg_ctx);
+ setup_new_vc_session(req->sconn);
}
DEBUG(3,("sesssetupX:name=[%s]\\[%s]@[%s]\n",