summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-04 01:51:36 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:03 +0100
commit9ebcd7a0df117158f1817b7d3a9a21ad4e1fa97a (patch)
treeb42e57b02397f6ae230282cc76161f502f9e8b2b /source4
parent71ae20df2c7e346c4b115bbed7c579c881369fdb (diff)
downloadsamba-9ebcd7a0df117158f1817b7d3a9a21ad4e1fa97a.tar.gz
samba-9ebcd7a0df117158f1817b7d3a9a21ad4e1fa97a.tar.bz2
samba-9ebcd7a0df117158f1817b7d3a9a21ad4e1fa97a.zip
r26277: Move loadparm context higher up the stack.
(This used to be commit 38fa08310ce573e9b46e76c840ddda6f18863573)
Diffstat (limited to 'source4')
-rw-r--r--source4/client/smbmount.c10
-rw-r--r--source4/kdc/hdb-ldb.c2
-rw-r--r--source4/lib/ldb/tools/cmdline.c3
-rw-r--r--source4/libcli/ldap/ldap_bind.c3
-rw-r--r--source4/libnet/libnet_become_dc.c3
-rw-r--r--source4/librpc/rpc/dcerpc.h1
-rw-r--r--source4/librpc/rpc/dcerpc_connect.c8
7 files changed, 18 insertions, 12 deletions
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index 907405535e..36271c9a2e 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -409,7 +409,7 @@ static void send_fs_socket(struct loadparm_context *lp_ctx,
DEBUG(2,("mount.smbfs[%d]: got signal, getting new socket\n", sys_getpid()));
c = do_connection(the_service,
lp_unicode(lp_ctx),
- lp_cli_maxprotocol(global_loadparm));
+ lp_cli_maxprotocol(lp_ctx));
}
}
@@ -422,7 +422,7 @@ static void send_fs_socket(struct loadparm_context *lp_ctx,
/**
* Mount a smbfs
**/
-static void init_mount(void)
+static void init_mount(struct loadparm_context *lp_ctx)
{
char mount_point[MAXPATHLEN+1];
pstring tmp;
@@ -437,7 +437,7 @@ static void init_mount(void)
}
- c = do_connection(service, lp_unicode(global_loadparm), lp_cli_maxprotocol(global_loadparm));
+ c = do_connection(service, lp_unicode(lp_ctx), lp_cli_maxprotocol(lp_ctx));
if (!c) {
fprintf(stderr,"SMB connection failed\n");
exit(1);
@@ -530,7 +530,7 @@ static void init_mount(void)
for any reason, we will have to unmount the mount point. There
is no exit from the next call...
*/
- send_fs_socket(global_loadparm, service, mount_point, c);
+ send_fs_socket(lp_ctx, service, mount_point, c);
}
@@ -923,6 +923,6 @@ static void parse_mount_smb(int argc, char **argv)
}
strupper(my_netbios_name);
- init_mount();
+ init_mount(global_loadparm);
return 0;
}
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 95a6b502a4..7448b6fba5 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -1134,7 +1134,7 @@ NTSTATUS kdc_hdb_ldb_create(TALLOC_CTX *mem_ctx,
CRED_DONT_USE_KERBEROS);
/* Setup the link to LDB */
- (*db)->hdb_db = samdb_connect(*db, global_loadparm, session_info);
+ (*db)->hdb_db = samdb_connect(*db, lp_ctx, session_info);
if ((*db)->hdb_db == NULL) {
DEBUG(1, ("hdb_ldb_create: Cannot open samdb for KDC backend!"));
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index e2df0a1b66..aff730c178 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -39,7 +39,8 @@
/**
process command line options
*/
-struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv,
+struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb,
+ int argc, const char **argv,
void (*usage)(void))
{
static struct ldb_cmdline options; /* needs to be static for older compilers */
diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c
index 60bfb52e2d..99b471e9a6 100644
--- a/source4/libcli/ldap/ldap_bind.c
+++ b/source4/libcli/ldap/ldap_bind.c
@@ -199,7 +199,8 @@ static struct ldap_message *new_ldap_sasl_bind_msg(struct ldap_connection *conn,
/*
perform a sasl bind using the given credentials
*/
-NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, struct cli_credentials *creds)
+NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
+ struct cli_credentials *creds)
{
NTSTATUS status;
TALLOC_CTX *tmp_ctx = NULL;
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index e8b1632e73..0f8b86fddf 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -784,7 +784,8 @@ static void becomeDC_recv_cldap(struct cldap_request *req)
becomeDC_connect_ldap1(s);
}
-static NTSTATUS becomeDC_ldap_connect(struct libnet_BecomeDC_state *s, struct becomeDC_ldap *ldap)
+static NTSTATUS becomeDC_ldap_connect(struct libnet_BecomeDC_state *s,
+ struct becomeDC_ldap *ldap)
{
char *url;
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index b53f786618..ff827e50f2 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -177,6 +177,7 @@ struct dcerpc_pipe_connect {
const char *pipe_name;
const struct ndr_interface_table *interface;
struct cli_credentials *creds;
+ const char **name_resolve_order;
};
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c
index 6c6441790b..4870b8d54a 100644
--- a/source4/librpc/rpc/dcerpc_connect.c
+++ b/source4/librpc/rpc/dcerpc_connect.c
@@ -205,8 +205,9 @@ static void continue_smb2_connect(struct composite_context *ctx)
Initiate async open of a rpc connection request on SMB2 using
the binding structure to determine the endpoint and options
*/
-static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb2_send(TALLOC_CTX *mem_ctx,
- struct dcerpc_pipe_connect *io)
+static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb2_send(
+ TALLOC_CTX *mem_ctx,
+ struct dcerpc_pipe_connect *io)
{
struct composite_context *c;
struct pipe_np_smb2_state *s;
@@ -235,7 +236,7 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb2_send(TALLOC_C
/* send smb2 connect request */
conn_req = smb2_connect_send(mem_ctx, s->io.binding->host, "IPC$",
- lp_name_resolve_order(global_loadparm),
+ s->io.name_resolve_order,
s->io.creds,
c->event_ctx);
composite_continue(c, conn_req, continue_smb2_connect, c);
@@ -518,6 +519,7 @@ static void continue_connect(struct composite_context *c, struct pipe_connect_st
pc.binding = s->binding;
pc.interface = s->table;
pc.creds = s->credentials;
+ pc.name_resolve_order = lp_name_resolve_order(global_loadparm);
/* connect dcerpc pipe depending on required transport */
switch (s->binding->transport) {