summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/credentials_files.c5
-rw-r--r--source4/client/cifsdd.c6
-rw-r--r--source4/lib/charset/charcnv.c3
-rw-r--r--source4/param/share_classic.c8
-rw-r--r--source4/rpc_server/samr/samr_password.c5
-rw-r--r--source4/smbd/server.c3
-rw-r--r--source4/torture/libnet/libnet_BecomeDC.c3
-rw-r--r--source4/torture/locktest.c8
-rw-r--r--source4/torture/rpc/drsuapi.c4
-rw-r--r--source4/torture/rpc/drsuapi_cracknames.c7
-rw-r--r--source4/web_server/http.c10
-rw-r--r--source4/winbind/wb_server.c2
12 files changed, 38 insertions, 26 deletions
diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c
index 1f4b467371..e7435f56f8 100644
--- a/source4/auth/credentials/credentials_files.c
+++ b/source4/auth/credentials/credentials_files.c
@@ -346,7 +346,8 @@ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cred)
* @param cred Credentials structure to fill in
* @retval NTSTATUS error detailing any failure
*/
-NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred)
+NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred,
+ struct loadparm_context *lp_ctx)
{
char *filter;
/* Bleh, nasty recursion issues: We are setting a machine
@@ -356,7 +357,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));
- return cli_credentials_set_secrets(cred, global_loadparm, NULL,
+ return cli_credentials_set_secrets(cred, lp_ctx, NULL,
SECRETS_PRINCIPALS_DN,
filter);
}
diff --git a/source4/client/cifsdd.c b/source4/client/cifsdd.c
index aa63edcd7a..06a5f79ed7 100644
--- a/source4/client/cifsdd.c
+++ b/source4/client/cifsdd.c
@@ -426,10 +426,10 @@ static int copy_files(struct loadparm_context *lp_ctx)
return(EOM_EXIT_CODE);
}
- set_max_xmit(global_loadparm, MAX(ibs, obs));
+ set_max_xmit(lp_ctx, MAX(ibs, obs));
DEBUG(4, ("IO buffer size is %llu, max xmit is %d\n",
- (unsigned long long)iomax, lp_max_xmit(global_loadparm)));
+ (unsigned long long)iomax, lp_max_xmit(lp_ctx)));
if (!(ifile = open_file("if"))) {
return(FILESYS_EXIT_CODE);
@@ -443,7 +443,7 @@ static int copy_files(struct loadparm_context *lp_ctx)
ifile->io_seek(ifile, check_arg_numeric("skip") * ibs);
ofile->io_seek(ofile, check_arg_numeric("seek") * obs);
- DEBUG(4, ("max xmit was negotiated to be %d\n", lp_max_xmit(global_loadparm)));
+ DEBUG(4, ("max xmit was negotiated to be %d\n", lp_max_xmit(lp_ctx)));
for (data_size = 0;;) {
diff --git a/source4/lib/charset/charcnv.c b/source4/lib/charset/charcnv.c
index 804358d06b..6bb72af8e1 100644
--- a/source4/lib/charset/charcnv.c
+++ b/source4/lib/charset/charcnv.c
@@ -274,7 +274,8 @@ _PUBLIC_ ssize_t convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_
if (descriptor == (smb_iconv_t)-1 || descriptor == (smb_iconv_t)0) {
/* conversion not supported, return -1*/
DEBUG(3, ("convert_string_talloc: conversion from %s to %s not supported!\n",
- charset_name(global_loadparm, from), charset_name(global_loadparm, to)));
+ charset_name(global_loadparm, from),
+ charset_name(global_loadparm, to)));
return -1;
}
diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c
index 2dc40e3e25..7a0c2873f4 100644
--- a/source4/param/share_classic.c
+++ b/source4/param/share_classic.c
@@ -23,7 +23,9 @@
#include "param/share.h"
#include "param/param.h"
-static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, struct share_context **ctx)
+static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx,
+ const struct share_ops *ops,
+ struct share_context **ctx)
{
*ctx = talloc(mem_ctx, struct share_context);
if (!*ctx) {
@@ -37,7 +39,9 @@ static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops,
return NT_STATUS_OK;
}
-static const char *sclassic_string_option(struct share_config *scfg, const char *opt_name, const char *defval)
+static const char *sclassic_string_option(struct share_config *scfg,
+ const char *opt_name,
+ const char *defval)
{
struct loadparm_service *s = talloc_get_type(scfg->opaque,
struct loadparm_service);
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index 97ccf30679..ccd9907514 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -38,8 +38,9 @@
/*
samr_ChangePasswordUser
*/
-NTSTATUS dcesrv_samr_ChangePasswordUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
- struct samr_ChangePasswordUser *r)
+NTSTATUS dcesrv_samr_ChangePasswordUser(struct dcesrv_call_state *dce_call,
+ TALLOC_CTX *mem_ctx,
+ struct samr_ChangePasswordUser *r)
{
struct dcesrv_handle *h;
struct samr_account_state *a_state;
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index a62846b091..434f8882c1 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -334,7 +334,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
}
DEBUG(0,("%s: using '%s' process model\n", binary_name, model));
- status = server_service_startup(event_ctx, global_loadparm, model, lp_server_services(global_loadparm));
+ status = server_service_startup(event_ctx, global_loadparm, model,
+ lp_server_services(global_loadparm));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Starting Services failed - %s\n", nt_errstr(status)));
return 1;
diff --git a/source4/torture/libnet/libnet_BecomeDC.c b/source4/torture/libnet/libnet_BecomeDC.c
index 9f05380b48..6044e358c4 100644
--- a/source4/torture/libnet/libnet_BecomeDC.c
+++ b/source4/torture/libnet/libnet_BecomeDC.c
@@ -254,7 +254,8 @@ static NTSTATUS test_become_dc_prepare_db(void *private_data,
talloc_free(s->ldb);
- DEBUG(0,("Open the SAM LDB with system credentials: %s\n", s->path.samdb_ldb));
+ DEBUG(0,("Open the SAM LDB with system credentials: %s\n",
+ s->path.samdb_ldb));
s->ldb = ldb_wrap_connect(s, global_loadparm, s->path.samdb_ldb,
system_session(s, global_loadparm),
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index 7d111be12b..381abaebc6 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -105,7 +105,8 @@ static struct record *recorded;
/*****************************************************
return a connection to a server
*******************************************************/
-static struct smbcli_state *connect_one(char *share, int snum, int conn)
+static struct smbcli_state *connect_one(struct loadparm_context *lp_ctx,
+ char *share, int snum, int conn)
{
struct smbcli_state *c;
fstring server, myname;
@@ -124,7 +125,7 @@ static struct smbcli_state *connect_one(char *share, int snum, int conn)
char **unc_list = NULL;
int num_unc_names;
const char *p;
- p = lp_parm_string(global_loadparm, NULL, "torture", "unclist");
+ p = lp_parm_string(lp_ctx, NULL, "torture", "unclist");
if (p) {
char *h, *s;
unc_list = file_lines_load(p, &num_unc_names, NULL);
@@ -183,7 +184,8 @@ static void reconnect(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], int fnum
}
talloc_free(cli[server][conn]);
}
- cli[server][conn] = connect_one(share[server], server, conn);
+ cli[server][conn] = connect_one(global_loadparm, share[server],
+ server, conn);
if (!cli[server][conn]) {
DEBUG(0,("Failed to connect to %s\n", share[server]));
exit(1);
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 7fc2406bbf..5e01c2050c 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -719,7 +719,7 @@ bool torture_rpc_drsuapi(struct torture_context *torture)
#endif
ret &= test_DsGetDomainControllerInfo(p, torture, &priv);
- ret &= test_DsCrackNames(p, torture, &priv);
+ ret &= test_DsCrackNames(torture, p, torture, &priv);
ret &= test_DsWriteAccountSpn(p, torture, &priv);
@@ -771,7 +771,7 @@ bool torture_rpc_drsuapi_cracknames(struct torture_context *torture)
/* We don't care if this fails, we just need some info from it */
test_DsGetDomainControllerInfo(p, torture, &priv);
- ret &= test_DsCrackNames(p, torture, &priv);
+ ret &= test_DsCrackNames(torture, p, torture, &priv);
ret &= test_DsUnbind(p, torture, &priv);
}
diff --git a/source4/torture/rpc/drsuapi_cracknames.c b/source4/torture/rpc/drsuapi_cracknames.c
index ac3eebfa68..89d9b7bd34 100644
--- a/source4/torture/rpc/drsuapi_cracknames.c
+++ b/source4/torture/rpc/drsuapi_cracknames.c
@@ -204,8 +204,9 @@ static bool test_DsCrackNamesMatrix(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
-bool test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
- struct DsPrivate *priv)
+bool test_DsCrackNames(struct torture_context *tctx,
+ struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ struct DsPrivate *priv)
{
NTSTATUS status;
struct drsuapi_DsCrackNames r;
@@ -589,7 +590,7 @@ bool test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
.comment = "display name for Microsoft Support Account",
.status = DRSUAPI_DS_NAME_STATUS_OK,
.alternate_status = DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE,
- .skip = lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)
+ .skip = torture_setting_bool(tctx, "samba4", false)
},
{
.format_offered = DRSUAPI_DS_NAME_FORMAT_GUID,
diff --git a/source4/web_server/http.c b/source4/web_server/http.c
index 558cc79eb9..bd6efa9262 100644
--- a/source4/web_server/http.c
+++ b/source4/web_server/http.c
@@ -139,7 +139,8 @@ static int http_readFile(EspHandle handle,
const char *path,
const char *base_dir)
{
- struct websrv_context *web = talloc_get_type(handle, struct websrv_context);
+ struct websrv_context *web = talloc_get_type(handle,
+ struct websrv_context);
int fd = -1;
struct stat st;
*buf = NULL;
@@ -169,12 +170,11 @@ failed:
return -1;
}
-static int http_readFileFromSwatDir(EspHandle handle,
- char **buf,
- int *len,
+static int http_readFileFromSwatDir(EspHandle handle, char **buf, int *len,
const char *path)
{
- return http_readFile(handle, buf, len, path, lp_swat_directory(global_loadparm));
+ return http_readFile(handle, buf, len, path,
+ lp_swat_directory(global_loadparm));
}
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index 87ffc5b98e..c9c6516732 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -60,7 +60,7 @@ static void wbsrv_accept(struct stream_connection *conn)
}
wbconn->conn = conn;
wbconn->listen_socket = listen_socket;
- wbconn->lp_ctx = global_loadparm;
+ wbconn->lp_ctx = listen_socket->service->task->lp_ctx;
conn->private = wbconn;
wbconn->packet = packet_init(wbconn);