summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-07 09:09:16 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-07 09:11:01 +1000
commita8d1d0c94cf1bcc60d68d0385d8f092271d0145c (patch)
treeb05a33524b41a231caf6ff0bbe0e68847be34910 /source3
parent5197331fe5af0a53e02e642c9e006b19ae92ba19 (diff)
downloadsamba-a8d1d0c94cf1bcc60d68d0385d8f092271d0145c.tar.gz
samba-a8d1d0c94cf1bcc60d68d0385d8f092271d0145c.tar.bz2
samba-a8d1d0c94cf1bcc60d68d0385d8f092271d0145c.zip
s3-auth Use loadparm_init_s3() to get an lp_ctx for auth_samba4
This avoids loading the smb.conf twice. Andrew Bartlett
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_samba4.c17
1 files changed, 2 insertions, 15 deletions
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;
}