summaryrefslogtreecommitdiff
path: root/source3/auth/pampass.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-21 14:41:01 +0200
committerVolker Lendecke <vl@samba.org>2010-08-27 21:59:09 +0200
commit9322fa4077a9c15c9b5431ac2369b50bfffbb73d (patch)
tree918e4666b72cb39ffd50d4778c37fbeb7101a164 /source3/auth/pampass.c
parent26ee30585dbffd7e887c48ddf0900fe0afd90e47 (diff)
downloadsamba-9322fa4077a9c15c9b5431ac2369b50bfffbb73d.tar.gz
samba-9322fa4077a9c15c9b5431ac2369b50bfffbb73d.tar.bz2
samba-9322fa4077a9c15c9b5431ac2369b50bfffbb73d.zip
s3: Lift smbd_server_fd() from smb_pam_passcheck
Diffstat (limited to 'source3/auth/pampass.c')
-rw-r--r--source3/auth/pampass.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 2f8c4cc416..7c09c1630a 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -806,13 +806,12 @@ NTSTATUS smb_pam_accountcheck(const char *user, const char *rhost)
* PAM Password Validation Suite
*/
-NTSTATUS smb_pam_passcheck(const char * user, const char * password)
+NTSTATUS smb_pam_passcheck(const char * user, const char * password,
+ const char * rhost)
{
pam_handle_t *pamh = NULL;
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
struct pam_conv *pconv = NULL;
- const char *rhost;
- char addr[INET6_ADDRSTRLEN];
/*
* Note we can't ignore PAM here as this is the only
@@ -823,10 +822,6 @@ NTSTATUS smb_pam_passcheck(const char * user, const char * password)
if ((pconv = smb_setup_pam_conv(smb_pam_conv, user, password, NULL)) == NULL)
return NT_STATUS_LOGON_FAILURE;
- rhost = client_name(smbd_server_fd());
- if (strequal(rhost,"UNKNOWN"))
- rhost = client_addr(smbd_server_fd(), addr, sizeof(addr));
-
if (!smb_pam_start(&pamh, user, rhost, pconv))
return NT_STATUS_LOGON_FAILURE;