r25430: Add the loadparm context to all parametric options.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 29 Sep 2007 18:00:19 +0000 (18:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:07:31 +0000 (15:07 -0500)
(This used to be commit fd697d77c9fe67a00939a1f04b35c451316fff58)

70 files changed:
source4/auth/auth.c
source4/auth/auth_util.c
source4/auth/gensec/gensec.c
source4/auth/gensec/gensec_gssapi.c
source4/auth/gensec/gensec_krb5.c
source4/auth/kerberos/krb5_init_context.c
source4/auth/ntlmssp/ntlmssp_client.c
source4/auth/ntlmssp/ntlmssp_server.c
source4/cluster/ctdb/ctdb_cluster.c
source4/cluster/ctdb/opendb_ctdb.c
source4/dsdb/repl/drepl_service.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/kdc/hdb-ldb.c
source4/lib/charset/iconv.c
source4/lib/db_wrap.c
source4/lib/dbwrap/dbwrap.c
source4/lib/events/events.c
source4/lib/ldb/tools/ad2oLschema.c
source4/lib/socket/socket.c
source4/libcli/nbt/nbtsocket.c
source4/libcli/resolve/nbtlist.c
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_samdump.c
source4/nbt_server/register.c
source4/nbt_server/wins/wins_ldb.c
source4/nbt_server/wins/winsclient.c
source4/nbt_server/wins/winsdb.c
source4/nbt_server/wins/winsserver.c
source4/ntvfs/common/opendb.c
source4/ntvfs/common/opendb_tdb.c
source4/ntvfs/posix/pvfs_shortname.c
source4/ntvfs/sysdep/inotify.c
source4/param/loadparm.c
source4/param/share_classic.c
source4/rpc_server/common/server_info.c
source4/rpc_server/remote/dcesrv_remote.c
source4/scripting/ejs/smbcalls_config.c
source4/torture/libnet/libnet_BecomeDC.c
source4/torture/local/iconv.c
source4/torture/locktest.c
source4/torture/raw/composite.c
source4/torture/raw/context.c
source4/torture/raw/eas.c
source4/torture/raw/lock.c
source4/torture/raw/lockbench.c
source4/torture/raw/mkdir.c
source4/torture/raw/notify.c
source4/torture/raw/open.c
source4/torture/raw/pingpong.c
source4/torture/raw/read.c
source4/torture/raw/unlink.c
source4/torture/rpc/bench.c
source4/torture/rpc/countcalls.c
source4/torture/rpc/drsuapi.c
source4/torture/rpc/drsuapi_cracknames.c
source4/torture/rpc/dssync.c
source4/torture/rpc/lsa.c
source4/torture/rpc/samba3rpc.c
source4/torture/rpc/samr.c
source4/torture/rpc/schannel.c
source4/torture/rpc/testjoin.c
source4/torture/smb2/connect.c
source4/torture/smb2/getinfo.c
source4/torture/smb2/util.c
source4/torture/smbtorture.c
source4/torture/ui.c
source4/torture/unix/whoami.c
source4/torture/util_smb.c
source4/web_server/http.c
source4/wrepl_server/wrepl_server.c

index 04aa5f5c91dcaab50a426367dd4da052a564367c..7a3f9f82cb20fb2ec1df731794e141c291b7399e 100644 (file)
@@ -419,13 +419,13 @@ NTSTATUS auth_context_create(TALLOC_CTX *mem_ctx,
        const char **auth_methods = NULL;
        switch (lp_server_role(global_loadparm)) {
        case ROLE_STANDALONE:
-               auth_methods = lp_parm_string_list(NULL, "auth methods", "standalone", NULL);
+               auth_methods = lp_parm_string_list(global_loadparm, NULL, "auth methods", "standalone", NULL);
                break;
        case ROLE_DOMAIN_MEMBER:
-               auth_methods = lp_parm_string_list(NULL, "auth methods", "member server", NULL);
+               auth_methods = lp_parm_string_list(global_loadparm, NULL, "auth methods", "member server", NULL);
                break;
        case ROLE_DOMAIN_CONTROLLER:
-               auth_methods = lp_parm_string_list(NULL, "auth methods", "domain controller", NULL);
+               auth_methods = lp_parm_string_list(global_loadparm, NULL, "auth methods", "domain controller", NULL);
                break;
        }
        return auth_context_create_methods(mem_ctx, auth_methods, ev, msg, auth_ctx);
index 69de01aefd883875f4f835c6defeb7309fe8f206..8865c5a91907df8e8ec3b18931590e43d030e207 100644 (file)
@@ -624,7 +624,7 @@ _PUBLIC_ NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx,
                                           struct auth_session_info **_session_info) 
 {
        return _auth_system_session_info(parent_ctx, 
-                       lp_parm_bool(NULL, "system", "anonymous", false), 
+                       lp_parm_bool(global_loadparm, NULL, "system", "anonymous", false), 
                        _session_info);
 }
 
index 114969966e34c146cb15058d0800b7a6a16d24ec..541c1ff181c0f1f84563a9d8e1db6828ec2d6108 100644 (file)
@@ -1108,7 +1108,7 @@ _PUBLIC_ NTSTATUS gensec_set_target_hostname(struct gensec_security *gensec_secu
 _PUBLIC_ const char *gensec_get_target_hostname(struct gensec_security *gensec_security) 
 {
        /* We allow the target hostname to be overriden for testing purposes */
-       const char *target_hostname = lp_parm_string(NULL, "gensec", "target_hostname");
+       const char *target_hostname = lp_parm_string(global_loadparm, NULL, "gensec", "target_hostname");
        if (target_hostname) {
                return target_hostname;
        }
@@ -1206,7 +1206,7 @@ const char *gensec_get_target_principal(struct gensec_security *gensec_security)
 */
 NTSTATUS gensec_register(const struct gensec_security_ops *ops)
 {
-       if (!lp_parm_bool(NULL, "gensec", ops->name, ops->enabled)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "gensec", ops->name, ops->enabled)) {
                DEBUG(2,("gensec subsystem %s is disabled\n", ops->name));
                return NT_STATUS_OK;
        }
index 69e87cf555a48e6dc97da311f5c489fb8cd81c67..f83da1db635a44113c970c4fc8a186f941d64199 100644 (file)
@@ -155,7 +155,7 @@ static NTSTATUS gensec_gssapi_start(struct gensec_security *gensec_security)
        
        gensec_gssapi_state->gss_exchange_count = 0;
        gensec_gssapi_state->max_wrap_buf_size
-               = lp_parm_int(NULL, "gensec_gssapi", "max wrap buf size", 65536);
+               = lp_parm_int(global_loadparm, NULL, "gensec_gssapi", "max wrap buf size", 65536);
                
        gensec_gssapi_state->sasl = False;
        gensec_gssapi_state->sasl_state = STAGE_GSS_NEG;
@@ -170,16 +170,16 @@ static NTSTATUS gensec_gssapi_start(struct gensec_security *gensec_security)
        gensec_gssapi_state->input_chan_bindings = GSS_C_NO_CHANNEL_BINDINGS;
        
        gensec_gssapi_state->want_flags = 0;
-       if (lp_parm_bool(NULL, "gensec_gssapi", "mutual", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "gensec_gssapi", "mutual", true)) {
                gensec_gssapi_state->want_flags |= GSS_C_MUTUAL_FLAG;
        }
-       if (lp_parm_bool(NULL, "gensec_gssapi", "delegation", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "gensec_gssapi", "delegation", true)) {
                gensec_gssapi_state->want_flags |= GSS_C_DELEG_FLAG;
        }
-       if (lp_parm_bool(NULL, "gensec_gssapi", "replay", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "gensec_gssapi", "replay", true)) {
                gensec_gssapi_state->want_flags |= GSS_C_REPLAY_FLAG;
        }
-       if (lp_parm_bool(NULL, "gensec_gssapi", "sequence", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "gensec_gssapi", "sequence", true)) {
                gensec_gssapi_state->want_flags |= GSS_C_SEQUENCE_FLAG;
        }
 
@@ -230,7 +230,7 @@ static NTSTATUS gensec_gssapi_start(struct gensec_security *gensec_security)
        }
 
        /* don't do DNS lookups of any kind, it might/will fail for a netbios name */
-       ret = gsskrb5_set_dns_canonicalize(lp_parm_bool(NULL, "krb5", "set_dns_canonicalize", false));
+       ret = gsskrb5_set_dns_canonicalize(lp_parm_bool(global_loadparm, NULL, "krb5", "set_dns_canonicalize", false));
        if (ret) {
                DEBUG(1,("gensec_krb5_start: gsskrb5_set_dns_canonicalize failed\n"));
                talloc_free(gensec_gssapi_state);
@@ -1317,7 +1317,7 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
                        talloc_free(mem_ctx);
                        return nt_status;
                }
-       } else if (!lp_parm_bool(NULL, "gensec", "require_pac", false)) {
+       } else if (!lp_parm_bool(global_loadparm, NULL, "gensec", "require_pac", false)) {
                DEBUG(1, ("Unable to find PAC, resorting to local user lookup: %s\n",
                          gssapi_error_string(mem_ctx, maj_stat, min_stat, gensec_gssapi_state->gss_oid)));
                nt_status = sam_get_server_info_principal(mem_ctx, principal_string,
index 66a463eef4c28c13e6d6c5fce7f06b0a04edc697..5951ccf879b69b53f643bca90a40dd17c43f662a 100644 (file)
@@ -582,7 +582,7 @@ static NTSTATUS gensec_krb5_session_info(struct gensec_security *gensec_security
                                                      KRB5_AUTHDATA_WIN2K_PAC, 
                                                      &pac_data);
        
-       if (ret && lp_parm_bool(NULL, "gensec", "require_pac", false)) {
+       if (ret && lp_parm_bool(global_loadparm, NULL, "gensec", "require_pac", false)) {
                DEBUG(1, ("Unable to find PAC in ticket from %s, failing to allow access: %s \n",
                          principal_string,
                          smb_get_krb5_error_message(context, 
index 6b3cf8cb37dd436e3c6ceff6225abd4b295491d8..d604c33233daf2768ce7909784d8580a786f8651 100644 (file)
@@ -250,12 +250,12 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context context,
                status = NT_STATUS_INVALID_PARAMETER;
                switch (hi->proto) {
                case KRB5_KRBHST_UDP:
-                       if (lp_parm_bool(NULL, "krb5", "udp", true)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "krb5", "udp", true)) {
                                status = socket_create(name, SOCKET_TYPE_DGRAM, &smb_krb5->sock, 0);
                        }
                        break;
                case KRB5_KRBHST_TCP:
-                       if (lp_parm_bool(NULL, "krb5", "tcp", true)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "krb5", "tcp", true)) {
                                status = socket_create(name, SOCKET_TYPE_STREAM, &smb_krb5->sock, 0);
                        }
                        break;
@@ -473,7 +473,7 @@ krb5_error_code smb_krb5_init_context(void *parent_ctx,
        /* Set options in kerberos */
 
        krb5_set_dns_canonicalize_hostname((*smb_krb5_context)->krb5_context,
-                                          lp_parm_bool(NULL, "krb5", "set_dns_canonicalize", false));
+                                          lp_parm_bool(global_loadparm, NULL, "krb5", "set_dns_canonicalize", false));
 
        return 0;
 }
index f988facb608ef4f3f7c36b01c5e93f50ee91e5a5..8796e022d00ba640a3972714412531f8631b4ef0 100644 (file)
@@ -299,13 +299,13 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
 
        gensec_ntlmssp_state->domain = lp_workgroup(global_loadparm);
 
-       gensec_ntlmssp_state->unicode = lp_parm_bool(NULL, "ntlmssp_client", "unicode", true);
+       gensec_ntlmssp_state->unicode = lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "unicode", true);
 
-       gensec_ntlmssp_state->use_nt_response = lp_parm_bool(NULL, "ntlmssp_client", "send_nt_reponse", true);
+       gensec_ntlmssp_state->use_nt_response = lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "send_nt_reponse", true);
 
        gensec_ntlmssp_state->allow_lm_key = (lp_client_lanman_auth(global_loadparm) 
-                                             && (lp_parm_bool(NULL, "ntlmssp_client", "allow_lm_key", false)
-                                                 || lp_parm_bool(NULL, "ntlmssp_client", "lm_key", false)));
+                                             && (lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "allow_lm_key", false)
+                                                 || lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "lm_key", false)));
 
        gensec_ntlmssp_state->use_ntlmv2 = lp_client_ntlmv2_auth(global_loadparm);
 
@@ -315,27 +315,27 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
                NTLMSSP_NEGOTIATE_NTLM |
                NTLMSSP_REQUEST_TARGET;
 
-       if (lp_parm_bool(NULL, "ntlmssp_client", "128bit", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "128bit", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_128;               
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_client", "56bit", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "56bit", false)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_56;                
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_client", "lm_key", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "lm_key", false)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_LM_KEY;
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_client", "keyexchange", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "keyexchange", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_KEY_EXCH;          
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_client", "alwayssign", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "alwayssign", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN;               
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_client", "ntlm2", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_client", "ntlm2", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_NTLM2;             
        } else {
                /* apparently we can't do ntlmv2 if we don't do ntlm2 */
index dcef5035cbbeccf938347c1dc17d105385370195..e2de260b684e0ec30ba73306d13fd69a5c2600bb 100644 (file)
@@ -751,7 +751,7 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
        gensec_ntlmssp_state->expected_state = NTLMSSP_NEGOTIATE;
 
        gensec_ntlmssp_state->allow_lm_key = (lp_lanman_auth(global_loadparm) 
-                                         && lp_parm_bool(NULL, "ntlmssp_server", "allow_lm_key", false));
+                                         && lp_parm_bool(global_loadparm, NULL, "ntlmssp_server", "allow_lm_key", false));
 
        gensec_ntlmssp_state->server_multiple_authentications = False;
        
@@ -762,23 +762,23 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
        gensec_ntlmssp_state->nt_resp = data_blob(NULL, 0);
        gensec_ntlmssp_state->encrypted_session_key = data_blob(NULL, 0);
 
-       if (lp_parm_bool(NULL, "ntlmssp_server", "128bit", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_server", "128bit", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_128;               
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_server", "56bit", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_server", "56bit", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_56;                
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_server", "keyexchange", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_server", "keyexchange", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_KEY_EXCH;          
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_server", "alwayssign", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_server", "alwayssign", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_ALWAYS_SIGN;               
        }
 
-       if (lp_parm_bool(NULL, "ntlmssp_server", "ntlm2", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ntlmssp_server", "ntlm2", true)) {
                gensec_ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_NTLM2;             
        }
 
index 8cb1c0c45944444a6f7ee2ac1df0fb944321aeb2..d8860aabd085451186d7078dde14ddec3b2041ff 100644 (file)
@@ -82,7 +82,7 @@ static struct tdb_wrap *ctdb_tdb_tmp_open(struct cluster_ops *ops,
                                          TALLOC_CTX *mem_ctx, const char *dbname, 
                                          int flags)
 {
-       const char *dir = lp_parm_string(NULL, "ctdb", "shared data");
+       const char *dir = lp_parm_string(global_loadparm, NULL, "ctdb", "shared data");
        char *path;
        struct tdb_wrap *w;
        if (dir == NULL) {
@@ -202,7 +202,7 @@ void cluster_ctdb_init(struct event_context *ev, const char *model)
        struct cluster_state *state;
        int ret;
 
-       if (!lp_parm_bool(NULL, "ctdb", "enable", false)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "ctdb", "enable", false)) {
                return;
        }
 
index a01478f784a52f24bf729899c6f04eb2fee0ae32..ae174ea01db66fc7352fd8bd5a0328b76804eef1 100644 (file)
@@ -97,7 +97,7 @@ static struct odb_context *odb_ctdb_init(TALLOC_CTX *mem_ctx,
        odb->ntvfs_ctx = ntvfs_ctx;
 
        /* leave oplocks disabled by default until the code is working */
-       odb->oplocks = lp_parm_bool(NULL, "opendb", "oplocks", false);
+       odb->oplocks = lp_parm_bool(global_loadparm, NULL, "opendb", "oplocks", false);
 
        return odb;
 }
index f4ee5445f976ec4595f1c8751efbfe8ff9ca6b62..e56e2e179c631ea43b86e9520181c6602403de82 100644 (file)
@@ -165,8 +165,8 @@ static void dreplsrv_task_init(struct task_server *task)
                return;
        }
 
-       periodic_startup_interval       = lp_parm_int(NULL, "dreplsrv", "periodic_startup_interval", 15); /* in seconds */
-       service->periodic.interval      = lp_parm_int(NULL, "dreplsrv", "periodic_interval", 300); /* in seconds */
+       periodic_startup_interval       = lp_parm_int(global_loadparm, NULL, "dreplsrv", "periodic_startup_interval", 15); /* in seconds */
+       service->periodic.interval      = lp_parm_int(global_loadparm, NULL, "dreplsrv", "periodic_interval", 300); /* in seconds */
 
        status = dreplsrv_periodic_schedule(service, periodic_startup_interval);
        if (!W_ERROR_IS_OK(status)) {
index 5f4317a646c34a159adb5d13023289687da4497a..646aab9c94e0dc0ae776d8f19cb894d3053438a3 100644 (file)
@@ -341,7 +341,7 @@ static int setup_primary_kerberos(struct setup_password_fields_io *io,
                return LDB_ERR_OPERATIONS_ERROR;
        }
 
-       if (lp_parm_bool(NULL, "password_hash", "create_aes_key", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "password_hash", "create_aes_key", false)) {
        /*
         * TODO:
         *
index ed11354498f710d6791f069983ec8abffef5a529..3ef5f9510aed8e7d74f354176cab9b2f7c00ffda 100644 (file)
@@ -481,7 +481,7 @@ static krb5_error_code LDB_message2entry(krb5_context context, HDB *db,
                entry_ex->entry.flags.ok_as_delegate = 1;
        }
 
-       if (lp_parm_bool(NULL, "kdc", "require spn for service", true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "kdc", "require spn for service", true)) {
                if (!is_computer && !ldb_msg_find_attr_as_string(msg, "servicePrincipalName", NULL)) {
                        entry_ex->entry.flags.server = 0;
                }
index 1c571f896182da9469482ceb8dd3454736e14302..9b035cd1dbaca5a9599e8942ed69819f60ad58b2 100644 (file)
@@ -199,7 +199,7 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char *fromcode)
        }
 
 #ifdef HAVE_NATIVE_ICONV
-       if ((!from || !to) && !lp_parm_bool(NULL, "iconv", "native", true)) {
+       if ((!from || !to) && !lp_parm_bool(global_loadparm, NULL, "iconv", "native", true)) {
                goto failed;
        }
        if (!from) {
index 82521f2e7eada29f3aae8010277546a353a228e7..4c0a06cf2c8b01d9f9341c3b86b688cc5c61ec4a 100644 (file)
@@ -164,7 +164,7 @@ struct ldb_context *ldb_wrap_connect(TALLOC_CTX *mem_ctx,
        }
 
        /* allow admins to force non-sync ldb for all databases */
-       if (lp_parm_bool(NULL, "ldb", "nosync", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ldb", "nosync", false)) {
                flags |= LDB_FLG_NOSYNC;
        }
 
index 057a6f0057204790b348066bde7ae1372928938c..9e893b12439666bbc769c9f4ebf7e6ee2cf475bc 100644 (file)
@@ -30,8 +30,8 @@
  */
 struct db_context *db_tmp_open(TALLOC_CTX *mem_ctx, const char *name, int tdb_flags)
 {
-       if (lp_parm_bool(NULL, "ctdb", "enable", false) &&
-           lp_parm_bool(NULL, "ctdb", name, true)) {
+       if (lp_parm_bool(global_loadparm, NULL, "ctdb", "enable", false) &&
+           lp_parm_bool(global_loadparm, NULL, "ctdb", name, true)) {
                    return db_tmp_open_ctdb(mem_ctx, name, tdb_flags);
        }
 
index da3cc3bfe02dc2a03af37959d0488c75610a5b3b..c1e57a3d323bc18aa6e4f2a8d053efa716165958 100644 (file)
@@ -185,7 +185,7 @@ struct event_context *event_context_init_byname(TALLOC_CTX *mem_ctx, const char
 
 #if _SAMBA_BUILD_
        if (name == NULL) {
-               name = lp_parm_string(NULL, "event", "backend");
+               name = lp_parm_string(global_loadparm, NULL, "event", "backend");
        }
 #endif
        if (name == NULL) {
index 64df4cfecb86443c1f7d65d31c14058687bcd487..3c612f8a8151a1aed160b80793ae2d2c9f68c15c 100644 (file)
@@ -677,7 +677,7 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum convert_
                }
        }
 
-       target_str = lp_parm_string(NULL, "convert", "target");
+       target_str = lp_parm_string(global_loadparm, NULL, "convert", "target");
 
        if (!target_str || strcasecmp(target_str, "openldap") == 0) {
                target = TARGET_OPENLDAP;
index 55a1b6394b289a890bbf57a7cefab155b90118da..6da35f3af8069b14947d2c6119920822cbc2469d 100644 (file)
@@ -70,7 +70,7 @@ _PUBLIC_ NTSTATUS socket_create_with_ops(TALLOC_CTX *mem_ctx, const struct socke
 
        if (!(flags & SOCKET_FLAG_BLOCK) &&
            type == SOCKET_TYPE_STREAM &&
-           lp_parm_bool(NULL, "socket", "testnonblock", false)) {
+           lp_parm_bool(global_loadparm, NULL, "socket", "testnonblock", false)) {
                (*new_sock)->flags |= SOCKET_FLAG_TESTNONBLOCK;
        }
 
index 453f0afcff82fb6d740b01d12beba59b9337ca23..174b08ddf6e18387881769553e6452c0e44187c3 100644 (file)
@@ -244,7 +244,7 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
                req->received_wack = True;
                /* although there can be a timeout in the packet, w2k3 screws it up,
                   so better to set it ourselves */                
-               req->timeout = lp_parm_int(NULL, "nbt", "wack_timeout", 30);
+               req->timeout = lp_parm_int(global_loadparm, NULL, "nbt", "wack_timeout", 30);
                req->te = event_add_timed(req->nbtsock->event_ctx, req, 
                                          timeval_current_ofs(req->timeout, 0),
                                          nbt_name_socket_timeout, req);
index be4d01b79a4b5a1ff2f4a548011640486d9beeeb..9720434cb90386ae9de18ff6ba0c51aac078bd2b 100644 (file)
@@ -155,7 +155,7 @@ struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx,
 
                state->io_queries[i].in.broadcast   = broadcast;
                state->io_queries[i].in.wins_lookup = wins_lookup;
-               state->io_queries[i].in.timeout     = lp_parm_int(NULL, "nbt", "timeout", 1);
+               state->io_queries[i].in.timeout     = lp_parm_int(global_loadparm, NULL, "nbt", "timeout", 1);
                state->io_queries[i].in.retries     = 2;
 
                state->queries[i] = nbt_name_query_send(state->nbtsock, &state->io_queries[i]);
index b06573448e374a9cfc6c09ade1d7831fe2029f52..76984bf5b1414ce92cd4001de91a32d35ca2da27 100644 (file)
@@ -1511,7 +1511,7 @@ static void becomeDC_drsuapi_connect_send(struct libnet_BecomeDC_state *s,
        drsuapi->s = s;
 
        if (!drsuapi->binding) {
-               if (lp_parm_bool(NULL, "become_dc", "print", false)) {
+               if (lp_parm_bool(global_loadparm, NULL, "become_dc", "print", false)) {
                        binding_str = talloc_asprintf(s, "ncacn_ip_tcp:%s[krb5,print,seal]", s->source_dsa.dns_name);
                        if (composite_nomem(binding_str, c)) return;
                } else {
index bde5a29cb951a94b390881311fcc68689f7f622f..5c7266d7a862c0c429bcefbdc7eff0980070797b 100644 (file)
@@ -163,7 +163,7 @@ NTSTATUS libnet_SamDump(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
 
        r2.out.error_string            = NULL;
        r2.in.binding_string           = r->in.binding_string;
-       r2.in.rid_crypt                = lp_parm_bool(NULL, "vampire", "rid decrypt", true);
+       r2.in.rid_crypt                = lp_parm_bool(global_loadparm, NULL, "vampire", "rid decrypt", true);
        r2.in.init_fn                  = NULL;
        r2.in.delta_fn                 = libnet_samdump_fn;
        r2.in.fn_ctx                   = samdump_state;
index cb831f34437c67bb8d5b3ac00557483f83d08608..0ef77af4c57e7850b1b8c857ee82e812830c9974 100644 (file)
@@ -117,7 +117,7 @@ static void name_refresh_handler(struct event_context *ev, struct timed_event *t
 static void nbtd_start_refresh_timer(struct nbtd_iface_name *iname)
 {
        uint32_t refresh_time;
-       uint32_t max_refresh_time = lp_parm_int(NULL, "nbtd", "max_refresh_time", 7200);
+       uint32_t max_refresh_time = lp_parm_int(global_loadparm, NULL, "nbtd", "max_refresh_time", 7200);
 
        refresh_time = MIN(max_refresh_time, iname->ttl/2);
        
@@ -187,7 +187,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
                iname->name.scope = NULL;
        }
        iname->nb_flags          = nb_flags;
-       iname->ttl               = lp_parm_int(NULL, "nbtd", "bcast_ttl", 300000);
+       iname->ttl               = lp_parm_int(global_loadparm, NULL, "nbtd", "bcast_ttl", 300000);
        iname->registration_time = timeval_zero();
        iname->wins_server       = NULL;
 
index 2e5889fb1e6dfd280671f2424265f4895e660cc5..3d22b5fe1b41f7e658336008dc0f47c455d824ec 100644 (file)
@@ -87,7 +87,7 @@ static int wins_ldb_init(struct ldb_module *ctx)
 
        ctx->private_data = NULL;
 
-       owner = lp_parm_string(NULL, "winsdb", "local_owner");
+       owner = lp_parm_string(global_loadparm, NULL, "winsdb", "local_owner");
        if (!owner) {
                owner = iface_n_ip(0);
                if (!owner) {
index 1dd934cc92bea18f2878e6c286a7f553b292f1cc..d1342c3766489510a7988cfe48f62e0a83d34ce4 100644 (file)
@@ -58,7 +58,7 @@ static void nbtd_wins_register_retry(struct event_context *ev, struct timed_even
 static void nbtd_wins_start_refresh_timer(struct nbtd_iface_name *iname)
 {
        uint32_t refresh_time;
-       uint32_t max_refresh_time = lp_parm_int(NULL, "nbtd", "max_refresh_time", 7200);
+       uint32_t max_refresh_time = lp_parm_int(global_loadparm, NULL, "nbtd", "max_refresh_time", 7200);
 
        refresh_time = MIN(max_refresh_time, iname->ttl/2);
        
@@ -179,7 +179,7 @@ static void nbtd_wins_register_handler(struct composite_context *c)
        if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
                /* none of the WINS servers responded - try again 
                   periodically */
-               int wins_retry_time = lp_parm_int(NULL, "nbtd", "wins_retry", 300);
+               int wins_retry_time = lp_parm_int(global_loadparm, NULL, "nbtd", "wins_retry", 300);
                event_add_timed(iname->iface->nbtsrv->task->event_ctx, 
                                iname,
                                timeval_current_ofs(wins_retry_time, 0),
index f7d149126bddb5fe92a40641e87c18e564183d39..299d5be89418721348f10720e40df8282dcddb0c 100644 (file)
@@ -988,7 +988,7 @@ static BOOL winsdb_check_or_add_module_list(struct winsdb_handle *h)
        talloc_free(h->ldb);
        h->ldb = NULL;
 
-       if (lp_parm_bool(NULL,"winsdb", "nosync", false)) {
+       if (lp_parm_bool(global_loadparm, NULL,"winsdb", "nosync", false)) {
                flags |= LDB_FLG_NOSYNC;
        }
 
@@ -1021,7 +1021,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, enum winsdb_handle_cal
        h = talloc(mem_ctx, struct winsdb_handle);
        if (!h) return NULL;
 
-       if (lp_parm_bool(NULL,"winsdb", "nosync", false)) {
+       if (lp_parm_bool(global_loadparm, NULL,"winsdb", "nosync", false)) {
                flags |= LDB_FLG_NOSYNC;
        }
 
@@ -1031,7 +1031,7 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx, enum winsdb_handle_cal
 
        h->caller = caller;
 
-       owner = lp_parm_string(NULL, "winsdb", "local_owner");
+       owner = lp_parm_string(global_loadparm, NULL, "winsdb", "local_owner");
        if (!owner) {
                owner = iface_n_ip(0);
        }
index 698d432c75ab157dbd75daa8e4b98927cae3b7a6..eb45bf5fc2508aedd88e70e529fcabc96d634ade 100644 (file)
@@ -615,7 +615,7 @@ static void nbtd_wins_randomize1Clist(const char **addresses, struct socket_addr
        ldb_qsort(addresses, num_addrs , sizeof(addresses[0]),
                  src, (ldb_qsort_cmp_fn_t)nbtd_wins_randomize1Clist_sort);
 
-       mask = lp_parm_string(NULL, "nbtd", "wins_randomize1Clist_mask");
+       mask = lp_parm_string(global_loadparm, NULL, "nbtd", "wins_randomize1Clist_mask");
        if (!mask) {
                mask = "255.255.255.0";
        }
@@ -692,7 +692,7 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock,
         * Value: 0 = deactivated, 1 = activated
         */
        if (name->type == NBT_NAME_LOGON && 
-           lp_parm_bool(NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) {
+           lp_parm_bool(global_loadparm, NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) {
                struct nbt_name name_1b;
 
                name_1b = *name;
@@ -788,7 +788,7 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock,
         * Value: 0 = deactivated, 1 = activated
         */
        if (name->type == NBT_NAME_LOGON && 
-           lp_parm_bool(NULL, "nbtd", "wins_randomize1Clist", false)) {
+           lp_parm_bool(global_loadparm, NULL, "nbtd", "wins_randomize1Clist", false)) {
                nbtd_wins_randomize1Clist(addresses, src);
        }
 
@@ -967,9 +967,9 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
 
        nbtsrv->winssrv->config.max_renew_interval = lp_max_wins_ttl(global_loadparm);
        nbtsrv->winssrv->config.min_renew_interval = lp_min_wins_ttl(global_loadparm);
-       tmp = lp_parm_int(NULL, "wreplsrv", "tombstone_interval", 6*24*60*60);
+       tmp = lp_parm_int(global_loadparm, NULL, "wreplsrv", "tombstone_interval", 6*24*60*60);
        nbtsrv->winssrv->config.tombstone_interval = tmp;
-       tmp = lp_parm_int(NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60);
+       tmp = lp_parm_int(global_loadparm, NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60);
        nbtsrv->winssrv->config.tombstone_timeout = tmp;
 
        nbtsrv->winssrv->wins_db     = winsdb_connect(nbtsrv->winssrv, WINSDB_HANDLE_CALLER_NBTD);
index 1b1573bc9610a2f878fe3e6bc77045b8f6e86c0c..112de1d7d44aba55a90801dab3983b82cf15a503 100644 (file)
@@ -62,7 +62,7 @@ _PUBLIC_ struct odb_context *odb_init(TALLOC_CTX *mem_ctx,
                                      struct ntvfs_context *ntvfs_ctx)
 {
        if (ops == NULL) {
-               if (lp_parm_bool(NULL, "ctdb", "opendb", false)) {
+               if (lp_parm_bool(global_loadparm, NULL, "ctdb", "opendb", false)) {
                        odb_ctdb_init_ops();
                } else {
                        odb_tdb_init_ops();
index 7c6e9f48b3dca6c666f2c4c3ab362b2817297955..60ab11b96a5f07a8c97f13e287bd8d24ab18237b 100644 (file)
@@ -88,7 +88,7 @@ static struct odb_context *odb_tdb_init(TALLOC_CTX *mem_ctx,
        odb->ntvfs_ctx = ntvfs_ctx;
 
        /* leave oplocks disabled by default until the code is working */
-       odb->oplocks = lp_parm_bool(NULL, "opendb", "oplocks", false);
+       odb->oplocks = lp_parm_bool(global_loadparm, NULL, "opendb", "oplocks", false);
 
        return odb;
 }
index 9e02125dc7ab7bed5fba9ef51f3f3ee9e8c2c0b9..141f5a30a1d0c4367003bdfa5db348ddeb024be8 100644 (file)
@@ -614,7 +614,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
        }
 
        /* by default have a max of 512 entries in the cache. */
-       ctx->cache_size = lp_parm_int(NULL, "mangle", "cachesize", 512);
+       ctx->cache_size = lp_parm_int(global_loadparm, NULL, "mangle", "cachesize", 512);
 
        ctx->prefix_cache = talloc_array(ctx, char *, ctx->cache_size);
        if (ctx->prefix_cache == NULL) {
@@ -628,7 +628,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs)
        memset(ctx->prefix_cache, 0, sizeof(char *) * ctx->cache_size);
        memset(ctx->prefix_cache_hashes, 0, sizeof(uint32_t) * ctx->cache_size);
 
-       ctx->mangle_prefix = lp_parm_int(NULL, "mangle", "prefix", -1);
+       ctx->mangle_prefix = lp_parm_int(global_loadparm, NULL, "mangle", "prefix", -1);
        if (ctx->mangle_prefix < 0 || ctx->mangle_prefix > 6) {
                ctx->mangle_prefix = DEFAULT_MANGLE_PREFIX;
        }
index b73ee2c5261fc03ba763af2ac385c6ca79e0ba18..191212580b62b1f0fe7d249133ce4cb5a8d2dac8 100644 (file)
@@ -245,7 +245,7 @@ static NTSTATUS inotify_setup(struct sys_notify_context *ctx)
 {
        struct inotify_private *in;
 
-       if (!lp_parm_bool(NULL, "notify", "inotify", true)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "notify", "inotify", true)) {
                return NT_STATUS_INVALID_SYSTEM_SERVICE;
        }
 
index edd3cec82ab8a3b3a8f2e7fd98d67f97ec07d861..1d12a2b73cd99465f6809c43db56ed3d331a6c12 100644 (file)
@@ -798,13 +798,14 @@ static void init_copymap(struct loadparm_service *pservice);
 /* This is a helper function for parametrical options support. */
 /* It returns a pointer to parametrical option value if it exists or NULL otherwise */
 /* Actual parametrical functions are quite simple */
-const char *lp_get_parametric(struct loadparm_service *service, 
+const char *lp_get_parametric(struct loadparm_context *lp_ctx, 
+                             struct loadparm_service *service, 
                              const char *type, const char *option)
 {
        char *vfskey;
         struct param_opt *data;
        
-       data = (service == NULL ? loadparm.Globals.param_opt : service->param_opt);
+       data = (service == NULL ? lp_ctx->Globals.param_opt : service->param_opt);
     
        asprintf(&vfskey, "%s:%s", type, option);
        strlower(vfskey);
@@ -820,7 +821,7 @@ const char *lp_get_parametric(struct loadparm_service *service,
        if (service != NULL) {
                /* Try to fetch the same option but from globals */
                /* but only if we are not already working with Globals */
-               for (data = loadparm.Globals.param_opt; data; 
+               for (data = lp_ctx->Globals.param_opt; data; 
                     data = data->next) {
                        if (strcmp(data->key, vfskey) == 0) {
                                free(vfskey);
@@ -902,10 +903,11 @@ static bool lp_bool(const char *s)
 /* Parametric option has following syntax: 'Type: option = value' */
 /* Returned value is allocated in 'lp_talloc' context */
 
-const char *lp_parm_string(struct loadparm_service *service, const char *type, 
+const char *lp_parm_string(struct loadparm_context *lp_ctx, 
+                          struct loadparm_service *service, const char *type, 
                           const char *option)
 {
-       const char *value = lp_get_parametric(service, type, option);
+       const char *value = lp_get_parametric(lp_ctx, service, type, option);
 
        if (value)
                return lp_string(value);
@@ -917,11 +919,12 @@ const char *lp_parm_string(struct loadparm_service *service, const char *type,
 /* Parametric option has following syntax: 'Type: option = value' */
 /* Returned value is allocated in 'lp_talloc' context */
 
-const char **lp_parm_string_list(struct loadparm_service *service, 
+const char **lp_parm_string_list(struct loadparm_context *lp_ctx, 
+                                struct loadparm_service *service, 
                                 const char *type, 
                                 const char *option, const char *separator)
 {
-       const char *value = lp_get_parametric(service, type, option);
+       const char *value = lp_get_parametric(lp_ctx, service, type, option);
        
        if (value)
                return str_list_make(talloc_autofree_context(), value, 
@@ -933,10 +936,11 @@ const char **lp_parm_string_list(struct loadparm_service *service,
 /* Return parametric option from a given service. Type is a part of option before ':' */
 /* Parametric option has following syntax: 'Type: option = value' */
 
-int lp_parm_int(struct loadparm_service *service, const char *type, 
+int lp_parm_int(struct loadparm_context *lp_ctx, 
+               struct loadparm_service *service, const char *type, 
                const char *option, int default_v)
 {
-       const char *value = lp_get_parametric(service, type, option);
+       const char *value = lp_get_parametric(lp_ctx, service, type, option);
        
        if (value)
                return lp_int(value);
@@ -949,12 +953,13 @@ int lp_parm_int(struct loadparm_service *service, const char *type,
  * Parametric option has following syntax: 'Type: option = value'.
  */
 
-int lp_parm_bytes(struct loadparm_service *service, const char *type, 
+int lp_parm_bytes(struct loadparm_context *lp_ctx, 
+                 struct loadparm_service *service, const char *type, 
                  const char *option, int default_v)
 {
        uint64_t bval;
 
-       const char *value = lp_get_parametric(service, type, option);
+       const char *value = lp_get_parametric(lp_ctx, service, type, option);
 
        if (value && conv_str_size(value, &bval)) {
                if (bval <= INT_MAX) {
@@ -968,10 +973,11 @@ int lp_parm_bytes(struct loadparm_service *service, const char *type,
 /* Return parametric option from a given service. Type is a part of option before ':' */
 /* Parametric option has following syntax: 'Type: option = value' */
 
-unsigned long lp_parm_ulong(struct loadparm_service *service, const char *type, 
+unsigned long lp_parm_ulong(struct loadparm_context *lp_ctx, 
+                           struct loadparm_service *service, const char *type, 
                            const char *option, unsigned long default_v)
 {
-       const char *value = lp_get_parametric(service, type, option);
+       const char *value = lp_get_parametric(lp_ctx, service, type, option);
        
        if (value)
                return lp_ulong(value);
@@ -980,10 +986,11 @@ unsigned long lp_parm_ulong(struct loadparm_service *service, const char *type,
 }
 
 
-double lp_parm_double(struct loadparm_service *service, const char *type, 
+double lp_parm_double(struct loadparm_context *lp_ctx, 
+                     struct loadparm_service *service, const char *type, 
                      const char *option, double default_v)
 {
-       const char *value = lp_get_parametric(service, type, option);
+       const char *value = lp_get_parametric(lp_ctx, service, type, option);
        
        if (value)
                return lp_double(value);
@@ -994,10 +1001,11 @@ double lp_parm_double(struct loadparm_service *service, const char *type,
 /* Return parametric option from a given service. Type is a part of option before ':' */
 /* Parametric option has following syntax: 'Type: option = value' */
 
-bool lp_parm_bool(struct loadparm_service *service, const char *type, 
+bool lp_parm_bool(struct loadparm_context *lp_ctx, 
+                 struct loadparm_service *service, const char *type, 
                  const char *option, bool default_v)
 {
-       const char *value = lp_get_parametric(service, type, option);
+       const char *value = lp_get_parametric(lp_ctx, service, type, option);
        
        if (value)
                return lp_bool(value);
@@ -1569,7 +1577,8 @@ static void init_copymap(struct loadparm_service *pservice)
 /***************************************************************************
  Process a parametric option
 ***************************************************************************/
-static bool lp_do_parameter_parametric(struct loadparm_service *service, 
+static bool lp_do_parameter_parametric(struct loadparm_context *lp_ctx, 
+                                      struct loadparm_service *service, 
                                       const char *pszParmName, 
                                       const char *pszParmValue, int flags)
 {
@@ -1587,7 +1596,7 @@ static bool lp_do_parameter_parametric(struct loadparm_service *service,
        strlower(name);
 
        if (service == NULL) {
-               data = loadparm.Globals.param_opt;
+               data = lp_ctx->Globals.param_opt;
                mem_ctx = talloc_autofree_context();
        } else {
                data = service->param_opt;
@@ -1619,7 +1628,7 @@ static bool lp_do_parameter_parametric(struct loadparm_service *service,
        paramo->value = talloc_strdup(paramo, pszParmValue);
        paramo->flags = flags;
        if (service == NULL) {
-               DLIST_ADD(loadparm.Globals.param_opt, paramo);
+               DLIST_ADD(lp_ctx->Globals.param_opt, paramo);
        } else {
                DLIST_ADD(service->param_opt, paramo);
        }
@@ -1734,7 +1743,7 @@ bool lp_do_global_parameter(struct loadparm_context *lp_ctx,
 
        if (parmnum < 0) {
                if (strchr(pszParmName, ':')) {
-                       return lp_do_parameter_parametric(NULL, pszParmName, pszParmValue, 0);
+                       return lp_do_parameter_parametric(lp_ctx, NULL, pszParmName, pszParmValue, 0);
                }
                DEBUG(0, ("Ignoring unknown parameter \"%s\"\n", pszParmName));
                return true;
@@ -1768,7 +1777,7 @@ bool lp_do_service_parameter(struct loadparm_context *lp_ctx,
 
        if (parmnum < 0) {
                if (strchr(pszParmName, ':')) {
-                       return lp_do_parameter_parametric(service, pszParmName, pszParmValue, 0);
+                       return lp_do_parameter_parametric(lp_ctx, service, pszParmName, pszParmValue, 0);
                }
                DEBUG(0, ("Ignoring unknown parameter \"%s\"\n", pszParmName));
                return true;
@@ -1861,7 +1870,8 @@ bool lp_set_cmdline(struct loadparm_context *lp_ctx, const char *pszParmName,
 
        if (parmnum < 0 && strchr(pszParmName, ':')) {
                /* set a parametric option */
-               return lp_do_parameter_parametric(NULL, pszParmName, pszParmValue, FLAG_CMDLINE);
+               return lp_do_parameter_parametric(lp_ctx, NULL, pszParmName, 
+                                                 pszParmValue, FLAG_CMDLINE);
        }
 
        if (parmnum < 0) {
index c9786d06bd9d7913bf4375157f3fe1e4a52573a0..08d01af6e271b401b968adcec65a89a052ee5b6f 100644 (file)
@@ -53,7 +53,7 @@ static const char *sclassic_string_option(struct share_config *scfg, const char
                *val = '\0';
                val++;
 
-               ret = lp_parm_string(s, parm, val);
+               ret = lp_parm_string(global_loadparm, s, parm, val);
                if (!ret) {
                        ret = defval;
                }
@@ -113,7 +113,7 @@ static int sclassic_int_option(struct share_config *scfg, const char *opt_name,
                *val = '\0';
                val++;
 
-               ret = lp_parm_int(s, parm, val, defval);
+               ret = lp_parm_int(global_loadparm, s, parm, val, defval);
                if (!ret) {
                        ret = defval;
                }
@@ -169,7 +169,7 @@ static bool sclassic_bool_option(struct share_config *scfg, const char *opt_name
                *val = '\0';
                val++;
 
-               ret = lp_parm_bool(s, parm, val, defval);
+               ret = lp_parm_bool(global_loadparm, s, parm, val, defval);
                talloc_free(parm);
                return ret;
        }
@@ -236,7 +236,7 @@ static const char **sclassic_string_list_option(TALLOC_CTX *mem_ctx, struct shar
                *val = '\0';
                val++;
 
-               ret = lp_parm_string_list(s, parm, val, ",;");
+               ret = lp_parm_string_list(global_loadparm, s, parm, val, ",;");
                talloc_free(parm);
                return ret;
        }
index a046f1e29f8e13154277e1a0e686165deb61363e..677faccf36bf42c9f23248ea775ac712a4364e54 100644 (file)
@@ -36,7 +36,7 @@ _PUBLIC_ enum srvsvc_PlatformId dcesrv_common_get_platform_id(TALLOC_CTX *mem_ct
 {
        enum srvsvc_PlatformId id;
 
-       id = lp_parm_int(NULL, "server_info", "platform_id", PLATFORM_ID_NT);
+       id = lp_parm_int(global_loadparm, NULL, "server_info", "platform_id", PLATFORM_ID_NT);
 
        return id;
 }
@@ -66,19 +66,19 @@ const char *dcesrv_common_get_domain_name(TALLOC_CTX *mem_ctx, struct dcesrv_con
 /* This hardcoded value should go into a ldb database! */
 _PUBLIC_ uint32_t dcesrv_common_get_version_major(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
 {
-       return lp_parm_int(NULL, "server_info", "version_major", 5);
+       return lp_parm_int(global_loadparm, NULL, "server_info", "version_major", 5);
 }
 
 /* This hardcoded value should go into a ldb database! */
 _PUBLIC_ uint32_t dcesrv_common_get_version_minor(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
 {
-       return lp_parm_int(NULL, "server_info", "version_minor", 2);
+       return lp_parm_int(global_loadparm, NULL, "server_info", "version_minor", 2);
 }
 
 /* This hardcoded value should go into a ldb database! */
 _PUBLIC_ uint32_t dcesrv_common_get_version_build(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
 {
-       return lp_parm_int(NULL, "server_info", "version_build", 3790);
+       return lp_parm_int(global_loadparm, NULL, "server_info", "version_build", 3790);
 }
 
 /* This hardcoded value should go into a ldb database! */
index 7434a32128c57ba81d03273223d489a6e2298aab..40eab55c923ba1480518f1c31f19be1f7a286ed0 100644 (file)
@@ -40,12 +40,12 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct
         NTSTATUS status;
        const struct ndr_interface_table *table;
         struct dcesrv_remote_private *private;
-       const char *binding = lp_parm_string(NULL, "dcerpc_remote", "binding");
+       const char *binding = lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "binding");
        const char *user, *pass, *domain;
        struct cli_credentials *credentials;
        BOOL machine_account;
 
-       machine_account = lp_parm_bool(NULL, "dcerpc_remote", "use_machine_account", false);
+       machine_account = lp_parm_bool(global_loadparm, NULL, "dcerpc_remote", "use_machine_account", false);
 
        private = talloc(dce_call->conn, struct dcesrv_remote_private);
        if (!private) {
@@ -60,9 +60,9 @@ static NTSTATUS remote_op_bind(struct dcesrv_call_state *dce_call, const struct
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       user = lp_parm_string(NULL, "dcerpc_remote", "user");
-       pass = lp_parm_string(NULL, "dcerpc_remote", "password");
-       domain = lp_parm_string(NULL, "dceprc_remote", "domain");
+       user = lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "user");
+       pass = lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "password");
+       domain = lp_parm_string(global_loadparm, NULL, "dceprc_remote", "domain");
 
        table = ndr_table_by_uuid(&iface->syntax_id.uuid); /* FIXME: What about if_version ? */
        if (!table) {
@@ -224,7 +224,7 @@ static NTSTATUS remote_register_one_iface(struct dcesrv_context *dce_ctx, const
 static NTSTATUS remote_op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
 {
        int i;
-       const char **ifaces = str_list_make(dce_ctx, lp_parm_string(NULL,"dcerpc_remote","interfaces"),NULL);
+       const char **ifaces = str_list_make(dce_ctx, lp_parm_string(global_loadparm, NULL, "dcerpc_remote", "interfaces"),NULL);
 
        if (!ifaces) {
                DEBUG(3,("remote_op_init_server: no interfaces configured\n"));
index 45c197834a25f580c299bbdb5a642906ee5cdeb6..ae7dea6819416e38c588fd62fd042803d82ede10 100644 (file)
@@ -105,7 +105,7 @@ static int ejs_lpGet(MprVarHandle eid, int argc, char **argv)
                                mpr_Return(eid, mprCreateUndefinedVar());
                                return 0;
                        }
-                       value = lp_get_parametric(service, type, option);
+                       value = lp_get_parametric(global_loadparm, service, type, option);
                        if (value == NULL) {
                                mpr_Return(eid, mprCreateUndefinedVar());
                                return 0;
@@ -130,7 +130,7 @@ static int ejs_lpGet(MprVarHandle eid, int argc, char **argv)
                        mpr_Return(eid, mprCreateUndefinedVar());
                        return 0;
                }
-               value = lp_get_parametric(NULL, type, option);
+               value = lp_get_parametric(global_loadparm, NULL, type, option);
                if (value == NULL) {
                        mpr_Return(eid, mprCreateUndefinedVar());
                        return 0;
index 5338d480bcfe26d97e5b01cd82c0e32514d5ab93..c5372eff08950c1413833413a7037a0982ca609d 100644 (file)
@@ -442,7 +442,7 @@ static NTSTATUS test_apply_schema(struct test_become_dc_state *s,
                return werror_to_ntstatus(status);
        }
 
-       if (lp_parm_bool(NULL, "become dc", "dump objects", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "become dc", "dump objects", false)) {
                for (i=0; i < objs->num_objects; i++) {
                        struct ldb_ldif ldif;
                        fprintf(stdout, "#\n");
@@ -670,7 +670,7 @@ static NTSTATUS test_become_dc_store_chunk(void *private_data,
                return werror_to_ntstatus(status);
        }
 
-       if (lp_parm_bool(NULL, "become dc", "dump objects", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "become dc", "dump objects", false)) {
                for (i=0; i < objs->num_objects; i++) {
                        struct ldb_ldif ldif;
                        fprintf(stdout, "#\n");
@@ -700,7 +700,7 @@ static NTSTATUS test_become_dc_store_chunk(void *private_data,
                        return NT_STATUS_FOOBAR;
                }
 
-               if (lp_parm_bool(NULL, "become dc", "dump objects", false)) {
+               if (lp_parm_bool(global_loadparm, NULL, "become dc", "dump objects", false)) {
                        DEBUG(0,("# %s\n", sa->lDAPDisplayName));
                        NDR_PRINT_DEBUG(drsuapi_DsReplicaLinkedAttribute, &linked_attributes[i]);
                        dump_data(0,
@@ -726,7 +726,7 @@ BOOL torture_net_become_dc(struct torture_context *torture)
        s = talloc_zero(torture, struct test_become_dc_state);
        if (!s) return False;
 
-       s->netbios_name = lp_parm_string(NULL, "become dc", "smbtorture dc");
+       s->netbios_name = lp_parm_string(global_loadparm, NULL, "become dc", "smbtorture dc");
        if (!s->netbios_name || !s->netbios_name[0]) {
                s->netbios_name = "smbtorturedc";
        }
@@ -834,7 +834,7 @@ BOOL torture_net_become_dc(struct torture_context *torture)
                goto cleanup;
        }
 
-       if (lp_parm_bool(NULL, "become dc", "do not unjoin", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "become dc", "do not unjoin", false)) {
                talloc_free(s);
                return ret;
        }
index 06659b5e9ccff5e26215426f587e890552814df3..e9d270b3a8ec7387e632c7c86cf35bd0e2d65af6 100644 (file)
@@ -34,7 +34,7 @@ static bool iconv_untestable(struct torture_context *tctx)
 {
        iconv_t cd;
 
-       if (!lp_parm_bool(NULL, "iconv", "native", true))
+       if (!lp_parm_bool(global_loadparm, NULL, "iconv", "native", true))
                torture_skip(tctx, "system iconv disabled - skipping test");
 
        cd = iconv_open("UTF-16LE", "UCS-4LE");
index fc339bfcc5afb618201a7b92cea7e434d1f6f55c..562defe09e3460d9506faaa6a8a702bf678ffbaa 100644 (file)
@@ -124,7 +124,7 @@ static struct smbcli_state *connect_one(char *share, int snum, int conn)
                char **unc_list = NULL;
                int num_unc_names;
                const char *p;
-               p = lp_parm_string(NULL, "torture", "unclist");
+               p = lp_parm_string(global_loadparm, NULL, "torture", "unclist");
                if (p) {
                        char *h, *s;
                        unc_list = file_lines_load(p, &num_unc_names, NULL);
index ab406f86245fb43ff22602143db38b791f4f5f00..d713ff321ee1178244d87e4d20b0da5e70c3f960 100644 (file)
@@ -87,7 +87,7 @@ static BOOL test_loadfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        printf("waiting for completion\n");
        while (*count != num_ops) {
                event_loop_once(cli->transport->socket->event.ctx);
-               if (lp_parm_bool(NULL, "torture", "progress", true)) {
+               if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
                }
@@ -152,10 +152,10 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                return False;
        }
 
-       io2.in.dest_host = lp_parm_string(NULL, "torture", "host");
+       io2.in.dest_host = lp_parm_string(global_loadparm, NULL, "torture", "host");
        io2.in.port = 0;
-       io2.in.called_name = lp_parm_string(NULL, "torture", "host");
-       io2.in.service = lp_parm_string(NULL, "torture", "share");
+       io2.in.called_name = lp_parm_string(global_loadparm, NULL, "torture", "host");
+       io2.in.service = lp_parm_string(global_loadparm, NULL, "torture", "share");
        io2.in.service_type = "A:";
 
        io2.in.credentials = cmdline_credentials;
@@ -177,7 +177,7 @@ static BOOL test_fetchfile(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        while (*count != torture_numops) {
                event_loop_once(event_ctx);
-               if (lp_parm_bool(NULL, "torture", "progress", true)) {
+               if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
                }
@@ -297,7 +297,7 @@ static BOOL test_appendacl(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        printf("waiting for completion\n");
        while (*count != num_ops) {
                event_loop_once(event_ctx);
-               if (lp_parm_bool(NULL, "torture", "progress", true)) {
+               if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
                }
@@ -340,10 +340,10 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        int *count = talloc_zero(mem_ctx, int);
        BOOL ret = True;
 
-       io1.in.dest_host = lp_parm_string(NULL, "torture", "host");
+       io1.in.dest_host = lp_parm_string(global_loadparm, NULL, "torture", "host");
        io1.in.port = 0;
-       io1.in.called_name = lp_parm_string(NULL, "torture", "host");
-       io1.in.service = lp_parm_string(NULL, "torture", "share");
+       io1.in.called_name = lp_parm_string(global_loadparm, NULL, "torture", "host");
+       io1.in.service = lp_parm_string(global_loadparm, NULL, "torture", "share");
        io1.in.service_type = "A:";
        io1.in.credentials = cmdline_credentials;
        io1.in.workgroup = lp_workgroup(global_loadparm);
@@ -364,7 +364,7 @@ static BOOL test_fsinfo(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        while (*count < torture_numops) {
                event_loop_once(event_ctx);
-               if (lp_parm_bool(NULL, "torture", "progress", true)) {
+               if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
                        printf("(%s) count=%d\r", __location__, *count);
                        fflush(stdout);
                }
index af3c56fb27ec42dec3171976612044ae7500f457..8c1c14d783e194b5abf6bc9b0ef5ac63fc242c46 100644 (file)
@@ -277,8 +277,8 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                return False;
        }
 
-       share = lp_parm_string(NULL, "torture", "share");
-       host  = lp_parm_string(NULL, "torture", "host");
+       share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+       host  = lp_parm_string(global_loadparm, NULL, "torture", "host");
        
        printf("create a second tree context on the same session\n");
        tree = smbcli_tree_init(cli->session, mem_ctx, False);
@@ -385,8 +385,8 @@ static BOOL test_tree_ulogoff(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                return False;
        }
 
-       share = lp_parm_string(NULL, "torture", "share");
-       host  = lp_parm_string(NULL, "torture", "host");
+       share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+       host  = lp_parm_string(global_loadparm, NULL, "torture", "host");
 
        printf("create the first new sessions\n");
        session1 = smbcli_session_init(cli->transport, mem_ctx, False);
@@ -746,8 +746,8 @@ static BOOL test_pid_2tcon(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                return False;
        }
 
-       share = lp_parm_string(NULL, "torture", "share");
-       host  = lp_parm_string(NULL, "torture", "host");
+       share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+       host  = lp_parm_string(global_loadparm, NULL, "torture", "host");
        
        printf("create a second tree context on the same session\n");
        tree = smbcli_tree_init(cli->session, mem_ctx, False);
index 810667134a011f3c2a7f9c5fcd2dafdea52627e8..368a24dbae68b49bced2b0c03cfcf9fba09bf42f 100644 (file)
@@ -247,10 +247,10 @@ static BOOL test_max_eas(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
 
        printf("TESTING SETFILEINFO MAX. EA_SET\n");
 
-       maxeasize  = lp_parm_int(NULL, "torture", "maxeasize", 65536);
-       maxeanames = lp_parm_int(NULL, "torture", "maxeanames", 101);
-       maxeastart = lp_parm_int(NULL, "torture", "maxeastart", 1);
-       maxeadebug = lp_parm_int(NULL, "torture", "maxeadebug", 0);
+       maxeasize  = lp_parm_int(global_loadparm, NULL, "torture", "maxeasize", 65536);
+       maxeanames = lp_parm_int(global_loadparm, NULL, "torture", "maxeanames", 101);
+       maxeastart = lp_parm_int(global_loadparm, NULL, "torture", "maxeastart", 1);
+       maxeadebug = lp_parm_int(global_loadparm, NULL, "torture", "maxeadebug", 0);
 
        /* Do some sanity check on possibly passed parms */
        if (maxeasize <= 0) {
index 245a15d269be454253158e6f32833b698fceffc9..f55d37330ae0bb6bf35d56c18c7cffc964935fdd 100644 (file)
@@ -599,8 +599,8 @@ static bool test_async(struct torture_context *tctx,
        session->vuid = setup.out.vuid;
 
        printf("create new tree context\n");
-       share = lp_parm_string(NULL, "torture", "share");
-       host  = lp_parm_string(NULL, "torture", "host");
+       share = lp_parm_string(global_loadparm, NULL, "torture", "share");
+       host  = lp_parm_string(global_loadparm, NULL, "torture", "host");
        tree = smbcli_tree_init(session, tctx, False);
        tcon.generic.level = RAW_TCON_TCONX;
        tcon.tconx.in.flags = 0;
index 97509606c3669fca91064ddc77c9ecd02cf42ba2..d55a0a012ec74f4a13500f6127959badf744199d 100644 (file)
@@ -318,7 +318,7 @@ BOOL torture_bench_lock(struct torture_context *torture)
 
        progress = torture_setting_bool(torture, "progress", true);
 
-       nprocs = lp_parm_int(NULL, "torture", "nprocs", 4);
+       nprocs = lp_parm_int(global_loadparm, NULL, "torture", "nprocs", 4);
 
        state = talloc_zero_array(mem_ctx, struct benchlock_state, nprocs);
 
index 2df2c6c84e89cf6a4bc8b9d1b9afa8c75f466fca..ad7027938d2873f37468dd9c19d2c22a6b11b5d8 100644 (file)
@@ -130,7 +130,7 @@ static BOOL test_mkdir(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        md.t2mkdir.in.eas[2].value = data_blob_talloc(mem_ctx, "xx1", 3);
        status = smb_raw_mkdir(cli->tree, &md);
 
-       if (lp_parm_bool(NULL, "torture", "samba3", false)
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)
            && NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)) {
                d_printf("EAS not supported -- not treating as fatal\n");
        }
index b9d1d07b5e325c46f71f9bcf400acfd27aeccd3f..d086dcbfde7e67bb6a93f39ad9dd65570392187a 100644 (file)
@@ -711,7 +711,7 @@ static BOOL test_notify_mask(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                NOTIFY_ACTION_MODIFIED,
                FILE_NOTIFY_CHANGE_ATTRIBUTES, 1);
 
-       if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                printf("Samba3 does not yet support create times "
                       "everywhere\n");
        }
index c0a32e00f4881ae416da66083f45bbc0d6297c36..c75d8f6bfc18d0e04b791581164db6e4c6add5b7 100644 (file)
@@ -398,7 +398,7 @@ static BOOL test_openx(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.openx.in.file_attrs = FILE_ATTRIBUTE_SYSTEM;
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
-       if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                CHECK_ALL_INFO(FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_ARCHIVE, 
                               attrib & ~(FILE_ATTRIBUTE_NONINDEXED|
                                          FILE_ATTRIBUTE_SPARSE));
@@ -569,7 +569,7 @@ static BOOL test_t2open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
                status = smb_raw_open(cli->tree, mem_ctx, &io);
                if ((io.t2open.in.num_eas != 0)
                    && NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)
-                   && lp_parm_bool(NULL, "torture", "samba3", false)) {
+                   && lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                        printf("(%s) EAs not supported, not treating as fatal "
                               "in Samba3 test\n", __location__);
                        io.t2open.in.num_eas = 0;
@@ -1346,8 +1346,8 @@ static BOOL test_raw_open_multi(void)
        struct smbcli_state **clients;
        struct smbcli_request **requests;
        union smb_open *ios;
-       const char *host = lp_parm_string(NULL, "torture", "host");
-       const char *share = lp_parm_string(NULL, "torture", "share");
+       const char *host = lp_parm_string(global_loadparm, NULL, "torture", "host");
+       const char *share = lp_parm_string(global_loadparm, NULL, "torture", "share");
        int i, num_files = 3;
        struct event_context *ev;
        int num_ok = 0;
index 6d84ff1ae9400f797f4e8da00758358b2880278c..269208b97f6e71eb7d761af6288f0569256c9587 100755 (executable)
@@ -191,21 +191,21 @@ bool torture_ping_pong(struct torture_context *torture)
        uint8_t *val;
        int count, loops;
 
-       fn = lp_parm_string(NULL, "torture", "filename");
+       fn = lp_parm_string(global_loadparm, NULL, "torture", "filename");
        if (fn == NULL) {
                DEBUG(0,("You must specify the filename using --option=torture:filename=...\n"));
                return false;
        }
 
-       num_locks = lp_parm_int(NULL, "torture", "num_locks", -1);
+       num_locks = lp_parm_int(global_loadparm, NULL, "torture", "num_locks", -1);
        if (num_locks == -1) {
                DEBUG(0,("You must specify num_locks using --option=torture:num_locks=...\n"));
                return false;
        }
 
-       do_reads     = lp_parm_bool(NULL, "torture", "read", false);
-       do_writes    = lp_parm_bool(NULL, "torture", "write", false);
-       lock_timeout =  lp_parm_int(NULL, "torture", "lock_timeout", 100000);
+       do_reads     = lp_parm_bool(global_loadparm, NULL, "torture", "read", false);
+       do_writes    = lp_parm_bool(global_loadparm, NULL, "torture", "write", false);
+       lock_timeout =  lp_parm_int(global_loadparm, NULL, "torture", "lock_timeout", 100000);
 
        if (!torture_open_connection(&cli, 0)) {
                DEBUG(0,("Could not open connection\n"));
index 61bf027ae8a2590f02b26b3ca560708196585cbb..9a5153b5537e5f669878f71620c0c8e6812f05a0 100644 (file)
@@ -482,7 +482,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
        CHECK_STATUS(status, NT_STATUS_OK);
        CHECK_VALUE(io.readx.out.remaining, 0xFFFF);
        CHECK_VALUE(io.readx.out.compaction_mode, 0);
-       if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                printf("SAMBA3: large read extension\n");
                CHECK_VALUE(io.readx.out.nread, 80000);
        } else {
@@ -526,7 +526,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
                io.readx.in.maxcnt = 0x10000;
                status = smb_raw_read(cli->tree, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+               if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                        printf("SAMBA3: large read extension\n");
                        CHECK_VALUE(io.readx.out.nread, 0x10000);
                } else {
@@ -536,7 +536,7 @@ static bool test_readx(struct torture_context *tctx, struct smbcli_state *cli)
                io.readx.in.maxcnt = 0x10001;
                status = smb_raw_read(cli->tree, &io);
                CHECK_STATUS(status, NT_STATUS_OK);
-               if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+               if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                        printf("SAMBA3: large read extension\n");
                        CHECK_VALUE(io.readx.out.nread, 0x10001);
                } else {
index 88f9a71aaf092d21d596c42195fb150713ed0a70..287a8b34589986f4819782794e1d49ddae7626bc 100644 (file)
@@ -129,7 +129,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
        io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
        status = smb_raw_unlink(cli->tree, &io);
 
-       if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                /*
                 * In Samba3 we gave up upon getting the error codes in
                 * wildcard unlink correct. Trying gentest showed that this is
@@ -157,7 +157,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
        io.unlink.in.pattern = BASEDIR "\\t*";
        io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
        status = smb_raw_unlink(cli->tree, &io);
-       if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
        }
        else {
@@ -169,7 +169,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
        io.unlink.in.pattern = BASEDIR "\\*.dat";
        io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
        status = smb_raw_unlink(cli->tree, &io);
-       if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
        }
        else {
@@ -179,7 +179,7 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
        io.unlink.in.pattern = BASEDIR "\\*.tx?";
        io.unlink.in.attrib = 0;
        status = smb_raw_unlink(cli->tree, &io);
-       if (lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
                CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
        }
        else {
@@ -282,7 +282,7 @@ static bool test_delete_on_close(struct torture_context *tctx,
        CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
 
 
-       if (!lp_parm_bool(NULL, "torture", "samba3", false)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "torture", "samba3", false)) {
 
                /*
                 * Known deficiency, also skipped in base-delete.
index 7f71723e6ddcb68ac56d1d016bbc1a8215df6645..9880393cdd8786534091aff98d9498a23a780226 100644 (file)
@@ -72,7 +72,7 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
 {
        struct timeval tv = timeval_current();
        BOOL ret = True;
-       int timelimit = lp_parm_int(NULL, "torture", "timelimit", 10);
+       int timelimit = lp_parm_int(global_loadparm, NULL, "torture", "timelimit", 10);
        int count=0;
 
        printf("Running for %d seconds\n", timelimit);
@@ -82,7 +82,7 @@ static BOOL bench_NetShareEnumAll(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
                talloc_free(tmp_ctx);
                count++;
                if (count % 50 == 0) {
-                       if (lp_parm_bool(NULL, "torture", "progress", true)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "torture", "progress", true)) {
                                printf("%.1f queries per second  \r", 
                                       count / timeval_elapsed(&tv));
                        }
index 0d3df0ffb344327e09c5f252662f5ed93fd733c2..eba20e6361ea7a8c14fbeb247248e7f8507bf4da 100644 (file)
@@ -111,7 +111,7 @@ BOOL torture_rpc_countcalls(struct torture_context *torture)
        if (!mem_ctx) {
                return False;
        }
-       iface_name = lp_parm_string(NULL, "countcalls", "interface");
+       iface_name = lp_parm_string(global_loadparm, NULL, "countcalls", "interface");
        if (iface_name != NULL) {
                iface = ndr_table_by_name(iface_name);
                if (!iface) {
index 42c0cc8bda60e6852a46febe5191c10a073fc62d..770f73871a34ac2cc9d70152be60616dbeda84e2 100644 (file)
@@ -307,7 +307,7 @@ static BOOL test_DsReplicaGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                }
        };
 
-       if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
                printf("skipping DsReplicaGetInfo test against Samba4\n");
                return True;
        }
@@ -380,12 +380,12 @@ static BOOL test_DsReplicaSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                }
        };
 
-       if (!lp_parm_bool(NULL, "torture", "dangerous", False)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", False)) {
                printf("DsReplicaSync disabled - enable dangerous tests to use\n");
                return True;
        }
 
-       if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
                printf("skipping DsReplicaSync test against Samba4\n");
                return True;
        }
@@ -448,7 +448,7 @@ static BOOL test_DsReplicaUpdateRefs(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                }
        };
 
-       if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
                printf("skipping DsReplicaUpdateRefs test against Samba4\n");
                return True;
        }
@@ -515,7 +515,7 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                }
        };
 
-       if (lp_parm_bool(NULL, "torture", "samba4", False)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)) {
                printf("skipping DsGetNCChanges test against Samba4\n");
                return True;
        }
@@ -544,7 +544,7 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                        r.in.req.req5.highwatermark.highest_usn         = 0;
                        r.in.req.req5.uptodateness_vector               = NULL;
                        r.in.req.req5.replica_flags                     = 0;
-                       if (lp_parm_bool(NULL, "drsuapi","compression", False)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "drsuapi","compression", False)) {
                                r.in.req.req5.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
                        r.in.req.req5.max_object_count                  = 0;
@@ -566,10 +566,10 @@ static BOOL test_DsGetNCChanges(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                        r.in.req.req8.highwatermark.highest_usn         = 0;
                        r.in.req.req8.uptodateness_vector               = NULL;
                        r.in.req.req8.replica_flags                     = 0;
-                       if (lp_parm_bool(NULL,"drsuapi","compression",False)) {
+                       if (lp_parm_bool(global_loadparm, NULL,"drsuapi","compression",False)) {
                                r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
-                       if (lp_parm_bool(NULL,"drsuapi","neighbour_writeable",True)) {
+                       if (lp_parm_bool(global_loadparm, NULL,"drsuapi","neighbour_writeable",True)) {
                                r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
                        }
                        r.in.req.req8.replica_flags                     |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
index 153d41a8e916e5312f2a6382ea9bc4c11e27b0ad..d3530dae1967328298c825a43b2585e45d6a406b 100644 (file)
@@ -589,7 +589,7 @@ BOOL test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                                .comment = "display name for Microsoft Support Account",
                                .status = DRSUAPI_DS_NAME_STATUS_OK,
                                .alternate_status = DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE,
-                               .skip = lp_parm_bool(NULL, "torture", "samba4", False)
+                               .skip = lp_parm_bool(global_loadparm, NULL, "torture", "samba4", False)
                        },
                        {
                                .format_offered = DRSUAPI_DS_NAME_FORMAT_GUID,
index 79063e86da379ccbde4ca87864e28eb16eb1d2ca..347b1a5bc743070a17247826f8e40d3fc4294e9f 100644 (file)
@@ -84,7 +84,7 @@ static struct DsSyncTest *test_create_context(TALLOC_CTX *mem_ctx)
        struct DsSyncTest *ctx;
        struct drsuapi_DsBindInfo28 *our_bind_info28;
        struct drsuapi_DsBindInfoCtr *our_bind_info_ctr;
-       const char *binding = lp_parm_string(NULL, "torture", "binding");
+       const char *binding = lp_parm_string(global_loadparm, NULL, "torture", "binding");
        ctx = talloc_zero(mem_ctx, struct DsSyncTest);
        if (!ctx) return NULL;
 
@@ -149,7 +149,7 @@ static struct DsSyncTest *test_create_context(TALLOC_CTX *mem_ctx)
        our_bind_info28->supported_extensions   |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3;
        our_bind_info28->supported_extensions   |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7;
        our_bind_info28->supported_extensions   |= DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT;
-       if (lp_parm_bool(NULL, "dssync", "xpress", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "dssync", "xpress", false)) {
                our_bind_info28->supported_extensions   |= DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS;
        }
        our_bind_info28->site_guid              = GUID_zero();
@@ -420,11 +420,11 @@ static void test_analyse_objects(struct DsSyncTest *ctx,
        static uint32_t object_id;
        const char *save_values_dir;
 
-       if (!lp_parm_bool(NULL,"dssync","print_pwd_blobs", false)) {
+       if (!lp_parm_bool(global_loadparm, NULL,"dssync","print_pwd_blobs", false)) {
                return; 
        }
 
-       save_values_dir = lp_parm_string(NULL, "dssync", "save_pwd_blobs_dir");
+       save_values_dir = lp_parm_string(global_loadparm, NULL, "dssync", "save_pwd_blobs_dir");
 
        for (; cur; cur = cur->next_object) {
                const char *dn;
@@ -560,17 +560,17 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
        ZERO_STRUCT(null_guid);
        ZERO_STRUCT(null_sid);
 
-       partition = lp_parm_string(NULL, "dssync", "partition");
+       partition = lp_parm_string(global_loadparm, NULL, "dssync", "partition");
        if (partition == NULL) {
                partition = ctx->domain_dn;
                printf("dssync:partition not specified, defaulting to %s.\n", ctx->domain_dn);
        }
 
-       highest_usn = lp_parm_int(NULL, "dssync", "highest_usn", 0);
+       highest_usn = lp_parm_int(global_loadparm, NULL, "dssync", "highest_usn", 0);
 
-       array[0].level = lp_parm_int(NULL, "dssync", "get_nc_changes_level", array[0].level);
+       array[0].level = lp_parm_int(global_loadparm, NULL, "dssync", "get_nc_changes_level", array[0].level);
 
-       if (lp_parm_bool(NULL, "dssync", "print_pwd_blobs", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "dssync", "print_pwd_blobs", false)) {
                const struct samr_Password *nthash;
                nthash = cli_credentials_get_nt_hash(ctx->new_dc.credentials, ctx);
                if (nthash) {
@@ -606,10 +606,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
                        r.in.req.req5.highwatermark.highest_usn         = highest_usn;
                        r.in.req.req5.uptodateness_vector               = NULL;
                        r.in.req.req5.replica_flags                     = 0;
-                       if (lp_parm_bool(NULL, "dssync", "compression", false)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "dssync", "compression", false)) {
                                r.in.req.req5.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
-                       if (lp_parm_bool(NULL, "dssync", "neighbour_writeable", true)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "dssync", "neighbour_writeable", true)) {
                                r.in.req.req5.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
                        }
                        r.in.req.req5.replica_flags                     |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
@@ -637,10 +637,10 @@ static BOOL test_FetchData(struct DsSyncTest *ctx)
                        r.in.req.req8.highwatermark.highest_usn         = highest_usn;
                        r.in.req.req8.uptodateness_vector               = NULL;
                        r.in.req.req8.replica_flags                     = 0;
-                       if (lp_parm_bool(NULL, "dssync", "compression", false)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "dssync", "compression", false)) {
                                r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
                        }
-                       if (lp_parm_bool(NULL, "dssync", "neighbour_writeable", true)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "dssync", "neighbour_writeable", true)) {
                                r.in.req.req8.replica_flags             |= DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
                        }
                        r.in.req.req8.replica_flags                     |= DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
@@ -760,8 +760,8 @@ static BOOL test_FetchNT4Data(struct DsSyncTest *ctx)
        r.in.bind_handle        = &ctx->new_dc.drsuapi.bind_handle;
        r.in.level              = 1;
 
-       r.in.req.req1.unknown1  = lp_parm_int(NULL, "dssync", "nt4-1", 3);
-       r.in.req.req1.unknown2  = lp_parm_int(NULL, "dssync", "nt4-2", 0x00004000);
+       r.in.req.req1.unknown1  = lp_parm_int(global_loadparm, NULL, "dssync", "nt4-1", 3);
+       r.in.req.req1.unknown2  = lp_parm_int(global_loadparm, NULL, "dssync", "nt4-2", 0x00004000);
 
        while (1) {
                r.in.req.req1.length    = cookie.length;
index 00fc30414d701e5d7453a2aa557c3391814cdc6c..0a78e9d76d3e818dea864959f62fd84136cb2610 100644 (file)
@@ -1312,7 +1312,7 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p,
        NTSTATUS status;
        struct lsa_QuerySecurity r;
 
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping QuerySecurity test against Samba4\n");
                return True;
        }
@@ -1551,7 +1551,7 @@ static BOOL test_QueryForestTrustInformation(struct dcerpc_pipe *p,
 
        printf("\nTesting lsaRQueryForestTrustInformation\n");
 
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping QueryForestTrustInformation against Samba4\n");
                return True;
        }
@@ -1918,7 +1918,7 @@ static BOOL test_QueryDomainInfoPolicy(struct dcerpc_pipe *p,
        NTSTATUS status;
        int i;
        BOOL ret = True;
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping QueryDomainInformationPolicy test against Samba4\n");
                return True;
        }
@@ -1954,7 +1954,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p,
        BOOL ret = True;
        printf("\nTesting QueryInfoPolicy\n");
 
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping QueryInfoPolicy against Samba4\n");
                return True;
        }
@@ -1985,7 +1985,7 @@ static BOOL test_QueryInfoPolicy(struct dcerpc_pipe *p,
                        }
                        break;
                default:
-                       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                                /* Other levels not implemented yet */
                                if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) {
                                        printf("QueryInfoPolicy failed - %s\n", nt_errstr(status));
@@ -2056,7 +2056,7 @@ static BOOL test_QueryInfoPolicy2(struct dcerpc_pipe *p,
                        }
                        break;
                default:
-                       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                                /* Other levels not implemented yet */
                                if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)) {
                                        printf("QueryInfoPolicy2 failed - %s\n", nt_errstr(status));
index 75a7d760d91008eee2642866a42d0e56c8fe3342..92f8778df6a86941c02f8ad7111fe7fb9c6bcdf7 100644 (file)
@@ -1230,7 +1230,7 @@ static BOOL test_join3(TALLOC_CTX *mem_ctx,
        struct cli_credentials *wks_creds;
 
        status = smbcli_full_connection(mem_ctx, &cli,
-                                       lp_parm_string(NULL, "torture", "host"),
+                                       lp_parm_string(global_loadparm, NULL, "torture", "host"),
                                        "IPC$", NULL, smb_creds, NULL);
        if (!NT_STATUS_IS_OK(status)) {
                d_printf("smbcli_full_connection failed: %s\n",
index 2a70a5b71f150e7fd78c40274cf9e6a5c787c834..af1ff44a43c60a3cac642b7ded55216c89841a98 100644 (file)
@@ -84,7 +84,7 @@ static BOOL test_Shutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        NTSTATUS status;
        struct samr_Shutdown r;
 
-       if (!lp_parm_bool(NULL, "torture", "dangerous", false)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
                printf("samr_Shutdown disabled - enable dangerous tests to use\n");
                return True;
        }
@@ -110,7 +110,7 @@ static BOOL test_SetDsrmPassword(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        struct lsa_String string;
        struct samr_Password hash;
 
-       if (!lp_parm_bool(NULL, "torture", "dangerous", false)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
                printf("samr_SetDsrmPassword disabled - enable dangerous tests to use\n");
                return True;
        }
@@ -159,7 +159,7 @@ static BOOL test_QuerySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        s.in.sec_info = 7;
        s.in.sdbuf = r.out.sdbuf;
 
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping SetSecurity test against Samba4\n");
                return True;
        }
@@ -415,7 +415,7 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
        TEST_USERINFO_INT(21, logon_hours.bits[3], 21, logon_hours.bits[3], 4, 
                          SAMR_FIELD_LOGON_HOURS);
 
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping Set Account Flag tests against Samba4\n");
                return ret;
        }
@@ -2121,7 +2121,7 @@ static BOOL test_alias_ops(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                ret = False;
        }
 
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping MultipleMembers Alias tests against Samba4\n");
                return ret;
        }
@@ -3180,7 +3180,7 @@ static BOOL test_EnumDomainUsers_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct
 #define ASYNC_COUNT 100
        struct rpc_request *req[ASYNC_COUNT];
 
-       if (!lp_parm_bool(NULL, "torture", "dangerous", false)) {
+       if (!lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
                printf("samr async test disabled - enable dangerous tests to use\n");
                return True;
        }
@@ -4067,7 +4067,7 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                return False;
        }
 
-       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                printf("skipping SetMemberAttributesOfGroup test against Samba4\n");
        } else {
                /* this one is quite strange. I am using random inputs in the
@@ -4256,7 +4256,7 @@ static BOOL test_OpenDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
                ret &= test_QueryDisplayInfo3(p, mem_ctx, &domain_handle);
                ret &= test_QueryDisplayInfo_continue(p, mem_ctx, &domain_handle);
                
-               if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+               if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                        printf("skipping GetDisplayEnumerationIndex test against Samba4\n");
                } else {
                        ret &= test_GetDisplayEnumerationIndex(p, mem_ctx, &domain_handle);
index cb70582615ec2f552221f38b62f0bfc22186b89f..69e18a40cd531fbc84dcff7928f3472c0fe0acec 100644 (file)
@@ -233,7 +233,7 @@ static bool test_schannel(struct torture_context *tctx,
 {
        struct test_join *join_ctx;
        NTSTATUS status;
-       const char *binding = lp_parm_string(NULL, "torture", "binding");
+       const char *binding = lp_parm_string(global_loadparm, NULL, "torture", "binding");
        struct dcerpc_binding *b;
        struct dcerpc_pipe *p = NULL;
        struct dcerpc_pipe *p_netlogon = NULL;
index 79a1b873763f3f6d9cebc050e5135d99302c2f68..b7e3b488c94fe57a46e18e6c9b053ff77b7b667a 100644 (file)
@@ -126,7 +126,7 @@ struct test_join *torture_create_testuser(struct torture_context *torture,
        int policy_min_pw_len = 0;
        struct test_join *join;
        char *random_pw;
-       const char *dc_binding = lp_parm_string(NULL, "torture", "dc_binding");
+       const char *dc_binding = lp_parm_string(global_loadparm, NULL, "torture", "dc_binding");
 
        join = talloc(NULL, struct test_join);
        if (join == NULL) {
@@ -328,9 +328,9 @@ _PUBLIC_ struct test_join *torture_join_domain(const char *machine_name,
        tj->libnet_r = libnet_r;
                
        libnet_ctx->cred = cmdline_credentials;
-       libnet_r->in.binding = lp_parm_string(NULL, "torture", "binding");
+       libnet_r->in.binding = lp_parm_string(global_loadparm, NULL, "torture", "binding");
        if (!libnet_r->in.binding) {
-               libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(NULL, "torture", "host"));
+               libnet_r->in.binding = talloc_asprintf(libnet_r, "ncacn_np:%s", lp_parm_string(global_loadparm, NULL, "torture", "host"));
        }
        libnet_r->in.level = LIBNET_JOINDOMAIN_SPECIFIED;
        libnet_r->in.netbios_name = machine_name;
index c9a5732d2a24a98329d4e2102d0f1f611ab7184f..c071327419da41132da2bf09e9863f49dedd7bcc 100644 (file)
@@ -74,9 +74,9 @@ static NTSTATUS torture_smb2_write(struct smb2_tree *tree, struct smb2_handle ha
        DATA_BLOB data;
        int i;
        
-       if (lp_parm_bool(NULL, "torture", "dangerous", false)) {
+       if (lp_parm_bool(global_loadparm, NULL, "torture", "dangerous", false)) {
                data = data_blob_talloc(tree, NULL, 160000);
-       } else if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+       } else if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                data = data_blob_talloc(tree, NULL, UINT16_MAX);
        } else {
                data = data_blob_talloc(tree, NULL, 120000);
index 86ca56ba55e86cf968e33a90c3178911b60c2908..ab7d4e3110a23ae9fc27c216f219664caa9a3c51 100644 (file)
@@ -105,7 +105,7 @@ static BOOL torture_smb2_fileinfo(struct smb2_tree *tree)
                        file_levels[i].dinfo.query_secdesc.in.secinfo_flags = 0x7;
                }
                if (file_levels[i].level == RAW_FILEINFO_SMB2_ALL_EAS) {
-                       if (lp_parm_bool(NULL, "torture", "samba4", false)) {
+                       if (lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)) {
                                continue;
                        }
                        file_levels[i].finfo.all_eas.in.continue_flags = 
index 946368a2edbce0a9c363d057b5edfc3b5c7eda26..1852d9a984c978e6576cb71e60a632eb325b02fd 100644 (file)
@@ -305,8 +305,8 @@ void torture_smb2_all_info(struct smb2_tree *tree, struct smb2_handle handle)
 BOOL torture_smb2_connection(TALLOC_CTX *mem_ctx, struct smb2_tree **tree)
 {
        NTSTATUS status;
-       const char *host = lp_parm_string(NULL, "torture", "host");
-       const char *share = lp_parm_string(NULL, "torture", "share");
+       const char *host = lp_parm_string(global_loadparm, NULL, "torture", "host");
+       const char *share = lp_parm_string(global_loadparm, NULL, "torture", "share");
        struct cli_credentials *credentials = cmdline_credentials;
 
        status = smb2_connect(mem_ctx, host, share, credentials, tree, 
index 5ef2025d1efd24cd23e9a37996c374fa9420fa94..b614e84a5ba2b9f04423c0de017c1e4e75507f60 100644 (file)
@@ -633,7 +633,7 @@ int main(int argc,char *argv[])
                        return false;
                }
                lp_set_cmdline(global_loadparm, "torture:host", binding_struct->host);
-               if (lp_parm_string(NULL, "torture", "share") == NULL)
+               if (lp_parm_string(global_loadparm, NULL, "torture", "share") == NULL)
                        lp_set_cmdline(global_loadparm, "torture:share", "IPC$");
                lp_set_cmdline(global_loadparm, "torture:binding", argv_new[1]);
        } else {
index 4716e93b829a70954a37a5bd361bf442bb91f1b8..29832fc1413e7841761c5ed224134a020b364beb 100644 (file)
@@ -363,25 +363,25 @@ BOOL torture_run_test(struct torture_context *context,
 int torture_setting_int(struct torture_context *test, const char *name, 
                                                        int default_value)
 {
-       return lp_parm_int(NULL, "torture", name, default_value);
+       return lp_parm_int(global_loadparm, NULL, "torture", name, default_value);
 }
 
 double torture_setting_double(struct torture_context *test, const char *name, 
                                                        double default_value)
 {
-       return lp_parm_double(NULL, "torture", name, default_value);
+       return lp_parm_double(global_loadparm, NULL, "torture", name, default_value);
 }
 
 bool torture_setting_bool(struct torture_context *test, const char *name, 
                                                        bool default_value)
 {
-       return lp_parm_bool(NULL, "torture", name, default_value);
+       return lp_parm_bool(global_loadparm, NULL, "torture", name, default_value);
 }
 
 const char *torture_setting_string(struct torture_context *test, const char *name, 
                                                        const char *default_value)
 {
-       const char *ret = lp_parm_string(NULL, "torture", name);
+       const char *ret = lp_parm_string(global_loadparm, NULL, "torture", name);
 
        if (ret == NULL)
                return default_value;
index aea1ee19e0b4e123561467cd388db9e961e34f04..bc2f4382bbd7c575b3cd7ea1a308a9a342e5d1ff 100644 (file)
@@ -72,8 +72,8 @@ static struct smbcli_state *connect_to_server(void *mem_ctx,
        NTSTATUS status;
        struct smbcli_state *cli;
 
-       const char *host = lp_parm_string(NULL, "torture", "host");
-       const char *share = lp_parm_string(NULL, "torture", "share");
+       const char *host = lp_parm_string(global_loadparm, NULL, "torture", "host");
+       const char *share = lp_parm_string(global_loadparm, NULL, "torture", "share");
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        host, share, NULL,
index 12d6f826432765635d4189daf1d74b9b4f678bcd..10d48313263df3087ecd2cd9654a2be2e868511a 100644 (file)
@@ -479,9 +479,9 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
                return False;
        }
 
-       (*c)->transport->options.use_oplocks = lp_parm_bool(NULL, "torture", 
+       (*c)->transport->options.use_oplocks = lp_parm_bool(global_loadparm, NULL, "torture", 
                                                                                                                "use_oplocks", false);
-       (*c)->transport->options.use_level2_oplocks = lp_parm_bool(NULL, "torture", 
+       (*c)->transport->options.use_level2_oplocks = lp_parm_bool(global_loadparm, NULL, "torture", 
                                                                                                "use_level2_oplocks", false);
 
        return True;
@@ -495,10 +495,10 @@ _PUBLIC_ bool torture_get_conn_index(int conn_index,
        int num_unc_names = 0;
        const char *p;
 
-       (*host) = talloc_strdup(mem_ctx, lp_parm_string(NULL, "torture", "host"));
-       (*share) = talloc_strdup(mem_ctx, lp_parm_string(NULL, "torture", "share"));
+       (*host) = talloc_strdup(mem_ctx, lp_parm_string(global_loadparm, NULL, "torture", "host"));
+       (*share) = talloc_strdup(mem_ctx, lp_parm_string(global_loadparm, NULL, "torture", "share"));
        
-       p = lp_parm_string(NULL, "torture", "unclist");
+       p = lp_parm_string(global_loadparm, NULL, "torture", "unclist");
        if (!p) {
                return True;
        }
index 77a333f003bda150105eb6296dcc050ce27a32a5..a5c546beb91191cc50c28d277826efe3c8ed2541 100644 (file)
@@ -734,7 +734,7 @@ static void http_setup_session(struct esp_state *esp)
                s->data = NULL;
                s->te = NULL;
                s->edata = edata;
-               s->lifetime = lp_parm_int(NULL, "web", "sessiontimeout", 900);
+               s->lifetime = lp_parm_int(global_loadparm, NULL, "web", "sessiontimeout", 900);
                DLIST_ADD(edata->sessions, s);
                talloc_set_destructor(s, session_destructor);
                if (!generated_key) {
index be01cb3f2488165d6c69e85f0537a1dd28cf0a82..9e7e87887aef79c6e7a35db5cfba35cfc20927d6 100644 (file)
@@ -83,26 +83,26 @@ static NTSTATUS wreplsrv_open_winsdb(struct wreplsrv_service *service)
        }
 
        /* the default renew interval is 6 days */
-       service->config.renew_interval    = lp_parm_int(NULL,"wreplsrv","renew_interval", 6*24*60*60);
+       service->config.renew_interval    = lp_parm_int(global_loadparm, NULL,"wreplsrv","renew_interval", 6*24*60*60);
 
        /* the default tombstone (extinction) interval is 6 days */
-       service->config.tombstone_interval= lp_parm_int(NULL,"wreplsrv","tombstone_interval", 6*24*60*60);
+       service->config.tombstone_interval= lp_parm_int(global_loadparm, NULL,"wreplsrv","tombstone_interval", 6*24*60*60);
 
        /* the default tombstone (extinction) timeout is 1 day */
-       service->config.tombstone_timeout = lp_parm_int(NULL,"wreplsrv","tombstone_timeout", 1*24*60*60);
+       service->config.tombstone_timeout = lp_parm_int(global_loadparm, NULL,"wreplsrv","tombstone_timeout", 1*24*60*60);
 
        /* the default tombstone extra timeout is 3 days */
-       service->config.tombstone_extra_timeout = lp_parm_int(NULL,"wreplsrv","tombstone_extra_timeout", 3*24*60*60);
+       service->config.tombstone_extra_timeout = lp_parm_int(global_loadparm, NULL,"wreplsrv","tombstone_extra_timeout", 3*24*60*60);
 
        /* the default verify interval is 24 days */
-       service->config.verify_interval   = lp_parm_int(NULL,"wreplsrv","verify_interval", 24*24*60*60);
+       service->config.verify_interval   = lp_parm_int(global_loadparm, NULL,"wreplsrv","verify_interval", 24*24*60*60);
 
        /* the default scavenging interval is 'renew_interval/2' */
-       service->config.scavenging_interval=lp_parm_int(NULL,"wreplsrv","scavenging_interval",
+       service->config.scavenging_interval=lp_parm_int(global_loadparm, NULL,"wreplsrv","scavenging_interval",
                                                        service->config.renew_interval/2);
 
        /* the maximun interval to the next periodic processing event */
-       service->config.periodic_interval = lp_parm_int(NULL,"wreplsrv","periodic_interval", 15);
+       service->config.periodic_interval = lp_parm_int(global_loadparm, NULL,"wreplsrv","periodic_interval", 15);
 
        return NT_STATUS_OK;
 }