summaryrefslogtreecommitdiff
path: root/source4/auth/ntlm
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/ntlm
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/ntlm')
-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
6 files changed, 34 insertions, 34 deletions
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;