diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-02 17:09:43 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:47:02 +0100 |
commit | 2fa338cdc99276a5f85ad54cb88b372ffe8ab063 (patch) | |
tree | 7895291f7e8accda90aa896bb3b4c25d898a96c5 /source4/auth | |
parent | 33f26f8e547dae1c06282d6e6f89b3b37979a730 (diff) | |
download | samba-2fa338cdc99276a5f85ad54cb88b372ffe8ab063.tar.gz samba-2fa338cdc99276a5f85ad54cb88b372ffe8ab063.tar.bz2 samba-2fa338cdc99276a5f85ad54cb88b372ffe8ab063.zip |
r26226: Avoid more uses of global_loadparm.
(This used to be commit 6cbce47a3eaef76a89db7cd0ab0d4f6441fc720d)
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/auth_unix.c | 12 | ||||
-rw-r--r-- | source4/auth/gensec/gensec.c | 4 | ||||
-rw-r--r-- | source4/auth/gensec/gensec.h | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/source4/auth/auth_unix.c b/source4/auth/auth_unix.c index d06c73cc34..4cbe3723a8 100644 --- a/source4/auth/auth_unix.c +++ b/source4/auth/auth_unix.c @@ -427,7 +427,8 @@ static NTSTATUS smb_pam_setcred(pam_handle_t *pamh, const char * user) return pam_to_nt_status(pam_error); } -static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersupplied_info *user_info, struct passwd **pws) +static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx, + const struct auth_usersupplied_info *user_info, struct passwd **pws) { struct smb_pam_user_info *info; struct pam_conv *pamconv; @@ -590,7 +591,8 @@ static NTSTATUS password_check(const char *username, const char *password, #endif /* HAVE_BIGCRYPT && HAVE_CRYPT && USE_BOTH_CRYPT_CALLS */ } -static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersupplied_info *user_info, struct passwd **ret_passwd) +static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx, + const struct auth_usersupplied_info *user_info, struct passwd **ret_passwd) { char *username; char *password; @@ -599,7 +601,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersuppl char *crypted; struct passwd *pws; NTSTATUS nt_status; - int level = lp_passwordlevel(global_loadparm); + int level = lp_passwordlevel(lp_ctx); *ret_passwd = NULL; @@ -702,7 +704,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, const struct auth_usersuppl #endif if (crypted[0] == '\0') { - if (!lp_null_passwords(global_loadparm)) { + if (!lp_null_passwords(lp_ctx)) { DEBUG(2, ("Disallowing %s with null password\n", username)); return NT_STATUS_LOGON_FAILURE; } @@ -802,7 +804,7 @@ static NTSTATUS authunix_check_password(struct auth_method_context *ctx, return NT_STATUS_NO_MEMORY; } - nt_status = check_unix_password(check_ctx, user_info, &pwd); + nt_status = check_unix_password(check_ctx, global_loadparm, user_info, &pwd); if (!NT_STATUS_IS_OK(nt_status)) { talloc_free(check_ctx); return nt_status; diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c index 4821e6a19b..1da0cf631b 100644 --- a/source4/auth/gensec/gensec.c +++ b/source4/auth/gensec/gensec.c @@ -1259,7 +1259,7 @@ static int sort_gensec(struct gensec_security_ops **gs1, struct gensec_security_ /* initialise the GENSEC subsystem */ -NTSTATUS gensec_init(void) +NTSTATUS gensec_init(struct loadparm_context *lp_ctx) { static bool initialized = false; @@ -1269,7 +1269,7 @@ NTSTATUS gensec_init(void) if (initialized) return NT_STATUS_OK; initialized = true; - shared_init = load_samba_modules(NULL, global_loadparm, "gensec"); + shared_init = load_samba_modules(NULL, lp_ctx, "gensec"); run_init_functions(static_init); run_init_functions(shared_init); diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h index bda740cc86..6263edd687 100644 --- a/source4/auth/gensec/gensec.h +++ b/source4/auth/gensec/gensec.h @@ -165,6 +165,8 @@ struct gensec_critical_sizes { int sizeof_gensec_security; }; +struct loadparm_context; + #include "auth/gensec/gensec_proto.h" #endif /* __GENSEC_H__ */ |