Change to use the new lpcfg_*() prefix in Samba4
authorAndrew Tridgell <tridge@samba.org>
Fri, 16 Jul 2010 07:43:23 +0000 (17:43 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 16 Jul 2010 07:43:23 +0000 (17:43 +1000)
Samba4 has changed lp_*() to lpcfg_*() in order to provide source code
compatibility with Samba3 code, which will make the merged
Samba4/Samba3 work much easier.

This patch changes the lp_*() calls in OpenChange to lpcfg_*(), to
allow it to compile with the new Samba4 code

26 files changed:
branches/current-samba4/libmapi/cdo_mapi.c
branches/current-samba4/libmapi/emsmdb.c
branches/current-samba4/libmapiadmin/mapiadmin_user.c
branches/current-samba4/mapiproxy/dcesrv_mapiproxy.c
branches/current-samba4/mapiproxy/dcesrv_mapiproxy_nspi.c
branches/current-samba4/mapiproxy/dcesrv_mapiproxy_rfr.c
branches/current-samba4/mapiproxy/libmapiproxy/dcesrv_mapiproxy_module.c
branches/current-samba4/mapiproxy/libmapiproxy/dcesrv_mapiproxy_server.c
branches/current-samba4/mapiproxy/libmapistore/tests/mapistore_test.c
branches/current-samba4/mapiproxy/modules/mpm_cache.c
branches/current-samba4/mapiproxy/modules/mpm_dummy.c
branches/current-samba4/mapiproxy/modules/mpm_pack.c
branches/current-samba4/mapiproxy/servers/default/rfr/dcesrv_exchange_ds_rfr.c
branches/current-samba4/torture/exchange_createuser.c
branches/current-samba4/torture/mapi_common.c
branches/current-samba4/torture/mapi_createuser.c
branches/current-samba4/torture/mapi_deletemail.c
branches/current-samba4/torture/mapi_permissions.c
branches/current-samba4/torture/mapi_sendappointment.c
branches/current-samba4/torture/mapi_sendattach.c
branches/current-samba4/torture/mapi_sendcontacts.c
branches/current-samba4/torture/mapi_sendmail.c
branches/current-samba4/torture/mapi_sendmail_html.c
branches/current-samba4/torture/mapi_sendtasks.c
branches/current-samba4/torture/nspi_profile.c
branches/current-samba4/torture/nspi_resolvenames.c

index 0a4c7fcd3f4a046b79563f91ab4e722cf3e002cb..52d9229fbcfa8583ecb36eee438e5cfb65d9cd65 100644 (file)
@@ -235,7 +235,7 @@ _PUBLIC_ enum MAPISTATUS MAPIInitialize(const char *profiledb)
        global_mapi_ctx->dumpdata = false;
        global_mapi_ctx->session = NULL;
        global_mapi_ctx->lp_ctx = loadparm_init(global_mapi_ctx->mem_ctx);
-       lp_load_default(global_mapi_ctx->lp_ctx);
+       lpcfg_load_default(global_mapi_ctx->lp_ctx);
 
        /* Enable logging on stdout */
        setup_logging(NULL, DEBUG_STDOUT);
@@ -324,7 +324,7 @@ _PUBLIC_ enum MAPISTATUS SetMAPIDebugLevel(uint32_t level)
        OPENCHANGE_RETVAL_IF(!global_mapi_ctx, MAPI_E_NOT_INITIALIZED, NULL);
 
        debuglevel = talloc_asprintf(talloc_autofree_context(), "%u", level);
-       ret = lp_set_cmdline(global_mapi_ctx->lp_ctx, "log level", debuglevel);
+       ret = lpcfg_set_cmdline(global_mapi_ctx->lp_ctx, "log level", debuglevel);
        talloc_free(debuglevel);
 
        return (ret == true) ? MAPI_E_SUCCESS : MAPI_E_INVALID_PARAMETER;
index 86bf15d55ff8f7ca7a2abb3e123568a3c336aafd..26c2bc65bb4c633c655067fba33bcf3ad27f7914 100644 (file)
@@ -390,7 +390,7 @@ struct mapi_notify_ctx *emsmdb_bind_notification(TALLOC_CTX *mem_ctx)
        notify_ctx->notifications->prev = NULL;
        notify_ctx->notifications->next = NULL;
 
-       load_interfaces(mem_ctx, lp_interfaces(global_mapi_ctx->lp_ctx), &ifaces);
+       load_interfaces(mem_ctx, lpcfg_interfaces(global_mapi_ctx->lp_ctx), &ifaces);
        ipaddr = iface_best_ip(ifaces, global_mapi_ctx->session->profile->server);
        if (!ipaddr) {
                talloc_free(notify_ctx->notifications);
index d88ceebfd5820996cc8b1d0f46750731c0c555d7..330390820081635a3d146ce3e6f21c296eafe3f9 100644 (file)
@@ -482,7 +482,7 @@ again:
                                                      mapiadmin_ctx->description ?
                                                      mapiadmin_ctx->description :
                                                      "OpenChange account created by host %s: %s", 
-                                        lp_netbios_name(global_mapi_ctx->lp_ctx), 
+                                        lpcfg_netbios_name(global_mapi_ctx->lp_ctx), 
                                         timestring(mapiadmin_ctx->user_ctx, time(NULL)));
 
        DEBUG(3, ("Resetting ACB flags, force pw change time\n"));
index a8d0a573d162e942b9ddf99a269b77c7b402524c..93fb2e3d00259c1768c2a927d2f376b48627c9a2 100644 (file)
@@ -57,7 +57,7 @@ static NTSTATUS mapiproxy_op_connect(struct dcesrv_call_state *dce_call,
 
        /* Retrieve the binding string from parametric options if undefined */
        if (!binding) {
-               binding = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "binding");
+               binding = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "binding");
                if (!binding) {
                        DEBUG(0, ("You must specify a DCE/RPC binding string\n"));
                        return NT_STATUS_INVALID_PARAMETER;
@@ -65,10 +65,10 @@ static NTSTATUS mapiproxy_op_connect(struct dcesrv_call_state *dce_call,
        }
 
        /* Retrieve parametric options */
-       machine_account = lp_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "use_machine_account", false);
-       user = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "username");
-       pass = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "password");
-       domain = lp_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "domain");
+       machine_account = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "use_machine_account", false);
+       user = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "username");
+       pass = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "password");
+       domain = lpcfg_parm_string(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "domain");
 
        /* Retrieve private mapiproxy data */
        private = dce_call->context->private_data;
@@ -195,7 +195,7 @@ static NTSTATUS mapiproxy_op_bind_proxy(struct dcesrv_call_state *dce_call, cons
                DEBUG(5, ("dcerpc_mapiproxy: Delegated credentials acquired\n"));
        }
 
-       delegated = lp_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "delegated_auth", false);
+       delegated = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "delegated_auth", false);
        if (delegated == false) {
                status = mapiproxy_op_connect(dce_call, table, NULL);
        }
@@ -224,7 +224,7 @@ static NTSTATUS mapiproxy_op_bind(struct dcesrv_call_state *dce_call, const stru
                  dce_call->conn->server_id.id, dce_call->conn->server_id.id2, dce_call->conn->server_id.node));
 
        /* Retrieve server mode parametric option */
-       server_mode = lp_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "server", false);
+       server_mode = lpcfg_parm_bool(dce_call->conn->dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "server", false);
 
        /* Initialize private structure */
        private = talloc(dce_call->context, struct dcesrv_mapiproxy_private);
@@ -587,7 +587,7 @@ static NTSTATUS mapiproxy_op_init_server(struct dcesrv_context *dce_ctx, const s
        ret = mapiproxy_server_init(dce_ctx);
        NT_STATUS_NOT_OK_RETURN(ret);
 
-       ifaces = str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "interfaces"), NULL);
+       ifaces = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "interfaces"), NULL);
 
        for (i = 0; ifaces[i]; i++) {
                /* Register the interface */
index a95f65807e1a05393e329764a077cc7a133c5dd2..e241838e699845e4c50d31f6c1b1abe06b72ed38 100644 (file)
@@ -100,8 +100,8 @@ bool mapiproxy_NspiGetProps(struct dcesrv_call_state *dce_call, struct NspiGetPr
        /* Step 3. Modify Exchange binding strings and only return ncacn_ip_tcp */
        slpstr->cValues = 1;
        slpstr->lppszA[0] = talloc_asprintf(dce_call, "ncacn_ip_tcp:%s.%s", 
-                                           lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
-                                           lp_realm(dce_call->conn->dce_ctx->lp_ctx));
+                                           lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
+                                           lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx));
        strlower_m((char *)slpstr->lppszA[0]);
 
        return true;
@@ -158,14 +158,14 @@ bool mapiproxy_NspiQueryRows(struct dcesrv_call_state *dce_call, struct NspiQuer
        if (private->exchname) {
                if (strstr(lpProp->value.lpszA, private->exchname)) {
                        lpProp->value.lpszA = string_sub_talloc((TALLOC_CTX *) dce_call, lpProp->value.lpszA, private->exchname, 
-                                                               lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx));      
+                                                               lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx));   
                }
        } else {
                lpszA = talloc_strdup(dce_call, lpProp->value.lpszA);
                if ((exchname = x500_get_servername(lpszA))) {
                        private->exchname = talloc_strdup(NULL, exchname);
                        lpProp->value.lpszA = string_sub_talloc((TALLOC_CTX *) dce_call, lpProp->value.lpszA, exchname, 
-                                                               lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx));
+                                                               lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx));
                        talloc_free(exchname);
                }
                talloc_free(lpszA);
@@ -193,7 +193,7 @@ bool mapiproxy_NspiDNToMId(struct dcesrv_call_state *dce_call, struct NspiDNToMI
        uint32_t                        i;
 
        private = dce_call->context->private_data;
-       proxyname = lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
+       proxyname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
 
        if (!private->exchname) return false;
 
index 5f5206f52fb8da616f68ef43a4c3fca1b8bed395..bc8fde4db1d2c0040e7cb077f6d1c88c0303ebf6 100644 (file)
@@ -41,8 +41,8 @@ bool mapiproxy_RfrGetNewDSA(struct dcesrv_call_state *dce_call, struct RfrGetNew
        if (!r->out.ppszServer) return false;
 
        *r->out.ppszServer = talloc_asprintf(dce_call, "%s.%s", 
-                                            lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
-                                            lp_realm(dce_call->conn->dce_ctx->lp_ctx));
+                                            lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx), 
+                                            lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx));
        strlower_m((char *)*r->out.ppszServer);
 
        return true;
index d4ed2b511bc208e848b5d86ce4a4c96a8e228a21..1154e40123b54eb72d36fef53717bbd1a4a1d311 100644 (file)
@@ -178,7 +178,7 @@ static NTSTATUS mapiproxy_module_load(struct dcesrv_context *dce_ctx)
        NTSTATUS                        status;
 
        /* Fetch the module list from smb.conf */
-       modules = str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "modules"), NULL);
+       modules = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "modules"), NULL);
 
        /* Add modules to the list */
        for (i = 0; modules[i]; i++) {
index cf8f7a47a059c8e46ea93f48cd0ad91d76951157..a662547f5d6567007a8241d5ab67d790b19cf75a 100644 (file)
@@ -179,7 +179,7 @@ static NTSTATUS mapiproxy_server_load(struct dcesrv_context *dce_ctx)
                                                                   NDR_EXCHANGE_DS_RFR_NAME, NULL };
 
        /* Check server mode */
-       server_mode = lp_parm_bool(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "server", false);
+       server_mode = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "server", false);
        DEBUG(0, ("MAPIPROXY server mode %s\n", (server_mode == false) ? "disabled" : "enabled"));
 
        if (server_mode == true) {
@@ -197,15 +197,15 @@ static NTSTATUS mapiproxy_server_load(struct dcesrv_context *dce_ctx)
        }
 
        /* Check for override/custom NSPI server */
-       nspi = lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "nspi_server");
+       nspi = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "nspi_server");
        mapiproxy_server_overwrite(dce_ctx, nspi, NDR_EXCHANGE_NSP_NAME);
 
        /* Check for override/custom EMSMDB server */
-       emsmdb = lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "emsmdb_server");
+       emsmdb = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "emsmdb_server");
        mapiproxy_server_overwrite(dce_ctx, emsmdb, NDR_EXCHANGE_EMSMDB_NAME);
 
        /* Check for override/custom RFR server */
-       rfr = lp_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "rfr_server");
+       rfr = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "dcerpc_mapiproxy", "rfr_server");
        mapiproxy_server_overwrite(dce_ctx, rfr, NDR_EXCHANGE_DS_RFR_NAME);
 
        for (server = server_list; server; server = server->next) {
@@ -300,7 +300,7 @@ _PUBLIC_ TDB_CONTEXT *mapiproxy_server_emsabp_tdb_init(struct loadparm_context *
        if (!mem_ctx) return NULL;
 
        /* Step 0. Retrieve a TDB context pointer on the emsabp_tdb database */
-       tdb_path = talloc_asprintf(mem_ctx, "%s/%s", lp_private_dir(lp_ctx), EMSABP_TDB_NAME);
+       tdb_path = talloc_asprintf(mem_ctx, "%s/%s", lpcfg_private_dir(lp_ctx), EMSABP_TDB_NAME);
        emsabp_tdb_ctx = tdb_open(tdb_path, 0, 0, O_RDWR|O_CREAT, 0600);
        talloc_free(tdb_path);
        if (!emsabp_tdb_ctx) {
@@ -351,7 +351,7 @@ _PUBLIC_ void *mapiproxy_server_openchange_ldb_init(struct loadparm_context *lp_
        if (!mem_ctx) return NULL;
 
        /* Step 0. Retrieve a LDB context pointer on openchange.ldb database */
-       ldb_path = talloc_asprintf(mem_ctx, "%s/%s", lp_private_dir(lp_ctx), OPENCHANGE_LDB_NAME);
+       ldb_path = talloc_asprintf(mem_ctx, "%s/%s", lpcfg_private_dir(lp_ctx), OPENCHANGE_LDB_NAME);
        openchange_ldb_ctx = ldb_init(mem_ctx, ev);
        if (!openchange_ldb_ctx) {
                talloc_free(mem_ctx);
index 706bbc7ff51f2eb85a7beacbc910e8eab5d4e9bc..b63fed47e2ed75ed4733bf50794e1c859d33ea92 100644 (file)
@@ -56,7 +56,7 @@ int main(int argc, const char *argv[])
 
        mem_ctx = talloc_named(NULL, 0, "mapistore_test");
        lp_ctx = loadparm_init(mem_ctx);
-       lp_load_default(lp_ctx);
+       lpcfg_load_default(lp_ctx);
        setup_logging(NULL, DEBUG_STDOUT);
        
        pc = poptGetContext("mapistore_test", argc, argv, long_options, 0);
@@ -71,7 +71,7 @@ int main(int argc, const char *argv[])
        poptFreeContext(pc);
 
        if (opt_debug) {
-               lp_set_cmdline(lp_ctx, "log level", opt_debug);
+               lpcfg_set_cmdline(lp_ctx, "log level", opt_debug);
        }
        
        retval = mapistore_set_mapping_path("/tmp");
index 3e33a1e2cb3b9c0cf3c30f3afe866dd5a974474f..9916e2642c9a0d2aa48a72c5b71851952d9c941d 100644 (file)
@@ -1109,11 +1109,11 @@ static NTSTATUS cache_init(struct dcesrv_context *dce_ctx)
        mpm->attachments = NULL;
        mpm->streams = NULL;
 
-       mpm->ahead = lp_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "ahead", false);
-       mpm->sync = lp_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync", false);
-       mpm->sync_min = lp_parm_int(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync_min", 500000);
-       mpm->sync_cmd = str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync_cmd"), " ");
-       mpm->dbpath = lp_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "path");
+       mpm->ahead = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "ahead", false);
+       mpm->sync = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync", false);
+       mpm->sync_min = lpcfg_parm_int(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync_min", 500000);
+       mpm->sync_cmd = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "sync_cmd"), " ");
+       mpm->dbpath = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "path");
 
        if ((mpm->ahead == true) && mpm->sync) {
                DEBUG(0, ("%s: cache:ahead and cache:sync are exclusive!\n", MPM_ERROR));
@@ -1136,7 +1136,7 @@ static NTSTATUS cache_init(struct dcesrv_context *dce_ctx)
        }
 
        lp_ctx = loadparm_init(dce_ctx);
-       lp_load_default(lp_ctx);
+       lpcfg_load_default(lp_ctx);
        dcerpc_init(lp_ctx);
 
        talloc_free(database);
index 67fb7e1b7f46ffbf07ff0d5b91a58fd12f58a893..8002083889efe70800ea0faaf3b70c52be93b932 100644 (file)
@@ -31,7 +31,7 @@ static NTSTATUS dummy_init(struct dcesrv_context *dce_ctx)
 {
        const char      *test;
 
-       test = lp_parm_string(dce_ctx->lp_ctx, NULL, "mpm_dummy", "test");
+       test = lpcfg_parm_string(dce_ctx->lp_ctx, NULL, "mpm_dummy", "test");
        if (test) {
                DEBUG(0, ("Sample dummy string: %s\n", test));
        }
index 21e7af5217f9f9eeeffe0057b79bd937f938fb2d..b93351258a58cb38cf96a86478a12ac3a50206b8 100644 (file)
@@ -295,7 +295,7 @@ static NTSTATUS pack_init(struct dcesrv_context *dce_ctx)
        struct loadparm_context *lp_ctx;
 
        /* Fetch the mapi call list from smb.conf */
-       calls = str_list_make(dce_ctx, lp_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "opnums"), NULL);
+       calls = str_list_make(dce_ctx, lpcfg_parm_string(dce_ctx->lp_ctx, NULL, MPM_NAME, "opnums"), NULL);
 
        mpm = talloc_zero(dce_ctx, struct mpm_pack);
        mpm->mapi_calls = talloc_zero(mpm, uint8_t);
@@ -321,10 +321,10 @@ static NTSTATUS pack_init(struct dcesrv_context *dce_ctx)
        mpm->mapi_calls[i] = 0;
 
        /* Fetch the lasthop parameter from smb.conf */
-       mpm->lasthop = lp_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "lasthop", true);
+       mpm->lasthop = lpcfg_parm_bool(dce_ctx->lp_ctx, NULL, MPM_NAME, "lasthop", true);
 
        lp_ctx = loadparm_init(dce_ctx);
-       lp_load_default(lp_ctx);
+       lpcfg_load_default(lp_ctx);
        dcerpc_init(lp_ctx);
 
        return NT_STATUS_OK;
index ab87fa97d4f4d7ede886de7d239500172a1b941f..dbb19b4accdcc402046142591bd96c12cd9ab083 100644 (file)
@@ -61,8 +61,8 @@ static enum MAPISTATUS dcesrv_RfrGetNewDSA(struct dcesrv_call_state *dce_call,
        }
 
        /* Step 1. We don't have load-balancing support yet, just return Samba FQDN name */
-       netbiosname = lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
-       realm = lp_realm(dce_call->conn->dce_ctx->lp_ctx);
+       netbiosname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
+       realm = lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx);
        if (!netbiosname || !realm) {
                r->out.ppszUnused = NULL;
                r->out.ppszServer = NULL;
@@ -110,8 +110,8 @@ static enum MAPISTATUS dcesrv_RfrGetFQDNFromLegacyDN(struct dcesrv_call_state *d
                return MAPI_E_LOGON_FAILED;
        }
 
-       netbiosname = lp_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
-       realm = lp_realm(dce_call->conn->dce_ctx->lp_ctx);
+       netbiosname = lpcfg_netbios_name(dce_call->conn->dce_ctx->lp_ctx);
+       realm = lpcfg_realm(dce_call->conn->dce_ctx->lp_ctx);
        if (!netbiosname || !realm) {
                goto failure;
        }
index cb33385a6cd925e693630388cb4c29fa28ef5b1a..ca972a488996ab30878510871c68e23ad9802262 100644 (file)
@@ -320,7 +320,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(torture->lp_ctx,
+       const char *dc_binding = lpcfg_parm_string(torture->lp_ctx,
                                                                                        NULL, "torture", "dc_binding");
 
        join = talloc(NULL, struct test_join);
@@ -473,7 +473,7 @@ again:
        
        u.info21.description.string = talloc_asprintf(join, 
                                         "Samba4 torture account created by host %s: %s", 
-                                        lp_netbios_name(torture->lp_ctx), 
+                                        lpcfg_netbios_name(torture->lp_ctx), 
                                         timestring(join, time(NULL)));
 
        printf("Resetting ACB flags, force pw change time\n");
index 1e50df3886cbd7a5719a7849feb4640caebfd912..bcf7e9e2e4651c96ff4641b475dae8affdb46c2e 100644 (file)
@@ -48,7 +48,7 @@ const char **get_cmdline_recipients(TALLOC_CTX *mem_ctx, const char *type)
                return 0;
        }
 
-       recipients = lp_parm_string(global_mapi_ctx->lp_ctx, NULL, "mapi", type);
+       recipients = lpcfg_parm_string(global_mapi_ctx->lp_ctx, NULL, "mapi", type);
 
        /* no recipients */
        if (recipients == 0) {
@@ -197,7 +197,7 @@ enum MAPISTATUS torture_load_profile(TALLOC_CTX *mem_ctx,
        char                    *profname;
        struct mapi_session     *session = NULL;
 
-       profdb = lp_parm_string(lp_ctx, NULL, "mapi", "profile_store");
+       profdb = lpcfg_parm_string(lp_ctx, NULL, "mapi", "profile_store");
        if (!profdb) {
                profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB_PATH, getenv("HOME"));
                if (!profdb) {
@@ -210,7 +210,7 @@ enum MAPISTATUS torture_load_profile(TALLOC_CTX *mem_ctx,
        mapi_errstr("MAPIInitialize", GetLastError());
        MAPI_RETVAL_IF(retval, retval, NULL);
 
-       profname = talloc_strdup(mem_ctx, lp_parm_string(lp_ctx, NULL, "mapi", "profile"));
+       profname = talloc_strdup(mem_ctx, lpcfg_parm_string(lp_ctx, NULL, "mapi", "profile"));
        if (!profname) {
                retval = GetDefaultProfile(&profname);
                MAPI_RETVAL_IF(retval, retval, NULL);
@@ -243,7 +243,7 @@ struct mapi_session *torture_init_mapi(TALLOC_CTX *mem_ctx,
        char                    *profname;
        const char              *password;
 
-       profdb = lp_parm_string(lp_ctx, NULL, "mapi", "profile_store");
+       profdb = lpcfg_parm_string(lp_ctx, NULL, "mapi", "profile_store");
        if (!profdb) {
                profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB_PATH, getenv("HOME"));
                if (!profdb) {
@@ -257,7 +257,7 @@ struct mapi_session *torture_init_mapi(TALLOC_CTX *mem_ctx,
        if (retval != MAPI_E_SUCCESS) return NULL;
 
 
-       profname = talloc_strdup(mem_ctx, lp_parm_string(lp_ctx, NULL, "mapi", "profile"));
+       profname = talloc_strdup(mem_ctx, lpcfg_parm_string(lp_ctx, NULL, "mapi", "profile"));
        if (!profname) {
                retval = GetDefaultProfile(&profname);
                if (retval != MAPI_E_SUCCESS) {
@@ -266,7 +266,7 @@ struct mapi_session *torture_init_mapi(TALLOC_CTX *mem_ctx,
                }
        }
 
-       password = lp_parm_string(lp_ctx, NULL, "mapi", "password");
+       password = lpcfg_parm_string(lp_ctx, NULL, "mapi", "password");
        retval = MapiLogonEx(&session, profname, password);
        talloc_free(profname);
        mapi_errstr("MapiLogonEx", GetLastError());
@@ -309,7 +309,7 @@ enum MAPISTATUS torture_simplemail_fromme(struct loadparm_context *lp_ctx,
                                           PR_SMTP_ADDRESS,
                                           PR_GIVEN_NAME);
 
-       lp_set_cmdline(lp_ctx, "mapi:to", session->profile->username);
+       lpcfg_set_cmdline(lp_ctx, "mapi:to", session->profile->username);
        usernames = get_cmdline_recipients(mem_ctx, "to");
 
        retval = ResolveNames(session, usernames, SPropTagArray, &SRowSet, &flaglist, 0);
index 87ca66f5d6c5988c3cae851c07add58566c903e2..b1ab8f36e5724ef3ddf8653abb7476822440fad6 100644 (file)
@@ -36,8 +36,8 @@ bool torture_mapi_createuser(struct torture_context *torture)
        TALLOC_CTX              *mem_ctx;
        struct mapi_profile     *profile;
        struct test_join        *user_ctx = (struct test_join *) NULL;
-       const char              *username = lp_parm_string(torture->lp_ctx, NULL, "exchange", "username");
-       const char              *user_password = lp_parm_string(torture->lp_ctx, NULL, "exchange", "password");
+       const char              *username = lpcfg_parm_string(torture->lp_ctx, NULL, "exchange", "username");
+       const char              *user_password = lpcfg_parm_string(torture->lp_ctx, NULL, "exchange", "password");
        struct mapi_session     *session;
 
        /* sanity checks */
index 549458d4e6368fe10f67bff7d8fa3d851ae1a7ae..3d4fc71684fe2ec896989d845608c6da33df4eda 100644 (file)
@@ -37,7 +37,7 @@ bool torture_rpc_mapi_deletemail(struct torture_context *torture)
        enum MAPISTATUS         retval;
        TALLOC_CTX              *mem_ctx;
        bool                    ret = true;
-       const char              *s_subject = lp_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
+       const char              *s_subject = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
        int                     len_subject;
        struct mapi_session     *session;
        mapi_object_t           obj_store;
index 51aab662aa4797eddde2cee68d71da28cf0e261f..72fbf395964a511c1d49aadaafb870e4bfcf544a 100644 (file)
@@ -42,10 +42,10 @@ bool torture_rpc_mapi_permissions(struct torture_context *torture)
        struct SRowSet          SRowSet;
        struct SPropTagArray    *proptags;
        uint32_t                i;
-       const char              *operation = lp_parm_string(torture->lp_ctx, NULL, "mapi", "operation");
-       const char              *role = lp_parm_string(torture->lp_ctx, NULL, "mapi", "role");
+       const char              *operation = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "operation");
+       const char              *role = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "role");
        uint32_t                permission;
-       const char              *username = lp_parm_string(torture->lp_ctx, NULL, "mapi", "username");
+       const char              *username = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "username");
 
        /* init torture */
        mem_ctx = talloc_named(NULL, 0, "torture_rpc_mapi_permissions");
index f2840dde57070ca4a1a8cfaecca87377acdeafa3..598c59e79baae4671dd439d8f57568f0b400d780 100644 (file)
@@ -41,13 +41,13 @@ bool torture_rpc_mapi_sendappointment(struct torture_context *torture)
        struct dcerpc_pipe      *p;
        TALLOC_CTX              *mem_ctx;
        bool                    ret = true;
-       const char              *appointment = lp_parm_string(torture->lp_ctx, NULL, "mapi", "appointment");
-       const char              *body = lp_parm_string(torture->lp_ctx, NULL, "mapi", "body");
-       const char              *location = lp_parm_string(torture->lp_ctx, NULL, "mapi", "location");
-       const char              *start = lp_parm_string(torture->lp_ctx, NULL, "mapi", "start");
-       const char              *end = lp_parm_string(torture->lp_ctx, NULL, "mapi", "end");
-       uint32_t                busy_status = lp_parm_int(torture->lp_ctx, NULL, "mapi", "busystatus", 0);
-       uint32_t                label = lp_parm_int(torture->lp_ctx, NULL, "mapi", "label", 0);
+       const char              *appointment = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "appointment");
+       const char              *body = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "body");
+       const char              *location = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "location");
+       const char              *start = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "start");
+       const char              *end = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "end");
+       uint32_t                busy_status = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "busystatus", 0);
+       uint32_t                label = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "label", 0);
        struct mapi_session     *session;
        uint64_t                id_calendar;
        mapi_object_t           obj_store;
index e062cdc2f2017f9c59349fdc33f1abc3c4790807..3866f3bb05daaf75a4d7a0dd38cfdad01de3e3d5 100644 (file)
@@ -39,9 +39,9 @@ bool torture_rpc_mapi_sendattach(struct torture_context *torture)
        enum MAPISTATUS         retval;
        TALLOC_CTX              *mem_ctx;
        bool                    ret = true;
-       const char              *subject = lp_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
-       const char              *body = lp_parm_string(torture->lp_ctx, NULL, "mapi", "body");
-       const char              *filename = lp_parm_string(torture->lp_ctx, NULL, "mapi", "attachment");
+       const char              *subject = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
+       const char              *body = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "body");
+       const char              *filename = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "attachment");
        const char              **usernames;
        const char              **usernames_to;
        const char              **usernames_cc;
index 76078ab910b6a72eb4543886ecb9be5147d7ac99..57566b1b8093398dbcac234fa5e34464990feb06 100644 (file)
@@ -35,8 +35,8 @@ bool torture_rpc_mapi_sendcontacts(struct torture_context *torture)
        struct dcerpc_pipe      *p;
        TALLOC_CTX              *mem_ctx;
        bool                    ret = true;
-       const char              *cardname = lp_parm_string(torture->lp_ctx, NULL, "mapi", "cardname");
-       const char              *fullname = lp_parm_string(torture->lp_ctx, NULL, "mapi", "fullname");
+       const char              *cardname = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "cardname");
+       const char              *fullname = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "fullname");
        struct mapi_session     *session;
        uint64_t                id_contacts;
        mapi_object_t           obj_store;
index 00a4ce5f4af53f1ebb1b66bd5731bb103d7c8a63..876d5143b3677af987df4cb3f73fb09eea76a61f 100644 (file)
@@ -36,8 +36,8 @@ bool torture_rpc_mapi_sendmail(struct torture_context *torture)
        enum MAPISTATUS         retval;
        TALLOC_CTX              *mem_ctx;
        bool                    ret = true;
-       const char              *subject = lp_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
-       const char              *body = lp_parm_string(torture->lp_ctx, NULL, "mapi", "body");
+       const char              *subject = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
+       const char              *body = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "body");
        const char              **usernames;
        const char              **usernames_to;
        const char              **usernames_cc;
index 1b1fd145529b2dec6f1cc981e32a5c03ac244cbe..04145c6a23deffb4e01bfa82c6aa6a6d5da498e3 100644 (file)
@@ -35,9 +35,9 @@ bool torture_rpc_mapi_sendmail_html(struct torture_context *torture)
        enum MAPISTATUS         retval;
        TALLOC_CTX              *mem_ctx;
        bool                    ret = true;
-       const char              *subject = lp_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
-       const char              *body = lp_parm_string(torture->lp_ctx, NULL, "mapi", "body");
-       const char              *filename = lp_parm_string(torture->lp_ctx, NULL, "mapi", "html");
+       const char              *subject = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "subject");
+       const char              *body = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "body");
+       const char              *filename = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "html");
        const char              **usernames;
        const char              **usernames_to;
        const char              **usernames_cc;
index 2c9d3a5fd93fd295e13ffbf26758b91c18f479a4..21ee8d251e8ea20f19b69c8ef889a40351f0e0f6 100644 (file)
@@ -37,9 +37,9 @@ bool torture_rpc_mapi_sendtasks(struct torture_context *torture)
        struct dcerpc_pipe      *p;
        TALLOC_CTX              *mem_ctx;
        bool                    ret = true;
-       const char              *task = lp_parm_string(torture->lp_ctx, NULL, "mapi", "task");
-       uint32_t                priority = lp_parm_int(torture->lp_ctx, NULL, "mapi", "priority", 0);
-       uint32_t                status = lp_parm_int(torture->lp_ctx, NULL, "mapi", "status", 0);
+       const char              *task = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "task");
+       uint32_t                priority = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "priority", 0);
+       uint32_t                status = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "status", 0);
        struct mapi_session     *session;
        uint64_t                id_task;
        mapi_object_t           obj_store;
index 84473faca606312fc424a9d12714db475b6c229c..5edb1a743ed9fb6e8a379a515509fd4e281f912e 100644 (file)
@@ -89,11 +89,11 @@ bool torture_rpc_nspi_profile(struct torture_context *torture)
        struct Restriction_r    Filter;
        struct SRowSet          *rowset;
        struct SPropValue       *lpProp;
-       const char              *profname = lp_parm_string(torture->lp_ctx, NULL, "mapi", "profile");
-       const char              *profdb = lp_parm_string(torture->lp_ctx, NULL, "mapi", "profile_store");
-       uint32_t                codepage = lp_parm_int(torture->lp_ctx, NULL, "mapi", "codepage", 0);
-       uint32_t                language = lp_parm_int(torture->lp_ctx, NULL, "mapi", "language", 0);
-       uint32_t                method = lp_parm_int(torture->lp_ctx, NULL, "mapi", "method", 0);
+       const char              *profname = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "profile");
+       const char              *profdb = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "profile_store");
+       uint32_t                codepage = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "codepage", 0);
+       uint32_t                language = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "language", 0);
+       uint32_t                method = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "method", 0);
        const char              *username = NULL;
        uint32_t                instance_key = 0;
 
@@ -128,7 +128,7 @@ bool torture_rpc_nspi_profile(struct torture_context *torture)
                {
                        const char *workstation = cli_credentials_get_workstation(cmdline_credentials);
                        const char *domain = cli_credentials_get_domain(cmdline_credentials);
-                       const char *binding = lp_parm_string(torture->lp_ctx, 
+                       const char *binding = lpcfg_parm_string(torture->lp_ctx, 
                                                                                                 NULL, "torture", "binding");
                        struct dcerpc_binding *dcerpc_binding;
                        char *p_codepage = talloc_asprintf(mem_ctx, "0x%x", codepage);
index b3ab6e4514a9f9d66a9448ae8e847604d088e497..8dee006571badf4bd656d392e992a94245c764c3 100644 (file)
@@ -41,9 +41,9 @@ bool torture_rpc_nspi_resolvenames(struct torture_context *torture)
        struct SPropTagArray    *flaglist = NULL;
        const char              *profdb;
        char                    *profname;
-       const char              *username = lp_parm_string(torture->lp_ctx, NULL, "exchange", "resolvename");
-       const char              *password = lp_parm_string(torture->lp_ctx, NULL, "mapi", "password");
-       uint32_t                unicode = lp_parm_int(torture->lp_ctx, NULL, "mapi", "unicode", 0);
+       const char              *username = lpcfg_parm_string(torture->lp_ctx, NULL, "exchange", "resolvename");
+       const char              *password = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "password");
+       uint32_t                unicode = lpcfg_parm_int(torture->lp_ctx, NULL, "mapi", "unicode", 0);
        char *tmp;
        char **usernames;
        int j;
@@ -63,7 +63,7 @@ bool torture_rpc_nspi_resolvenames(struct torture_context *torture)
        }
 
        /* init mapi */
-       profdb = lp_parm_string(torture->lp_ctx, NULL, "mapi", "profile_store");
+       profdb = lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "profile_store");
        if (!profdb) {
                profdb = talloc_asprintf(mem_ctx, DEFAULT_PROFDB_PATH, getenv("HOME"));
                if (!profdb) {
@@ -76,7 +76,7 @@ bool torture_rpc_nspi_resolvenames(struct torture_context *torture)
        if (retval != MAPI_E_SUCCESS) return false;
 
        /* profile name */
-       profname = talloc_strdup(mem_ctx, lp_parm_string(torture->lp_ctx, NULL, "mapi", "profile"));
+       profname = talloc_strdup(mem_ctx, lpcfg_parm_string(torture->lp_ctx, NULL, "mapi", "profile"));
        if (!profname) {
                retval = GetDefaultProfile(&profname);
                if (retval != MAPI_E_SUCCESS) {