summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/service.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 2bfed9deb5..0ebf87f3a6 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -424,10 +424,10 @@ int find_service(fstring service)
This function modifies dev, ecode.
****************************************************************************/
-static NTSTATUS share_sanity_checks(int snum, fstring dev)
+static NTSTATUS share_sanity_checks(int server_sock, int snum, fstring dev)
{
if (!lp_snum_ok(snum) ||
- !check_access(smbd_server_fd(),
+ !check_access(server_sock,
lp_hostsallow(snum), lp_hostsdeny(snum))) {
return NT_STATUS_ACCESS_DENIED;
}
@@ -659,7 +659,8 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
fstrcpy(dev, pdev);
- if (NT_STATUS_IS_ERR(*pstatus = share_sanity_checks(snum, dev))) {
+ *pstatus = share_sanity_checks(sconn->sock, snum, dev);
+ if (NT_STATUS_IS_ERR(*pstatus)) {
goto err_root_exit;
}