From 70c5bed4b2ca4660e8a06cee6d4e813744cc7be8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 18 Aug 2010 16:48:20 +0200 Subject: s3: Replace calls to check_access by allow_access We already have both the name and address of the client stored now --- source3/smbd/process.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/smbd/process.c') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index d6acc829cf..126b6b797e 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1554,8 +1554,9 @@ static connection_struct *switch_message(uint8 type, struct smb_request *req, in /* does this protocol need to be run as guest? */ if ((flags & AS_GUEST) && (!change_to_guest() || - !check_access(sconn->sock, lp_hostsallow(-1), - lp_hostsdeny(-1)))) { + !allow_access(lp_hostsdeny(-1), lp_hostsallow(-1), + sconn->client_id.name, + sconn->client_id.addr))) { reply_nterror(req, NT_STATUS_ACCESS_DENIED); return conn; } @@ -2982,8 +2983,9 @@ void smbd_process(struct smbd_server_connection *sconn) * the hosts allow list. */ - if (!check_access(sconn->sock, lp_hostsallow(-1), - lp_hostsdeny(-1))) { + if (!allow_access(lp_hostsdeny(-1), lp_hostsallow(-1), + sconn->client_id.name, + sconn->client_id.addr)) { /* * send a negative session response "not listening on calling * name" -- cgit