summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-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();
}