From a8d1d0c94cf1bcc60d68d0385d8f092271d0145c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Jun 2011 09:09:16 +1000 Subject: s3-auth Use loadparm_init_s3() to get an lp_ctx for auth_samba4 This avoids loading the smb.conf twice. Andrew Bartlett --- source3/auth/auth_samba4.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'source3/auth/auth_samba4.c') diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c index 57c07dd716..a4673db3c9 100644 --- a/source3/auth/auth_samba4.c +++ b/source3/auth/auth_samba4.c @@ -42,22 +42,9 @@ static NTSTATUS check_samba4_security(const struct auth_context *auth_context, struct loadparm_context *lp_ctx; const char *config_file; - lp_ctx = loadparm_init(frame); + lp_ctx = loadparm_init_s3(frame, loadparm_s3_context()); if (lp_ctx == NULL) { - DEBUG(10, ("loadparm_init failed\n")); - talloc_free(frame); - return NT_STATUS_INVALID_SERVER_STATE; - } - - if (lp_loaded()) { - config_file = lp_configfile(); - } - if (!config_file || !config_file[0]) { - config_file = get_dyn_CONFIGFILE(); - } - - if (!lpcfg_load(lp_ctx, config_file)) { - DEBUG(1, ("s4 lpcfg_load() of s3 config file %s failed", config_file)); + DEBUG(10, ("loadparm_init_s3 failed\n")); talloc_free(frame); return NT_STATUS_INVALID_SERVER_STATE; } -- cgit