diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-03-23 09:00:27 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-03-23 09:00:27 +0000 |
commit | 1c92b99c80632bfdaeba60be2ba885ad84285460 (patch) | |
tree | 84604580a05a4583d89dd080c15f7ce6684bdaf9 | |
parent | 6cea14ebd5738f9912999f0d018a51f767ad1056 (diff) | |
download | samba-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)
-rw-r--r-- | source3/smbd/session.c | 10 |
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(); } |