From 35ac9d287f000c27dc864789b341bebe7acb4c74 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 26 Oct 2002 02:20:59 +0000 Subject: Try to catch up on the code I've put into HEAD that should be in 3.0: - vorlan's hosts allow with DNS names patch - use x_fileno() in debug.c, not the struct directly. - check for server timeout on password change (was reporting success) - better error/status loggin in both the pam_winbind client and winbindd_pam server code. - (pdb_ldap) don't set the ldap version twice - we do it on every bind anyway. (This used to be commit 9fa1863d8e7788eda83911ca2610754486b33069) --- source3/lib/access.c | 6 +++--- source3/lib/debug.c | 2 +- source3/lib/util_sock.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/access.c b/source3/lib/access.c index 4e524735e4..a39bc6df76 100644 --- a/source3/lib/access.c +++ b/source3/lib/access.c @@ -316,20 +316,20 @@ BOOL check_access(int sock, char **allow_list, char **deny_list) else { DEBUG (3, ("check_access: hostnames in host allow/deny list.\n")); - ret = allow_access(deny_list,allow_list, get_socket_name(sock), + ret = allow_access(deny_list,allow_list, get_socket_name(sock,True), get_socket_addr(sock)); } if (ret) { DEBUG(2,("Allowed connection from %s (%s)\n", - only_ip ? "" : get_socket_name(sock), + only_ip ? "" : get_socket_name(sock,True), get_socket_addr(sock))); } else { DEBUG(0,("Denied connection from %s (%s)\n", - only_ip ? "" : get_socket_name(sock), + only_ip ? "" : get_socket_name(sock,True), get_socket_addr(sock))); } } diff --git a/source3/lib/debug.c b/source3/lib/debug.c index f4f3ee2f9f..483db71b85 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -603,7 +603,7 @@ BOOL reopen_logs( void ) (void)umask(oldumask); /* Take over stderr to catch ouput into logs */ - if (dbf && sys_dup2(dbf->fd, 2) == -1) { + if (dbf && sys_dup2(x_fileno(dbf), 2) == -1) { close_low_fds(True); /* Close stderr too, if dup2 can't point it at the logfile */ } 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); } -- cgit