summaryrefslogtreecommitdiff
path: root/source3/auth/pass_check.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth/pass_check.c')
-rw-r--r--source3/auth/pass_check.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index 5943761277..a4bc6b509c 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -553,7 +553,14 @@ core of password checking routine
static NTSTATUS password_check(const char *password, void *private_data)
{
#ifdef WITH_PAM
- return smb_pam_passcheck(get_this_user(), password);
+ const char *rhost;
+ char addr[INET6_ADDRSTRLEN];
+
+ rhost = client_name(smbd_server_fd());
+ if (strequal(rhost,"UNKNOWN"))
+ rhost = client_addr(smbd_server_fd(), addr, sizeof(addr));
+
+ return smb_pam_passcheck(get_this_user(), rhost, password);
#else
bool ret;