summaryrefslogtreecommitdiff
path: root/source4/winbind
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-28 01:17:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:25 -0500
commit37d53832a4623653f706e77985a79d84bd7c6694 (patch)
tree265e308027d6641bbdb29a4feddbe86ef8b25fd1 /source4/winbind
parente09226cb35d627affddc08c4a88527184b8ffcf9 (diff)
downloadsamba-37d53832a4623653f706e77985a79d84bd7c6694.tar.gz
samba-37d53832a4623653f706e77985a79d84bd7c6694.tar.bz2
samba-37d53832a4623653f706e77985a79d84bd7c6694.zip
r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839c6e5ca4de2c3c042f12f369ac5f238)
Diffstat (limited to 'source4/winbind')
-rw-r--r--source4/winbind/wb_cmd_getpwnam.c4
-rw-r--r--source4/winbind/wb_cmd_getpwuid.c4
-rw-r--r--source4/winbind/wb_dom_info.c3
-rw-r--r--source4/winbind/wb_dom_info_trusted.c2
-rw-r--r--source4/winbind/wb_init_domain.c10
-rw-r--r--source4/winbind/wb_pam_auth.c8
-rw-r--r--source4/winbind/wb_samba3_cmd.c6
-rw-r--r--source4/winbind/wb_server.c6
-rw-r--r--source4/winbind/wb_sid2domain.c2
-rw-r--r--source4/winbind/wb_utils.c4
10 files changed, 25 insertions, 24 deletions
diff --git a/source4/winbind/wb_cmd_getpwnam.c b/source4/winbind/wb_cmd_getpwnam.c
index 059fae5201..653b598ac3 100644
--- a/source4/winbind/wb_cmd_getpwnam.c
+++ b/source4/winbind/wb_cmd_getpwnam.c
@@ -124,12 +124,12 @@ static void cmd_getpwnam_recv_user_info(struct composite_context *ctx)
WBSRV_SAMBA3_SET_STRING(pw->pw_name, user_info->out.account_name);
WBSRV_SAMBA3_SET_STRING(pw->pw_passwd, "*");
WBSRV_SAMBA3_SET_STRING(pw->pw_gecos, user_info->out.full_name);
- WBSRV_SAMBA3_SET_STRING(pw->pw_dir, lp_template_homedir());
+ WBSRV_SAMBA3_SET_STRING(pw->pw_dir, lp_template_homedir(global_loadparm));
all_string_sub(pw->pw_dir, "%WORKGROUP%", state->workgroup_name,
sizeof(fstring) - 1);
all_string_sub(pw->pw_dir, "%ACCOUNTNAME%", user_info->out.account_name,
sizeof(fstring) - 1);
- WBSRV_SAMBA3_SET_STRING(pw->pw_shell, lp_template_shell());
+ WBSRV_SAMBA3_SET_STRING(pw->pw_shell, lp_template_shell(global_loadparm));
state->group_sid = dom_sid_dup(state, user_info->out.primary_group_sid);
if(composite_nomem(state->group_sid, state->ctx)) return;
diff --git a/source4/winbind/wb_cmd_getpwuid.c b/source4/winbind/wb_cmd_getpwuid.c
index f47090d2a3..339f7e896c 100644
--- a/source4/winbind/wb_cmd_getpwuid.c
+++ b/source4/winbind/wb_cmd_getpwuid.c
@@ -148,12 +148,12 @@ static void cmd_getpwuid_recv_user_info(struct composite_context *ctx)
WBSRV_SAMBA3_SET_STRING(pw->pw_name, user_info->out.account_name);
WBSRV_SAMBA3_SET_STRING(pw->pw_passwd, "*");
WBSRV_SAMBA3_SET_STRING(pw->pw_gecos, user_info->out.full_name);
- WBSRV_SAMBA3_SET_STRING(pw->pw_dir, lp_template_homedir());
+ WBSRV_SAMBA3_SET_STRING(pw->pw_dir, lp_template_homedir(global_loadparm));
all_string_sub(pw->pw_dir, "%WORKGROUP%", state->workgroup,
sizeof(fstring) - 1);
all_string_sub(pw->pw_dir, "%ACCOUNTNAME%", user_info->out.account_name,
sizeof(fstring) - 1);
- WBSRV_SAMBA3_SET_STRING(pw->pw_shell, lp_template_shell());
+ WBSRV_SAMBA3_SET_STRING(pw->pw_shell, lp_template_shell(global_loadparm));
pw->pw_uid = state->uid;
diff --git a/source4/winbind/wb_dom_info.c b/source4/winbind/wb_dom_info.c
index f07daaec9a..13d446897e 100644
--- a/source4/winbind/wb_dom_info.c
+++ b/source4/winbind/wb_dom_info.c
@@ -68,7 +68,8 @@ struct composite_context *wb_get_dom_info_send(TALLOC_CTX *mem_ctx,
if (dom_sid == NULL) goto failed;
ctx = finddcs_send(mem_ctx, domain_name, NBT_NAME_LOGON,
- dom_sid, lp_name_resolve_order(), service->task->event_ctx,
+ dom_sid, lp_name_resolve_order(global_loadparm),
+ service->task->event_ctx,
service->task->msg_ctx);
if (ctx == NULL) goto failed;
diff --git a/source4/winbind/wb_dom_info_trusted.c b/source4/winbind/wb_dom_info_trusted.c
index c5e6383c5c..23436fa67a 100644
--- a/source4/winbind/wb_dom_info_trusted.c
+++ b/source4/winbind/wb_dom_info_trusted.c
@@ -193,7 +193,7 @@ static void trusted_dom_info_recv_dcname(struct rpc_request *req)
make_nbt_name(&name, state->info->dcs[0].name, 0x20);
ctx = resolve_name_send(&name, state->service->task->event_ctx,
- lp_name_resolve_order());
+ lp_name_resolve_order(global_loadparm));
composite_continue(state->ctx, ctx, trusted_dom_info_recv_dcaddr,
state);
diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c
index 21fbb6a2b7..7d050d5c67 100644
--- a/source4/winbind/wb_init_domain.c
+++ b/source4/winbind/wb_init_domain.c
@@ -151,7 +151,7 @@ struct composite_context *wb_init_domain_send(TALLOC_CTX *mem_ctx,
cli_credentials_set_event_context(state->domain->libnet_ctx->cred, service->task->event_ctx);
- cli_credentials_set_conf(state->domain->libnet_ctx->cred);
+ cli_credentials_set_conf(state->domain->libnet_ctx->cred, global_loadparm);
/* Connect the machine account to the credentials */
state->ctx->status =
@@ -163,14 +163,14 @@ struct composite_context *wb_init_domain_send(TALLOC_CTX *mem_ctx,
state->domain->netlogon_pipe = NULL;
if ((!cli_credentials_is_anonymous(state->domain->libnet_ctx->cred)) &&
- ((lp_server_role() == ROLE_DOMAIN_MEMBER) ||
- (lp_server_role() == ROLE_DOMAIN_CONTROLLER)) &&
+ ((lp_server_role(global_loadparm) == ROLE_DOMAIN_MEMBER) ||
+ (lp_server_role(global_loadparm) == ROLE_DOMAIN_CONTROLLER)) &&
(dom_sid_equal(state->domain->info->sid,
state->service->primary_sid))) {
state->domain->netlogon_binding->flags |= DCERPC_SCHANNEL;
/* For debugging, it can be a real pain if all the traffic is encrypted */
- if (lp_winbind_sealed_pipes()) {
+ if (lp_winbind_sealed_pipes(global_loadparm)) {
state->domain->netlogon_binding->flags |= (DCERPC_SIGN | DCERPC_SEAL );
} else {
state->domain->netlogon_binding->flags |= (DCERPC_SIGN);
@@ -216,7 +216,7 @@ static void init_domain_recv_netlogonpipe(struct composite_context *ctx)
state->domain->lsa_binding = init_domain_binding(state, &ndr_table_lsarpc);
/* For debugging, it can be a real pain if all the traffic is encrypted */
- if (lp_winbind_sealed_pipes()) {
+ if (lp_winbind_sealed_pipes(global_loadparm)) {
state->domain->lsa_binding->flags |= (DCERPC_SIGN | DCERPC_SEAL );
} else {
state->domain->lsa_binding->flags |= (DCERPC_SIGN);
diff --git a/source4/winbind/wb_pam_auth.c b/source4/winbind/wb_pam_auth.c
index ef19c32331..4a9be62228 100644
--- a/source4/winbind/wb_pam_auth.c
+++ b/source4/winbind/wb_pam_auth.c
@@ -172,7 +172,7 @@ static void pam_auth_crap_recv_logon(struct composite_context *ctx)
state->unix_username = talloc_asprintf(state, "%s%s%s",
state->domain_name,
- lp_winbind_separator(),
+ lp_winbind_separator(global_loadparm),
state->user_name);
if (composite_nomem(state->unix_username, state->ctx)) return;
@@ -217,11 +217,11 @@ struct composite_context *wb_cmd_pam_auth_send(TALLOC_CTX *mem_ctx,
DATA_BLOB chal, nt_resp, lm_resp, names_blob;
int flags = CLI_CRED_NTLM_AUTH;
- if (lp_client_lanman_auth()) {
+ if (lp_client_lanman_auth(global_loadparm)) {
flags |= CLI_CRED_LANMAN_AUTH;
}
- if (lp_client_ntlmv2_auth()) {
+ if (lp_client_ntlmv2_auth(global_loadparm)) {
flags |= CLI_CRED_NTLMv2_AUTH;
}
@@ -231,7 +231,7 @@ struct composite_context *wb_cmd_pam_auth_send(TALLOC_CTX *mem_ctx,
if (!credentials) {
return NULL;
}
- cli_credentials_set_conf(credentials);
+ cli_credentials_set_conf(credentials, global_loadparm);
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
cli_credentials_set_username(credentials, user, CRED_SPECIFIED);
diff --git a/source4/winbind/wb_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c
index 56a168ebb0..3ca2b02f4a 100644
--- a/source4/winbind/wb_samba3_cmd.c
+++ b/source4/winbind/wb_samba3_cmd.c
@@ -86,7 +86,7 @@ NTSTATUS wbsrv_samba3_interface_version(struct wbsrv_samba3_call *s3call)
NTSTATUS wbsrv_samba3_info(struct wbsrv_samba3_call *s3call)
{
s3call->response.result = WINBINDD_OK;
- s3call->response.data.info.winbind_separator = *lp_winbind_separator();
+ s3call->response.data.info.winbind_separator = *lp_winbind_separator(global_loadparm);
WBSRV_SAMBA3_SET_STRING(s3call->response.data.info.samba_version,
SAMBA_VERSION_STRING);
return NT_STATUS_OK;
@@ -96,7 +96,7 @@ NTSTATUS wbsrv_samba3_domain_name(struct wbsrv_samba3_call *s3call)
{
s3call->response.result = WINBINDD_OK;
WBSRV_SAMBA3_SET_STRING(s3call->response.data.domain_name,
- lp_workgroup());
+ lp_workgroup(global_loadparm));
return NT_STATUS_OK;
}
@@ -104,7 +104,7 @@ NTSTATUS wbsrv_samba3_netbios_name(struct wbsrv_samba3_call *s3call)
{
s3call->response.result = WINBINDD_OK;
WBSRV_SAMBA3_SET_STRING(s3call->response.data.netbios_name,
- lp_netbios_name());
+ lp_netbios_name(global_loadparm));
return NT_STATUS_OK;
}
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index 8a3f9e3154..161168e049 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -129,7 +129,7 @@ static void winbind_task_init(struct task_server *task)
}
/* Make sure the directory for the Samba3 socket exists, and is of the correct permissions */
- if (!directory_create_or_exist(lp_winbindd_socket_directory(), geteuid(), 0755)) {
+ if (!directory_create_or_exist(lp_winbindd_socket_directory(global_loadparm), geteuid(), 0755)) {
task_server_terminate(task,
"Cannot create winbindd pipe directory");
return;
@@ -140,7 +140,7 @@ static void winbind_task_init(struct task_server *task)
service->task = task;
service->primary_sid = secrets_get_domain_sid(service,
- lp_workgroup());
+ lp_workgroup(global_loadparm));
if (service->primary_sid == NULL) {
task_server_terminate(
task, nt_errstr(NT_STATUS_CANT_ACCESS_DOMAIN_INFO));
@@ -151,7 +151,7 @@ static void winbind_task_init(struct task_server *task)
listen_socket = talloc(service, struct wbsrv_listen_socket);
if (!listen_socket) goto nomem;
listen_socket->socket_path = talloc_asprintf(listen_socket, "%s/%s",
- lp_winbindd_socket_directory(),
+ lp_winbindd_socket_directory(global_loadparm),
WINBINDD_SAMBA3_SOCKET);
if (!listen_socket->socket_path) goto nomem;
listen_socket->service = service;
diff --git a/source4/winbind/wb_sid2domain.c b/source4/winbind/wb_sid2domain.c
index d813df00d1..8336449602 100644
--- a/source4/winbind/wb_sid2domain.c
+++ b/source4/winbind/wb_sid2domain.c
@@ -85,7 +85,7 @@ struct composite_context *wb_sid2domain_send(TALLOC_CTX *mem_ctx,
if (dom_sid_equal(service->primary_sid, sid) ||
dom_sid_in_domain(service->primary_sid, sid)) {
- ctx = wb_get_dom_info_send(state, service, lp_workgroup(),
+ ctx = wb_get_dom_info_send(state, service, lp_workgroup(global_loadparm),
service->primary_sid);
if (ctx == NULL) goto failed;
ctx->async.fn = sid2domain_recv_dom_info;
diff --git a/source4/winbind/wb_utils.c b/source4/winbind/wb_utils.c
index b9d46af8c2..5fb14c1b4c 100644
--- a/source4/winbind/wb_utils.c
+++ b/source4/winbind/wb_utils.c
@@ -30,10 +30,10 @@
BOOL wb_samba3_split_username(TALLOC_CTX *mem_ctx, const char *domuser,
char **domain, char **user)
{
- char *p = strchr(domuser, *lp_winbind_separator());
+ char *p = strchr(domuser, *lp_winbind_separator(global_loadparm));
if (p == NULL) {
- *domain = talloc_strdup(mem_ctx, lp_workgroup());
+ *domain = talloc_strdup(mem_ctx, lp_workgroup(global_loadparm));
} else {
*domain = talloc_strndup(mem_ctx, domuser,
PTR_DIFF(p, domuser));