Author: jelmer
Date: 2007-12-04 19:33:00 +0000 (Tue, 04 Dec 2007)
New Revision: 26295

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

Log:
Remove use of global_loadparm for net and wb_pam_auth.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/.bzrignore
   branches/SAMBA_4_0/source/utils/net/net.c
   branches/SAMBA_4_0/source/utils/net/net.h
   branches/SAMBA_4_0/source/utils/net/net_join.c
   branches/SAMBA_4_0/source/utils/net/net_vampire.c
   branches/SAMBA_4_0/source/winbind/wb_pam_auth.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/.bzrignore
===================================================================
--- branches/SAMBA_4_0/.bzrignore       2007-12-04 18:39:20 UTC (rev 26294)
+++ branches/SAMBA_4_0/.bzrignore       2007-12-04 19:33:00 UTC (rev 26295)
@@ -213,3 +213,4 @@
 source/tdbtest.ldb.2
 source/templates.ldb
 source/tmpccache
+source/lib/util/util_ldb.h

Modified: branches/SAMBA_4_0/source/utils/net/net.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net.c   2007-12-04 18:39:20 UTC (rev 
26294)
+++ branches/SAMBA_4_0/source/utils/net/net.c   2007-12-04 19:33:00 UTC (rev 
26295)
@@ -45,6 +45,7 @@
 #include "lib/cmdline/popt_common.h"
 #include "lib/ldb/include/ldb.h"
 #include "librpc/rpc/dcerpc.h"
+#include "param/param.h"
 
 /*
   run a function from a function table. If not found then
@@ -192,6 +193,7 @@
 
        ZERO_STRUCTP(ctx);
        ctx->mem_ctx = mem_ctx;
+       ctx->lp_ctx = global_loadparm;
        ctx->credentials = cmdline_credentials;
 
        rc = net_run_function(ctx, argc_new-1, argv_new+1, net_functable, 
net_usage);

Modified: branches/SAMBA_4_0/source/utils/net/net.h
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net.h   2007-12-04 18:39:20 UTC (rev 
26294)
+++ branches/SAMBA_4_0/source/utils/net/net.h   2007-12-04 19:33:00 UTC (rev 
26295)
@@ -24,6 +24,7 @@
 struct net_context {
        TALLOC_CTX *mem_ctx;
        struct cli_credentials *credentials;
+       struct loadparm_context *lp_ctx;
 };
 
 struct net_functable {

Modified: branches/SAMBA_4_0/source/utils/net/net_join.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net_join.c      2007-12-04 18:39:20 UTC 
(rev 26294)
+++ branches/SAMBA_4_0/source/utils/net/net_join.c      2007-12-04 19:33:00 UTC 
(rev 26295)
@@ -67,7 +67,7 @@
                return -1;
        }
        /* prepare parameters for the join */
-       r->in.netbios_name              = lp_netbios_name(global_loadparm);
+       r->in.netbios_name              = lp_netbios_name(ctx->lp_ctx);
        r->in.domain_name               = domain_name;
        r->in.join_type                 = secure_channel_type;
        r->in.level                     = LIBNET_JOIN_AUTOMATIC;

Modified: branches/SAMBA_4_0/source/utils/net/net_vampire.c
===================================================================
--- branches/SAMBA_4_0/source/utils/net/net_vampire.c   2007-12-04 18:39:20 UTC 
(rev 26294)
+++ branches/SAMBA_4_0/source/utils/net/net_vampire.c   2007-12-04 19:33:00 UTC 
(rev 26295)
@@ -152,7 +152,7 @@
        r.in.binding_string = NULL;
 
        /* Needed to override the ACLs on ldb */
-       r.in.session_info = system_session(libnetctx, global_loadparm);
+       r.in.session_info = system_session(libnetctx, ctx->lp_ctx);
 
        status = libnet_samsync_ldb(libnetctx, libnetctx, &r);
        if (!NT_STATUS_IS_OK(status)) {

Modified: branches/SAMBA_4_0/source/winbind/wb_pam_auth.c
===================================================================
--- branches/SAMBA_4_0/source/winbind/wb_pam_auth.c     2007-12-04 18:39:20 UTC 
(rev 26294)
+++ branches/SAMBA_4_0/source/winbind/wb_pam_auth.c     2007-12-04 19:33:00 UTC 
(rev 26295)
@@ -35,6 +35,7 @@
 struct pam_auth_crap_state {
        struct composite_context *ctx;
        struct event_context *event_ctx;
+       struct loadparm_context *lp_ctx;
 
        struct winbind_SamLogon *req;
        char *unix_username;
@@ -77,6 +78,7 @@
        state = talloc(result, struct pam_auth_crap_state);
        if (state == NULL) goto failed;
        state->ctx = result;
+       state->lp_ctx = service->task->lp_ctx;
        result->private_data = state;
 
        state->req = talloc(state, struct winbind_SamLogon);
@@ -176,7 +178,7 @@
 
        state->unix_username = talloc_asprintf(state, "%s%s%s", 
                                               state->domain_name,
-                                              
lp_winbind_separator(global_loadparm),
+                                              
lp_winbind_separator(state->lp_ctx),
                                               state->user_name);
        if (composite_nomem(state->unix_username, state->ctx)) return;
 

Reply via email to