1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

smbd: remove useless allow_access() check for AS_GUEST

We already call allow_access() when we accept the connection
in smbd_add_connection().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-05-23 14:23:17 +02:00
parent 51407b90d9
commit 9393d95f22

View File

@ -1661,33 +1661,10 @@ static connection_struct *switch_message(uint8_t type, struct smb_request *req)
* messenger service requests have this...)
*/
if (flags & AS_GUEST) {
char *raddr;
bool ok;
if (!change_to_guest()) {
reply_nterror(req, NT_STATUS_ACCESS_DENIED);
return conn;
}
raddr = tsocket_address_inet_addr_string(xconn->remote_address,
talloc_tos());
if (raddr == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
return conn;
}
/*
* Haven't we checked this in smbd_process already???
*/
ok = allow_access(lp_hosts_deny(-1), lp_hosts_allow(-1),
xconn->remote_hostname, raddr);
TALLOC_FREE(raddr);
if (!ok) {
reply_nterror(req, NT_STATUS_ACCESS_DENIED);
return conn;
}
}
/*