Author: jelmer
Date: 2007-12-04 01:51:36 +0000 (Tue, 04 Dec 2007)
New Revision: 26277

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26277

Log:
Move loadparm context higher up the stack.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/client/smbmount.c
   branches/SAMBA_4_0/source/kdc/hdb-ldb.c
   branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c
   branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c
   branches/SAMBA_4_0/source/libnet/libnet_become_dc.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/client/smbmount.c
===================================================================
--- branches/SAMBA_4_0/source/client/smbmount.c 2007-12-04 01:37:28 UTC (rev 
26276)
+++ branches/SAMBA_4_0/source/client/smbmount.c 2007-12-04 01:51:36 UTC (rev 
26277)
@@ -409,7 +409,7 @@
                        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 @@
 /**
  * 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 @@
        }
 
 
-       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 @@
           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 @@
        }
        strupper(my_netbios_name);
 
-       init_mount();
+       init_mount(global_loadparm);
        return 0;
 }

Modified: branches/SAMBA_4_0/source/kdc/hdb-ldb.c
===================================================================
--- branches/SAMBA_4_0/source/kdc/hdb-ldb.c     2007-12-04 01:37:28 UTC (rev 
26276)
+++ branches/SAMBA_4_0/source/kdc/hdb-ldb.c     2007-12-04 01:51:36 UTC (rev 
26277)
@@ -1134,7 +1134,7 @@
                                           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;

Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c   2007-12-04 01:37:28 UTC 
(rev 26276)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c   2007-12-04 01:51:36 UTC 
(rev 26277)
@@ -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 */

Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c   2007-12-04 01:37:28 UTC 
(rev 26276)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c   2007-12-04 01:51:36 UTC 
(rev 26277)
@@ -199,7 +199,8 @@
 /*
   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;

Modified: branches/SAMBA_4_0/source/libnet/libnet_become_dc.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_become_dc.c 2007-12-04 01:37:28 UTC 
(rev 26276)
+++ branches/SAMBA_4_0/source/libnet/libnet_become_dc.c 2007-12-04 01:51:36 UTC 
(rev 26277)
@@ -784,7 +784,8 @@
        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;
 

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h       2007-12-04 01:37:28 UTC 
(rev 26276)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h       2007-12-04 01:51:36 UTC 
(rev 26277)
@@ -177,6 +177,7 @@
        const char *pipe_name;
        const struct ndr_interface_table *interface;
        struct cli_credentials *creds;
+       const char **name_resolve_order;
 };
 
 

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c       2007-12-04 
01:37:28 UTC (rev 26276)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c       2007-12-04 
01:51:36 UTC (rev 26277)
@@ -205,8 +205,9 @@
    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 @@
 
        /* 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 @@
        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) {

Reply via email to