summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-07-16 14:32:42 +1000
committerAndrew Tridgell <tridge@samba.org>2010-07-16 18:24:27 +1000
commit6b266b85cf34145ac1f03d8f787b81121e4ec92b (patch)
tree9f6faebdcf58c73e0297bfdf3b905ef256f8e478 /source4/auth
parente4c35c5a09dd66c9280caa39130b7e3b941b7e51 (diff)
downloadsamba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.gz
samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.bz2
samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.zip
s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/credentials/credentials.c6
-rw-r--r--source4/auth/credentials/credentials_files.c6
-rw-r--r--source4/auth/credentials/credentials_krb5.c12
-rw-r--r--source4/auth/credentials/pycredentials.c12
-rw-r--r--source4/auth/gensec/gensec.c6
-rw-r--r--source4/auth/gensec/gensec_gssapi.c8
-rw-r--r--source4/auth/gensec/pygensec.c2
-rw-r--r--source4/auth/gensec/schannel.c6
-rw-r--r--source4/auth/gensec/spnego.c2
-rw-r--r--source4/auth/kerberos/krb5_init_context.c4
-rw-r--r--source4/auth/ntlm/auth.c10
-rw-r--r--source4/auth/ntlm/auth_anonymous.c2
-rw-r--r--source4/auth/ntlm/auth_sam.c22
-rw-r--r--source4/auth/ntlm/auth_server.c18
-rw-r--r--source4/auth/ntlm/auth_unix.c10
-rw-r--r--source4/auth/ntlm/auth_util.c6
-rw-r--r--source4/auth/ntlmssp/ntlmssp_client.c10
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c10
-rw-r--r--source4/auth/pyauth.c6
-rw-r--r--source4/auth/samba_server_gensec.c2
-rw-r--r--source4/auth/session.c2
-rw-r--r--source4/auth/system_session.c14
22 files changed, 88 insertions, 88 deletions
diff --git a/source4/auth/credentials/credentials.c b/source4/auth/credentials/credentials.c
index 8aff75373e..acdcfdee69 100644
--- a/source4/auth/credentials/credentials.c
+++ b/source4/auth/credentials/credentials.c
@@ -669,9 +669,9 @@ _PUBLIC_ void cli_credentials_set_conf(struct cli_credentials *cred,
struct loadparm_context *lp_ctx)
{
cli_credentials_set_username(cred, "", CRED_UNINITIALISED);
- cli_credentials_set_domain(cred, lp_workgroup(lp_ctx), CRED_UNINITIALISED);
- cli_credentials_set_workstation(cred, lp_netbios_name(lp_ctx), CRED_UNINITIALISED);
- cli_credentials_set_realm(cred, lp_realm(lp_ctx), CRED_UNINITIALISED);
+ cli_credentials_set_domain(cred, lpcfg_workgroup(lp_ctx), CRED_UNINITIALISED);
+ cli_credentials_set_workstation(cred, lpcfg_netbios_name(lp_ctx), CRED_UNINITIALISED);
+ cli_credentials_set_realm(cred, lpcfg_realm(lp_ctx), CRED_UNINITIALISED);
}
/**
diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c
index 2e88cf4c4e..e0fd052cbc 100644
--- a/source4/auth/credentials/credentials_files.c
+++ b/source4/auth/credentials/credentials_files.c
@@ -361,7 +361,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr
cred->machine_account_pending = false;
filter = talloc_asprintf(cred, SECRETS_PRIMARY_DOMAIN_FILTER,
cli_credentials_get_domain(cred));
- status = cli_credentials_set_secrets(cred, event_context_find(cred), lp_ctx, NULL,
+ status = cli_credentials_set_secrets(cred, event_context_find(cred), lp_ctx, NULL,
SECRETS_PRIMARY_DOMAIN_DN,
filter, &error_string);
if (!NT_STATUS_IS_OK(status)) {
@@ -391,7 +391,7 @@ NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred,
filter = talloc_asprintf(cred, SECRETS_KRBTGT_SEARCH,
cli_credentials_get_realm(cred),
cli_credentials_get_domain(cred));
- status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL,
+ status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL,
SECRETS_PRINCIPALS_DN,
filter, &error_string);
if (!NT_STATUS_IS_OK(status)) {
@@ -423,7 +423,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *c
cli_credentials_get_realm(cred),
cli_credentials_get_domain(cred),
serviceprincipal);
- status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL,
+ status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL,
SECRETS_PRINCIPALS_DN, filter,
&error_string);
if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index f4ee2641d9..622f674bf8 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -41,7 +41,7 @@ _PUBLIC_ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
return 0;
}
- ret = smb_krb5_init_context(cred, event_ctx, lp_ctx,
+ ret = smb_krb5_init_context(cred, event_ctx, lp_ctx,
&cred->smb_krb5_context);
if (ret) {
cred->smb_krb5_context = NULL;
@@ -144,7 +144,7 @@ _PUBLIC_ int cli_credentials_set_ccache(struct cli_credentials *cred,
return ENOMEM;
}
- ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
+ ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
&ccc->smb_krb5_context);
if (ret) {
(*error_string) = error_message(ret);
@@ -216,7 +216,7 @@ static int cli_credentials_new_ccache(struct cli_credentials *cred,
return ENOMEM;
}
- ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
+ ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
&ccc->smb_krb5_context);
if (ret) {
talloc_free(ccc);
@@ -417,7 +417,7 @@ _PUBLIC_ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
return 0;
}
- ret = cli_credentials_get_ccache(cred, event_ctx, lp_ctx,
+ ret = cli_credentials_get_ccache(cred, event_ctx, lp_ctx,
&ccache, error_string);
if (ret) {
DEBUG(1, ("Failed to get CCACHE for GSSAPI client: %s\n", error_message(ret)));
@@ -607,7 +607,7 @@ _PUBLIC_ int cli_credentials_get_keytab(struct cli_credentials *cred,
return EINVAL;
}
- ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
+ ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
&smb_krb5_context);
if (ret) {
return ret;
@@ -683,7 +683,7 @@ _PUBLIC_ int cli_credentials_set_keytab_name(struct cli_credentials *cred,
_PUBLIC_ int cli_credentials_update_keytab(struct cli_credentials *cred,
struct tevent_context *event_ctx,
- struct loadparm_context *lp_ctx)
+ struct loadparm_context *lp_ctx)
{
krb5_error_code ret;
struct keytab_container *ktc;
diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c
index 361e4c9a1f..86ce63ef98 100644
--- a/source4/auth/credentials/pycredentials.c
+++ b/source4/auth/credentials/pycredentials.c
@@ -204,8 +204,8 @@ static PyObject *py_creds_guess(py_talloc_Object *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
return NULL;
- lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
- if (lp_ctx == NULL)
+ lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+ if (lp_ctx == NULL)
return NULL;
cli_credentials_guess(creds, lp_ctx);
@@ -225,8 +225,8 @@ static PyObject *py_creds_set_machine_account(py_talloc_Object *self, PyObject *
if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
return NULL;
- lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
- if (lp_ctx == NULL)
+ lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+ if (lp_ctx == NULL)
return NULL;
status = cli_credentials_set_machine_account(creds, lp_ctx);
@@ -270,8 +270,8 @@ static PyObject *py_creds_get_named_ccache(py_talloc_Object *self, PyObject *arg
if (!PyArg_ParseTuple(args, "|Os", &py_lp_ctx, &ccache_name))
return NULL;
- lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
- if (lp_ctx == NULL)
+ lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+ if (lp_ctx == NULL)
return NULL;
event_ctx = tevent_context_init(NULL);
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index b166d238de..3520585c95 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -47,7 +47,7 @@ _PUBLIC_ struct gensec_security_ops **gensec_security_all(void)
bool gensec_security_ops_enabled(struct gensec_security_ops *ops, struct gensec_security *security)
{
- return lp_parm_bool(security->settings->lp_ctx, NULL, "gensec", ops->name, ops->enabled);
+ return lpcfg_parm_bool(security->settings->lp_ctx, NULL, "gensec", ops->name, ops->enabled);
}
/* Sometimes we want to force only kerberos, sometimes we want to
@@ -1397,12 +1397,12 @@ static int sort_gensec(struct gensec_security_ops **gs1, struct gensec_security_
int gensec_setting_int(struct gensec_settings *settings, const char *mechanism, const char *name, int default_value)
{
- return lp_parm_int(settings->lp_ctx, NULL, mechanism, name, default_value);
+ return lpcfg_parm_int(settings->lp_ctx, NULL, mechanism, name, default_value);
}
bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism, const char *name, bool default_value)
{
- return lp_parm_bool(settings->lp_ctx, NULL, mechanism, name, default_value);
+ return lpcfg_parm_bool(settings->lp_ctx, NULL, mechanism, name, default_value);
}
/*
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index 88fbcce532..f28ab95dbd 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -247,7 +247,7 @@ static NTSTATUS gensec_gssapi_start(struct gensec_security *gensec_security)
return NT_STATUS_INTERNAL_ERROR;
}
- realm = lp_realm(gensec_security->settings->lp_ctx);
+ realm = lpcfg_realm(gensec_security->settings->lp_ctx);
if (realm != NULL) {
ret = gsskrb5_set_default_realm(realm);
if (ret) {
@@ -352,12 +352,12 @@ static NTSTATUS gensec_gssapi_client_start(struct gensec_security *gensec_securi
gensec_gssapi_state = talloc_get_type(gensec_security->private_data, struct gensec_gssapi_state);
principal = gensec_get_target_principal(gensec_security);
- if (principal && lp_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
+ if (principal && lpcfg_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
name_type = GSS_C_NULL_OID;
} else {
principal = talloc_asprintf(gensec_gssapi_state, "%s/%s@%s",
gensec_get_target_service(gensec_security),
- hostname, lp_realm(gensec_security->settings->lp_ctx));
+ hostname, lpcfg_realm(gensec_security->settings->lp_ctx));
name_type = GSS_C_NT_USER_NAME;
}
@@ -1364,7 +1364,7 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
ret = cli_credentials_set_client_gss_creds(session_info->credentials,
gensec_security->event_ctx,
- gensec_security->settings->lp_ctx,
+ gensec_security->settings->lp_ctx,
gensec_gssapi_state->delegated_cred_handle,
CRED_SPECIFIED, &error_string);
if (ret) {
diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c
index 3ae80ddaf3..fc76fad1be 100644
--- a/source4/auth/gensec/pygensec.c
+++ b/source4/auth/gensec/pygensec.c
@@ -69,7 +69,7 @@ static struct gensec_settings *settings_from_object(TALLOC_CTX *mem_ctx, PyObjec
}
s->target_hostname = PyString_AsString(py_hostname);
- s->lp_ctx = lp_from_py_object(s, py_lp_ctx);
+ s->lp_ctx = lpcfg_from_py_object(s, py_lp_ctx);
return s;
}
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c
index d4b29484f1..6f508b4a9d 100644
--- a/source4/auth/gensec/schannel.c
+++ b/source4/auth/gensec/schannel.c
@@ -126,15 +126,15 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
workstation = bind_schannel.oem_netbios_computer.a;
domain = bind_schannel.oem_netbios_domain.a;
- if (strcasecmp_m(domain, lp_workgroup(gensec_security->settings->lp_ctx)) != 0) {
+ if (strcasecmp_m(domain, lpcfg_workgroup(gensec_security->settings->lp_ctx)) != 0) {
DEBUG(3, ("Request for schannel to incorrect domain: %s != our domain %s\n",
- domain, lp_workgroup(gensec_security->settings->lp_ctx)));
+ domain, lpcfg_workgroup(gensec_security->settings->lp_ctx)));
return NT_STATUS_LOGON_FAILURE;
}
status = schannel_get_creds_state(out_mem_ctx,
- lp_private_dir(gensec_security->settings->lp_ctx),
+ lpcfg_private_dir(gensec_security->settings->lp_ctx),
workstation, &creds);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("Could not find session key for attempted schannel connection from %s: %s\n",
diff --git a/source4/auth/gensec/spnego.c b/source4/auth/gensec/spnego.c
index bbcba8dc5f..612216a0ed 100644
--- a/source4/auth/gensec/spnego.c
+++ b/source4/auth/gensec/spnego.c
@@ -827,7 +827,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (spnego.negTokenInit.targetPrincipal) {
DEBUG(5, ("Server claims it's principal name is %s\n", spnego.negTokenInit.targetPrincipal));
- if (lp_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
+ if (lpcfg_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
gensec_set_target_principal(gensec_security, spnego.negTokenInit.targetPrincipal);
}
}
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index 3bd938f0f0..ff356aa86f 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -398,7 +398,7 @@ smb_krb5_init_context_basic(TALLOC_CTX *tmp_ctx,
return ret;
}
- realm = lp_realm(lp_ctx);
+ realm = lpcfg_realm(lp_ctx);
if (realm != NULL) {
ret = krb5_set_default_realm(krb5_ctx, realm);
if (ret) {
@@ -480,7 +480,7 @@ krb5_error_code smb_krb5_init_context(void *parent_ctx,
/* Set options in kerberos */
krb5_set_dns_canonicalize_hostname((*smb_krb5_context)->krb5_context,
- lp_parm_bool(lp_ctx, NULL, "krb5", "set_dns_canonicalize", false));
+ lpcfg_parm_bool(lp_ctx, NULL, "krb5", "set_dns_canonicalize", false));
return 0;
}
diff --git a/source4/auth/ntlm/auth.c b/source4/auth/ntlm/auth.c
index a9c3262f07..17fbfca2aa 100644
--- a/source4/auth/ntlm/auth.c
+++ b/source4/auth/ntlm/auth.c
@@ -255,7 +255,7 @@ _PUBLIC_ struct tevent_req *auth_check_password_send(TALLOC_CTX *mem_ctx,
state->method = NULL;
if (!user_info->mapped_state) {
- nt_status = map_user_info(req, lp_workgroup(auth_ctx->lp_ctx),
+ nt_status = map_user_info(req, lpcfg_workgroup(auth_ctx->lp_ctx),
user_info, &user_info_tmp);
if (tevent_req_nterror(req, nt_status)) {
return tevent_req_post(req, ev);
@@ -478,15 +478,15 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
static const char **auth_methods_from_lp(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
{
const char **auth_methods = NULL;
- switch (lp_server_role(lp_ctx)) {
+ switch (lpcfg_server_role(lp_ctx)) {
case ROLE_STANDALONE:
- auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "standalone", NULL);
+ auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "standalone", NULL);
break;
case ROLE_DOMAIN_MEMBER:
- auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "member server", NULL);
+ auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "member server", NULL);
break;
case ROLE_DOMAIN_CONTROLLER:
- auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "domain controller", NULL);
+ auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "domain controller", NULL);
break;
}
return auth_methods;
diff --git a/source4/auth/ntlm/auth_anonymous.c b/source4/auth/ntlm/auth_anonymous.c
index c889071878..d5f1df2891 100644
--- a/source4/auth/ntlm/auth_anonymous.c
+++ b/source4/auth/ntlm/auth_anonymous.c
@@ -54,7 +54,7 @@ static NTSTATUS anonymous_check_password(struct auth_method_context *ctx,
const struct auth_usersupplied_info *user_info,
struct auth_serversupplied_info **_server_info)
{
- return auth_anonymous_server_info(mem_ctx, lp_netbios_name(ctx->auth_ctx->lp_ctx), _server_info);
+ return auth_anonymous_server_info(mem_ctx, lpcfg_netbios_name(ctx->auth_ctx->lp_ctx), _server_info);
}
static const struct auth_operations anonymous_auth_ops = {
diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c
index 6d1ed0ea10..fdcc5bd90e 100644
--- a/source4/auth/ntlm/auth_sam.c
+++ b/source4/auth/ntlm/auth_sam.c
@@ -99,7 +99,7 @@ static NTSTATUS authsam_password_ok(struct auth_context *auth_context,
*lm_sess_key = data_blob(NULL, 0);
*user_sess_key = data_blob(NULL, 0);
status = hash_password_check(mem_ctx,
- lp_lanman_auth(auth_context->lp_ctx),
+ lpcfg_lanman_auth(auth_context->lp_ctx),
user_info->password.hash.lanman,
user_info->password.hash.nt,
user_info->mapped.account_name,
@@ -109,8 +109,8 @@ static NTSTATUS authsam_password_ok(struct auth_context *auth_context,
case AUTH_PASSWORD_RESPONSE:
status = ntlm_password_check(mem_ctx,
- lp_lanman_auth(auth_context->lp_ctx),
- lp_ntlm_auth(auth_context->lp_ctx),
+ lpcfg_lanman_auth(auth_context->lp_ctx),
+ lpcfg_ntlm_auth(auth_context->lp_ctx),
user_info->logon_parameters,
&auth_context->challenge.data,
&user_info->password.response.lanman,
@@ -229,8 +229,8 @@ static NTSTATUS authsam_check_password_internals(struct auth_method_context *ctx
return nt_status;
}
- nt_status = authsam_make_server_info(tmp_ctx, ctx->auth_ctx->sam_ctx, lp_netbios_name(ctx->auth_ctx->lp_ctx),
- lp_sam_name(ctx->auth_ctx->lp_ctx),
+ nt_status = authsam_make_server_info(tmp_ctx, ctx->auth_ctx->sam_ctx, lpcfg_netbios_name(ctx->auth_ctx->lp_ctx),
+ lpcfg_sam_name(ctx->auth_ctx->lp_ctx),
domain_dn,
msg,
user_sess_key, lm_sess_key,
@@ -270,13 +270,13 @@ static NTSTATUS authsam_want_check(struct auth_method_context *ctx,
return NT_STATUS_NOT_IMPLEMENTED;
}
- is_local_name = lp_is_myname(ctx->auth_ctx->lp_ctx,
+ is_local_name = lpcfg_is_myname(ctx->auth_ctx->lp_ctx,
user_info->mapped.domain_name);
- is_my_domain = lp_is_mydomain(ctx->auth_ctx->lp_ctx,
+ is_my_domain = lpcfg_is_mydomain(ctx->auth_ctx->lp_ctx,
user_info->mapped.domain_name);
/* check whether or not we service this domain/workgroup name */
- switch (lp_server_role(ctx->auth_ctx->lp_ctx)) {
+ switch (lpcfg_server_role(ctx->auth_ctx->lp_ctx)) {
case ROLE_STANDALONE:
return NT_STATUS_OK;
@@ -297,7 +297,7 @@ static NTSTATUS authsam_want_check(struct auth_method_context *ctx,
return NT_STATUS_OK;
}
- DEBUG(6,("authsam_check_password: lp_server_role() has an undefined value\n"));
+ DEBUG(6,("authsam_check_password: lpcfg_server_role() has an undefined value\n"));
return NT_STATUS_NOT_IMPLEMENTED;
}
@@ -366,8 +366,8 @@ NTSTATUS authsam_get_server_info_principal(TALLOC_CTX *mem_ctx,
}
nt_status = authsam_make_server_info(tmp_ctx, auth_context->sam_ctx,
- lp_netbios_name(auth_context->lp_ctx),
- lp_workgroup(auth_context->lp_ctx),
+ lpcfg_netbios_name(auth_context->lp_ctx),
+ lpcfg_workgroup(auth_context->lp_ctx),
domain_dn,
msg,
user_sess_key, lm_sess_key,
diff --git a/source4/auth/ntlm/auth_server.c b/source4/auth/ntlm/auth_server.c
index 6bb07987b5..898e2cce67 100644
--- a/source4/auth/ntlm/auth_server.c
+++ b/source4/auth/ntlm/auth_server.c
@@ -49,13 +49,13 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
/* Make a connection to the target server, found by 'password server' in smb.conf */
- lp_smbcli_options(ctx->auth_ctx->lp_ctx, &smb_options);
+ lpcfg_smbcli_options(ctx->auth_ctx->lp_ctx, &smb_options);
/* Make a negprot, WITHOUT SPNEGO, so we get a challenge nice an easy */
io.in.options.use_spnego = false;
/* Hope we don't get * (the default), as this won't work... */
- host_list = lp_passwordserver(ctx->auth_ctx->lp_ctx);
+ host_list = lpcfg_passwordserver(ctx->auth_ctx->lp_ctx);
if (!host_list) {
return NT_STATUS_INTERNAL_ERROR;
}
@@ -63,16 +63,16 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
if (strequal(io.in.dest_host, "*")) {
return NT_STATUS_INTERNAL_ERROR;
}
- io.in.dest_ports = lp_smb_ports(ctx->auth_ctx->lp_ctx);
- io.in.socket_options = lp_socket_options(ctx->auth_ctx->lp_ctx);
- io.in.gensec_settings = lp_gensec_settings(mem_ctx, ctx->auth_ctx->lp_ctx);
+ io.in.dest_ports = lpcfg_smb_ports(ctx->auth_ctx->lp_ctx);
+ io.in.socket_options = lpcfg_socket_options(ctx->auth_ctx->lp_ctx);
+ io.in.gensec_settings = lpcfg_gensec_settings(mem_ctx, ctx->auth_ctx->lp_ctx);
io.in.called_name = strupper_talloc(mem_ctx, io.in.dest_host);
/* We don't want to get as far as the session setup */
io.in.credentials = cli_credentials_init_anon(mem_ctx);
cli_credentials_set_workstation(io.in.credentials,
- lp_netbios_name(ctx->auth_ctx->lp_ctx),
+ lpcfg_netbios_name(ctx->auth_ctx->lp_ctx),
CRED_SPECIFIED);
io.in.service = NULL;
@@ -81,9 +81,9 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
io.in.options = smb_options;
- lp_smbcli_session_options(ctx->auth_ctx->lp_ctx, &io.in.session_options);
+ lpcfg_smbcli_session_options(ctx->auth_ctx->lp_ctx, &io.in.session_options);
- status = smb_composite_connect(&io, mem_ctx, lp_resolve_context(ctx->auth_ctx->lp_ctx),
+ status = smb_composite_connect(&io, mem_ctx, lpcfg_resolve_context(ctx->auth_ctx->lp_ctx),
ctx->auth_ctx->event_ctx);
NT_STATUS_NOT_OK_RETURN(status);
@@ -147,7 +147,7 @@ static NTSTATUS server_check_password(struct auth_method_context *ctx,
session_setup.in.credentials = creds;
session_setup.in.workgroup = ""; /* Only used with SPNEGO, which we are not doing */
- session_setup.in.gensec_settings = lp_gensec_settings(session, ctx->auth_ctx->lp_ctx);
+ session_setup.in.gensec_settings = lpcfg_gensec_settings(session, ctx->auth_ctx->lp_ctx);
/* Check password with remove server - this should be async some day */
nt_status = smb_composite_sesssetup(session, &session_setup);
diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index aa68bb161e..1c026f6990 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -430,7 +430,7 @@ 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, struct loadparm_context *lp_ctx,
+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;
@@ -465,7 +465,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp
return nt_status;
}
- nt_status = smb_pam_auth(pamh, lp_null_passwords(lp_ctx), user_info->mapped.account_name);
+ nt_status = smb_pam_auth(pamh, lpcfg_null_passwords(lp_ctx), user_info->mapped.account_name);
if (!NT_STATUS_IS_OK(nt_status)) {
smb_pam_end(pamh);
return nt_status;
@@ -605,7 +605,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp
char *crypted;
struct passwd *pws;
NTSTATUS nt_status;
- int level = lp_passwordlevel(lp_ctx);
+ int level = lpcfg_passwordlevel(lp_ctx);
*ret_passwd = NULL;
@@ -708,7 +708,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp
#endif
if (crypted[0] == '\0') {
- if (!lp_null_passwords(lp_ctx)) {
+ if (!lpcfg_null_passwords(lp_ctx)) {
DEBUG(2, ("Disallowing %s with null password\n", username));
return NT_STATUS_LOGON_FAILURE;
}
@@ -814,7 +814,7 @@ static NTSTATUS authunix_check_password(struct auth_method_context *ctx,
return nt_status;
}
- nt_status = authunix_make_server_info(mem_ctx, lp_netbios_name(ctx->auth_ctx->lp_ctx),
+ nt_status = authunix_make_server_info(mem_ctx, lpcfg_netbios_name(ctx->auth_ctx->lp_ctx),
user_info, pwd, server_info);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(check_ctx);
diff --git a/source4/auth/ntlm/auth_util.c b/source4/auth/ntlm/auth_util.c
index 92df0bfe80..7da68a248b 100644
--- a/source4/auth/ntlm/auth_util.c
+++ b/source4/auth/ntlm/auth_util.c
@@ -140,8 +140,8 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
}
chall_blob = data_blob_talloc(mem_ctx, chal, 8);
- if (lp_client_ntlmv2_auth(auth_context->lp_ctx)) {
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_netbios_name(auth_context->lp_ctx), lp_workgroup(auth_context->lp_ctx));
+ if (lpcfg_client_ntlmv2_auth(auth_context->lp_ctx)) {
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx, lpcfg_netbios_name(auth_context->lp_ctx), lpcfg_workgroup(auth_context->lp_ctx));
DATA_BLOB lmv2_response, ntlmv2_response, lmv2_session_key, ntlmv2_session_key;
if (!SMBNTLMv2encrypt_hash(user_info_temp,
@@ -165,7 +165,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
SMBOWFencrypt(user_info_in->password.hash.nt->hash, chal, blob.data);
user_info_temp->password.response.nt = blob;
- if (lp_client_lanman_auth(auth_context->lp_ctx) && user_info_in->password.hash.lanman) {
+ if (lpcfg_client_lanman_auth(auth_context->lp_ctx) && user_info_in->password.hash.lanman) {
DATA_BLOB lm_blob = data_blob_talloc(mem_ctx, NULL, 24);
SMBOWFencrypt(user_info_in->password.hash.lanman->hash, chal, blob.data);
user_info_temp->password.response.lanman = lm_blob;
diff --git a/source4/auth/ntlmssp/ntlmssp_client.c b/source4/auth/ntlmssp/ntlmssp_client.c
index 005b42f4e8..1bbd4cc568 100644
--- a/source4/auth/ntlmssp/ntlmssp_client.c
+++ b/source4/auth/ntlmssp/ntlmssp_client.c
@@ -206,7 +206,7 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
if (ntlmssp_state->use_nt_response) {
flags |= CLI_CRED_NTLM_AUTH;
}
- if (lp_client_lanman_auth(gensec_security->settings->lp_ctx)) {
+ if (lpcfg_client_lanman_auth(gensec_security->settings->lp_ctx)) {
flags |= CLI_CRED_LANMAN_AUTH;
}
@@ -231,7 +231,7 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
}
if ((ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_LM_KEY)
- && lp_client_lanman_auth(gensec_security->settings->lp_ctx) && lm_session_key.length == 16) {
+ && lpcfg_client_lanman_auth(gensec_security->settings->lp_ctx) && lm_session_key.length == 16) {
DATA_BLOB new_session_key = data_blob_talloc(mem_ctx, NULL, 16);
if (lm_response.length == 24) {
SMBsesskeygen_lm_sess_key(lm_session_key.data, lm_response.data,
@@ -325,17 +325,17 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
ntlmssp_state->role = NTLMSSP_CLIENT;
- ntlmssp_state->domain = lp_workgroup(gensec_security->settings->lp_ctx);
+ ntlmssp_state->domain = lpcfg_workgroup(gensec_security->settings->lp_ctx);
ntlmssp_state->unicode = gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "unicode", true);
ntlmssp_state->use_nt_response = gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "send_nt_reponse", true);
- ntlmssp_state->allow_lm_key = (lp_client_lanman_auth(gensec_security->settings->lp_ctx)
+ ntlmssp_state->allow_lm_key = (lpcfg_client_lanman_auth(gensec_security->settings->lp_ctx)
&& (gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "allow_lm_key", false)
|| gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "lm_key", false)));
- ntlmssp_state->use_ntlmv2 = lp_client_ntlmv2_auth(gensec_security->settings->lp_ctx);
+ ntlmssp_state->use_ntlmv2 = lpcfg_client_ntlmv2_auth(gensec_security->settings->lp_ctx);
ntlmssp_state->expected_state = NTLMSSP_INITIAL;
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index 5562180f3a..a6ade2532b 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -724,7 +724,7 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
ntlmssp_state->expected_state = NTLMSSP_NEGOTIATE;
- ntlmssp_state->allow_lm_key = (lp_lanman_auth(gensec_security->settings->lp_ctx)
+ ntlmssp_state->allow_lm_key = (lpcfg_lanman_auth(gensec_security->settings->lp_ctx)
&& gensec_setting_bool(gensec_security->settings, "ntlmssp_server", "allow_lm_key", false));
ntlmssp_state->neg_flags =
@@ -766,22 +766,22 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
ntlmssp_state->may_set_challenge = auth_ntlmssp_may_set_challenge;
ntlmssp_state->set_challenge = auth_ntlmssp_set_challenge;
ntlmssp_state->check_password = auth_ntlmssp_check_password;
- if (lp_server_role(gensec_security->settings->lp_ctx) == ROLE_STANDALONE) {
+ if (lpcfg_server_role(gensec_security->settings->lp_ctx) == ROLE_STANDALONE) {
ntlmssp_state->server.is_standalone = true;
} else {
ntlmssp_state->server.is_standalone = false;
}
- ntlmssp_state->server.netbios_name = lp_netbios_name(gensec_security->settings->lp_ctx);
+ ntlmssp_state->server.netbios_name = lpcfg_netbios_name(gensec_security->settings->lp_ctx);
- ntlmssp_state->server.netbios_domain = lp_workgroup(gensec_security->settings->lp_ctx);
+ ntlmssp_state->server.netbios_domain = lpcfg_workgroup(gensec_security->settings->lp_ctx);
{
char dnsdomname[MAXHOSTNAMELEN], dnsname[MAXHOSTNAMELEN];
/* Find out the DNS domain name */
dnsdomname[0] = '\0';
- safe_strcpy(dnsdomname, lp_dnsdomain(gensec_security->settings->lp_ctx), sizeof(dnsdomname) - 1);
+ safe_strcpy(dnsdomname, lpcfg_dnsdomain(gensec_security->settings->lp_ctx), sizeof(dnsdomname) - 1);
/* Find out the DNS host name */
safe_strcpy(dnsname, ntlmssp_state->server.netbios_name, sizeof(dnsname) - 1);
diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c
index 2563b85570..ee4d511fba 100644
--- a/source4/auth/pyauth.c
+++ b/source4/auth/pyauth.c
@@ -46,7 +46,7 @@ static PyObject *py_system_session(PyObject *module, PyObject *args)
if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
return NULL;
- lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: Leaks memory */
+ lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: Leaks memory */
if (lp_ctx == NULL)
return NULL;
@@ -65,7 +65,7 @@ static PyObject *py_system_session_anon(PyObject *module, PyObject *args)
if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
return NULL;
- lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaks memory */
+ lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaks memory */
if (lp_ctx == NULL)
return NULL;
@@ -84,7 +84,7 @@ static PyObject *py_admin_session(PyObject *module, PyObject *args)
if (!PyArg_ParseTuple(args, "OO", &py_lp_ctx, &py_sid))
return NULL;
- lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+ lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
if (lp_ctx == NULL)
return NULL;
diff --git a/source4/auth/samba_server_gensec.c b/source4/auth/samba_server_gensec.c
index 31f52fc6b0..6d27a362e4 100644
--- a/source4/auth/samba_server_gensec.c
+++ b/source4/auth/samba_server_gensec.c
@@ -52,7 +52,7 @@ NTSTATUS samba_server_gensec_start(TALLOC_CTX *mem_ctx,
nt_status = gensec_server_start(mem_ctx,
event_ctx,
- lp_gensec_settings(mem_ctx, lp_ctx),
+ lpcfg_gensec_settings(mem_ctx, lp_ctx),
auth_context,
&gensec_ctx);
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source4/auth/session.c b/source4/auth/session.c
index e14644d6d8..024d8ec338 100644
--- a/source4/auth/session.c
+++ b/source4/auth/session.c
@@ -29,7 +29,7 @@
#include "auth/session_proto.h"
_PUBLIC_ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx,
- struct loadparm_context *lp_ctx)
+ struct loadparm_context *lp_ctx)
{
NTSTATUS nt_status;
struct auth_session_info *session_info = NULL;
diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c
index 31c9bd1a78..386f066de4 100644
--- a/source4/auth/system_session.c
+++ b/source4/auth/system_session.c
@@ -157,7 +157,7 @@ static int system_session_destructor(struct auth_session_info *info)
* trusted/prvilaged account), including the local machine account as
* the off-host credentials
*/
-_PUBLIC_ struct auth_session_info *system_session(struct loadparm_context *lp_ctx)
+_PUBLIC_ struct auth_session_info *system_session(struct loadparm_context *lp_ctx)
{
static struct auth_session_info *static_session;
NTSTATUS nt_status;
@@ -188,7 +188,7 @@ static NTSTATUS _auth_system_session_info(TALLOC_CTX *parent_ctx,
struct auth_session_info *session_info = NULL;
TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
- nt_status = auth_system_server_info(mem_ctx, lp_netbios_name(lp_ctx),
+ nt_status = auth_system_server_info(mem_ctx, lpcfg_netbios_name(lp_ctx),
&server_info);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
@@ -221,7 +221,7 @@ static NTSTATUS _auth_system_session_info(TALLOC_CTX *parent_ctx,
/*
Create a system session, but with anonymous credentials (so we do not need to open secrets.ldb)
*/
-_PUBLIC_ struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
+_PUBLIC_ struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
{
NTSTATUS nt_status;
struct auth_session_info *session_info = NULL;
@@ -240,7 +240,7 @@ _PUBLIC_ NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx,
{
return _auth_system_session_info(parent_ctx,
lp_ctx,
- lp_parm_bool(lp_ctx, NULL, "system", "anonymous", false),
+ lpcfg_parm_bool(lp_ctx, NULL, "system", "anonymous", false),
_session_info);
}
@@ -458,8 +458,8 @@ static NTSTATUS auth_domain_admin_session_info(TALLOC_CTX *parent_ctx,
struct auth_session_info *session_info = NULL;
TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
- nt_status = auth_domain_admin_server_info(mem_ctx, lp_netbios_name(lp_ctx),
- lp_workgroup(lp_ctx), domain_sid,
+ nt_status = auth_domain_admin_server_info(mem_ctx, lpcfg_netbios_name(lp_ctx),
+ lpcfg_workgroup(lp_ctx), domain_sid,
&server_info);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
@@ -519,7 +519,7 @@ _PUBLIC_ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
nt_status = auth_anonymous_server_info(mem_ctx,
- lp_netbios_name(lp_ctx),
+ lpcfg_netbios_name(lp_ctx),
&server_info);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);