diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-02 19:04:33 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:47:06 +0100 |
commit | cc04f143dcd35fb67884e385ffd3e6ed2d32a4c2 (patch) | |
tree | b543f309338aff262df5dba69bb12fdb24b5b825 /source4/auth/auth_unix.c | |
parent | 51db4c3f3d81d1ed03beae6426786c843ac59807 (diff) | |
download | samba-cc04f143dcd35fb67884e385ffd3e6ed2d32a4c2.tar.gz samba-cc04f143dcd35fb67884e385ffd3e6ed2d32a4c2.tar.bz2 samba-cc04f143dcd35fb67884e385ffd3e6ed2d32a4c2.zip |
r26229: Set loadparm context as opaque pointer in ldb, remove more uses of global_loadparm.
(This used to be commit 37d05fdc7b0e6b3211ba6ae56b1b5da30a6a392a)
Diffstat (limited to 'source4/auth/auth_unix.c')
-rw-r--r-- | source4/auth/auth_unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/auth/auth_unix.c b/source4/auth/auth_unix.c index 9efbe5dc12..fac04fd735 100644 --- a/source4/auth/auth_unix.c +++ b/source4/auth/auth_unix.c @@ -308,7 +308,7 @@ static NTSTATUS smb_pam_end(pam_handle_t *pamh) /* * PAM Authentication Handler */ -static NTSTATUS smb_pam_auth(pam_handle_t *pamh, const char *user) +static NTSTATUS smb_pam_auth(pam_handle_t *pamh, bool allow_null_passwords, const char *user) { int pam_error; @@ -319,7 +319,7 @@ static NTSTATUS smb_pam_auth(pam_handle_t *pamh, const char *user) DEBUG(4,("smb_pam_auth: PAM: Authenticate User: %s\n", user)); - pam_error = pam_authenticate(pamh, PAM_SILENT | lp_null_passwords(global_loadparm) ? 0 : PAM_DISALLOW_NULL_AUTHTOK); + pam_error = pam_authenticate(pamh, PAM_SILENT | allow_null_passwords ? 0 : PAM_DISALLOW_NULL_AUTHTOK); switch( pam_error ){ case PAM_AUTH_ERR: DEBUG(2, ("smb_pam_auth: PAM: Authentication Error for user %s\n", user)); @@ -461,7 +461,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp return nt_status; } - nt_status = smb_pam_auth(pamh, user_info->mapped.account_name); + nt_status = smb_pam_auth(pamh, lp_null_passwords(lp_ctx), user_info->mapped.account_name); if (!NT_STATUS_IS_OK(nt_status)) { smb_pam_end(pamh); return nt_status; |