diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-10-03 03:31:41 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-10-03 03:31:41 +0000 |
commit | 08387abd7d6f581dd1954fe05b7b28a1fa71bcd8 (patch) | |
tree | 7ebdbf0b503914d07af27e19e7f13d576b9bda80 /source3/lib/util_sock.c | |
parent | 3a5577e552d7723138ccd638848716659492133b (diff) | |
download | samba-08387abd7d6f581dd1954fe05b7b28a1fa71bcd8.tar.gz samba-08387abd7d6f581dd1954fe05b7b28a1fa71bcd8.tar.bz2 samba-08387abd7d6f581dd1954fe05b7b28a1fa71bcd8.zip |
Another patch from Steve Langasek <vorlon@netexpress.net>, again from the
Debian patchset.
The idea is to still allow DNS domains to be specified in 'hosts allow' and
'hosts deny' without making the admin set 'hostname lookups' in their smb.conf.
His concern is about upgrades.
This has been designed not to change the value of %M.
Andrew Bartlett
(This used to be commit f428ee98d83a55922c991b0eeddd47891b80d918)
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r-- | source3/lib/util_sock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index fc2abf976f..04c20f6596 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -832,7 +832,7 @@ void client_setfd(int fd) char *client_name(void) { - return get_socket_name(client_fd); + return get_socket_name(client_fd,False); } char *client_addr(void) @@ -890,7 +890,7 @@ static BOOL matchname(char *remotehost,struct in_addr addr) /******************************************************************* return the DNS name of the remote end of a socket ******************************************************************/ -char *get_socket_name(int fd) +char *get_socket_name(int fd, BOOL force_lookup) { static pstring name_buf; static fstring addr_buf; @@ -902,7 +902,7 @@ char *get_socket_name(int fd) situations won't work because many networks don't link dhcp with dns. To avoid the delay we avoid the lookup if possible */ - if (!lp_hostname_lookups()) { + if (!lp_hostname_lookups() && (force_lookup == False)) { return get_socket_addr(fd); } |