r26669: Janitorial: Remove uses of global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 5 Jan 2008 21:36:33 +0000 (15:36 -0600)
committerStefan Metzmacher <metze@samba.org>
Sat, 5 Jan 2008 15:42:02 +0000 (09:42 -0600)
source/ldap_server/ldap_server.c
source/ldap_server/ldap_server.h
source/lib/events/events.c
source/libcli/raw/clisocket.c
source/libcli/raw/rawacl.c
source/libcli/raw/rawnegotiate.c
source/libnet/libnet_become_dc.c
source/libnet/libnet_vampire.c
source/wrepl_server/wrepl_in_connection.c

index 9bb1279a995162c3071454ee163c9294a6777a24..c7b1099166eacfe2c79ce99ebd8842edb539e8f1 100644 (file)
@@ -345,7 +345,7 @@ static void ldapsrv_accept(struct stream_connection *c)
        conn->connection  = c;
        conn->service     = ldapsrv_service;
        conn->sockets.raw = c->socket;
-       conn->lp_ctx      = global_loadparm;
+       conn->lp_ctx      = ldapsrv_service->task->lp_ctx;
 
        c->private        = conn;
 
@@ -523,6 +523,8 @@ static void ldapsrv_task_init(struct task_server *task)
        ldap_service = talloc_zero(task, struct ldapsrv_service);
        if (ldap_service == NULL) goto failed;
 
+       ldap_service->task = task;
+
        ldap_service->tls_params = tls_initialise(ldap_service, task->lp_ctx);
        if (ldap_service->tls_params == NULL) goto failed;
 
index 88af0fb5fc46504c9b9ae04a9514392055571861..4f7a5b9be904e13b72fdab78c6e6b04fc862b531 100644 (file)
@@ -65,6 +65,7 @@ struct ldapsrv_call {
 
 struct ldapsrv_service {
        struct tls_params *tls_params;
+       struct task_server *task;
 };
 
 #include "ldap_server/proto.h"
index 245be14326461cd921726942ba7a2d8e079d52b4..555a5092cc219588da4269353e438a1044105a08 100644 (file)
@@ -103,11 +103,8 @@ static void event_backend_init(void)
 {
 #if _SAMBA_BUILD_
        init_module_fn static_init[] = { STATIC_LIBEVENTS_MODULES };
-       init_module_fn *shared_init;
        if (event_backends) return;
-       shared_init = load_samba_modules(NULL, global_loadparm, "events");
        run_init_functions(static_init);
-       run_init_functions(shared_init);
 #else
        bool events_standard_init(void);
        bool events_select_init(void);
index 8beaef3daabdf752f6a78f8e4f66e5026f5c1b10..8fcb8bb48c7e06692ec4f29247c3e774b2907a68 100644 (file)
@@ -83,7 +83,7 @@ struct composite_context *smbcli_sock_connect_send(TALLOC_CTX *mem_ctx,
 
        ctx = socket_connect_multi_send(state, host_addr,
                                        state->num_ports, state->ports,
-                                       lp_resolve_context(global_loadparm),
+                                       resolve_ctx,
                                        state->ctx->event_ctx);
        if (ctx == NULL) goto failed;
        ctx->async.fn = smbcli_sock_connect_recv_conn;
index 9d2068f35fa885fbbc69837f97959d738d30d637..847d133173fafc1931195a4c15ba3d566e946b8c 100644 (file)
@@ -77,8 +77,7 @@ NTSTATUS smb_raw_query_secdesc_recv(struct smbcli_request *req,
 
        nt.out.data.length = IVAL(nt.out.params.data, 0);
 
-       ndr = ndr_pull_init_blob(&nt.out.data, mem_ctx, 
-                                lp_iconv_convenience(global_loadparm));
+       ndr = ndr_pull_init_blob(&nt.out.data, mem_ctx, NULL);
        if (!ndr) {
                return NT_STATUS_INVALID_PARAMETER;
        }
@@ -136,7 +135,7 @@ struct smbcli_request *smb_raw_set_secdesc_send(struct smbcli_tree *tree,
        nt.in.params.data = params;
        nt.in.params.length = 8;
 
-       ndr = ndr_push_init_ctx(NULL, lp_iconv_convenience(global_loadparm));
+       ndr = ndr_push_init_ctx(NULL, NULL);
        if (!ndr) return NULL;
 
        ndr_err = ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, io->set_secdesc.in.sd);
index 78b9082521baff22d26bb16e6b3086be5b1677bc..fc7725cc55d824c2b8745ecd92b65a6346ae7a0c 100644 (file)
@@ -175,11 +175,11 @@ NTSTATUS smb_raw_negotiate_recv(struct smbcli_request *req)
        }
 
        /* a way to force ascii SMB */
-       if (!lp_unicode(global_loadparm)) {
+       if (!transport->options.unicode) {
                transport->negotiate.capabilities &= ~CAP_UNICODE;
        }
 
-       if (!lp_nt_status_support(global_loadparm)) {
+       if (!transport->options.ntstatus_support) {
                transport->negotiate.capabilities &= ~CAP_STATUS32;
        }
 
index e51a2feadf0ac7e76c3f82e4b89f2657648a7535..862631ffa94fe4c162c7b5b4a38a1383a2742005 100644 (file)
@@ -2017,7 +2017,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
                v[0].sid                = s->zero_sid;
                v[0].dn                 = s->forest.schema_dn_str;
 
-               ndr_err = ndr_push_struct_blob(&vd[0], vd, lp_iconv_convenience(global_loadparm), &v[0],
+               ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
                                               (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        c->status = ndr_map_error2ntstatus(ndr_err);
@@ -2049,7 +2049,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
                v[0].sid                = s->zero_sid;
                v[0].dn                 = s->domain.dn_str;
 
-               ndr_err = ndr_push_struct_blob(&vd[0], vd, lp_iconv_convenience(global_loadparm), &v[0],
+               ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
                                               (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        c->status = ndr_map_error2ntstatus(ndr_err);
@@ -2131,7 +2131,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
                v[0].sid                = s->zero_sid;
                v[0].dn                 = s->dest_dsa.computer_dn_str;
 
-               ndr_err = ndr_push_struct_blob(&vd[0], vd, lp_iconv_convenience(global_loadparm), &v[0],
+               ndr_err = ndr_push_struct_blob(&vd[0], vd, NULL, &v[0],
                                               (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        c->status = ndr_map_error2ntstatus(ndr_err);
index c707f82744d5198245c90ba17a6324b98fdd225e..0f82d98673831fbacfcec1646fe9a92647ff7930 100644 (file)
@@ -72,7 +72,7 @@ static NTSTATUS fix_user(TALLOC_CTX *mem_ctx,
                user->user_private_info.SensitiveData = data.data;
                user->user_private_info.DataLength = data.length;
 
-               ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(global_loadparm), &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
+               ndr_err = ndr_pull_struct_blob(&data, mem_ctx, NULL, &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        *error_string = talloc_asprintf(mem_ctx, "Failed to parse Sensitive Data for %s:", username);
                        dump_data(10, data.data, data.length);
index f2cf7c6113a8ad62b227b0d7aa8b6c15eedf8c99..721a00521338be73d75f48d8dde52096a3b2154b 100644 (file)
@@ -66,7 +66,7 @@ static NTSTATUS wreplsrv_recv_request(void *private, DATA_BLOB blob)
        packet_in_blob.length = blob.length - 4;
 
        ndr_err = ndr_pull_struct_blob(&packet_in_blob, call, 
-                                      lp_iconv_convenience(global_loadparm),
+                                      lp_iconv_convenience(wreplconn->service->task->lp_ctx),
                                       &call->req_packet,
                                       (ndr_pull_flags_fn_t)ndr_pull_wrepl_packet);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
@@ -91,7 +91,7 @@ static NTSTATUS wreplsrv_recv_request(void *private, DATA_BLOB blob)
        /* and now encode the reply */
        packet_out_wrap.packet = call->rep_packet;
        ndr_err = ndr_push_struct_blob(&packet_out_blob, call, 
-                                      lp_iconv_convenience(global_loadparm),
+                                      lp_iconv_convenience(wreplconn->service->task->lp_ctx),
                                       &packet_out_wrap,
                                      (ndr_push_flags_fn_t)ndr_push_wrepl_wrap);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {