diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-07 09:09:16 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-07 09:11:01 +1000 |
commit | a8d1d0c94cf1bcc60d68d0385d8f092271d0145c (patch) | |
tree | b05a33524b41a231caf6ff0bbe0e68847be34910 | |
parent | 5197331fe5af0a53e02e642c9e006b19ae92ba19 (diff) | |
download | samba-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
-rw-r--r-- | source3/auth/auth_samba4.c | 17 |
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; } |