mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
r26277: Move loadparm context higher up the stack.
(This used to be commit 38fa08310ce573e9b46e76c840ddda6f18863573)
This commit is contained in:
parent
71ae20df2c
commit
9ebcd7a0df
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user