summaryrefslogtreecommitdiff
path: root/source3/smbd/session.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-03-23 09:00:27 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-03-23 09:00:27 +0000
commit1c92b99c80632bfdaeba60be2ba885ad84285460 (patch)
tree84604580a05a4583d89dd080c15f7ce6684bdaf9 /source3/smbd/session.c
parent6cea14ebd5738f9912999f0d018a51f767ad1056 (diff)
downloadsamba-1c92b99c80632bfdaeba60be2ba885ad84285460.tar.gz
samba-1c92b99c80632bfdaeba60be2ba885ad84285460.tar.bz2
samba-1c92b99c80632bfdaeba60be2ba885ad84285460.zip
Correctly store the hostname of the remote machine if so configured. If the
reverse DNS fails, then store the IP. (This used to be commit d97771aa80b48fbdb9cae3e9712e35fcc895b148)
Diffstat (limited to 'source3/smbd/session.c')
-rw-r--r--source3/smbd/session.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/session.c b/source3/smbd/session.c
index 6f9d62edfd..05a7b24da2 100644
--- a/source3/smbd/session.c
+++ b/source3/smbd/session.c
@@ -78,11 +78,13 @@ BOOL session_claim(user_struct *vuser)
}
/* If 'hostname lookup' == yes, then do the DNS lookup. This is
- needed becouse utmp and PAM both expect DNS names */
+ needed becouse utmp and PAM both expect DNS names
+
+ client_name() handles this case internally.
+ */
- if (lp_hostname_lookups()) {
- hostname = client_name();
- } else {
+ hostname = client_name();
+ if (strcmp(hostname, "UNKNOWN") == 0) {
hostname = client_addr();
}