s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
authorAndrew Tridgell <tridge@samba.org>
Fri, 16 Jul 2010 04:32:42 +0000 (14:32 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 16 Jul 2010 08:24:27 +0000 (18:24 +1000)
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
257 files changed:
lib/torture/torture.c
lib/util/charset/tests/iconv.c
lib/util/tests/strlist.c
libcli/nbt/tools/nmblookup.c
nsswitch/libwbclient/tests/wbclient.c
source4/auth/credentials/credentials.c
source4/auth/credentials/credentials_files.c
source4/auth/credentials/credentials_krb5.c
source4/auth/credentials/pycredentials.c
source4/auth/gensec/gensec.c
source4/auth/gensec/gensec_gssapi.c
source4/auth/gensec/pygensec.c
source4/auth/gensec/schannel.c
source4/auth/gensec/spnego.c
source4/auth/kerberos/krb5_init_context.c
source4/auth/ntlm/auth.c
source4/auth/ntlm/auth_anonymous.c
source4/auth/ntlm/auth_sam.c
source4/auth/ntlm/auth_server.c
source4/auth/ntlm/auth_unix.c
source4/auth/ntlm/auth_util.c
source4/auth/ntlmssp/ntlmssp_client.c
source4/auth/ntlmssp/ntlmssp_server.c
source4/auth/pyauth.c
source4/auth/samba_server_gensec.c
source4/auth/session.c
source4/auth/system_session.c
source4/cldap_server/cldap_server.c
source4/cldap_server/netlogon.c
source4/client/cifsdd.c
source4/client/client.c
source4/dsdb/common/util.c
source4/dsdb/dns/dns_update.c
source4/dsdb/kcc/kcc_deleted.c
source4/dsdb/kcc/kcc_periodic.c
source4/dsdb/kcc/kcc_service.c
source4/dsdb/repl/drepl_out_helpers.c
source4/dsdb/repl/drepl_ridalloc.c
source4/dsdb/repl/drepl_service.c
source4/dsdb/samdb/ldb_modules/acl.c
source4/dsdb/samdb/ldb_modules/kludge_acl.c
source4/dsdb/samdb/ldb_modules/partition.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/ridalloc.c
source4/dsdb/samdb/ldb_modules/samba3sid.c
source4/dsdb/samdb/ldb_modules/samldb.c
source4/dsdb/samdb/samdb.c
source4/dsdb/samdb/samdb_privilege.c
source4/kdc/db-glue.c
source4/kdc/kdc.c
source4/kdc/kpasswdd.c
source4/kdc/mit_samba.c
source4/kdc/pac-glue.c
source4/ldap_server/ldap_backend.c
source4/ldap_server/ldap_server.c
source4/lib/cmdline/popt_common.c
source4/lib/com/dcom/main.c
source4/lib/ldb-samba/ldb_wrap.c
source4/lib/ldb-samba/pyldb.c
source4/lib/messaging/pymessaging.c
source4/lib/messaging/tests/irpc.c
source4/lib/messaging/tests/messaging.c
source4/lib/policy/gp_filesys.c
source4/lib/policy/gp_ldap.c
source4/lib/policy/gp_manage.c
source4/lib/registry/pyregistry.c
source4/lib/registry/samba.c
source4/lib/socket/testsuite.c
source4/lib/tls/tls.c
source4/libcli/ldap/ldap_bind.c
source4/libcli/ldap/ldap_client.c
source4/libcli/resolve/bcast.c
source4/libcli/resolve/file.c
source4/libcli/resolve/resolve_lp.c
source4/libcli/resolve/wins.c
source4/libcli/smb_composite/smb_composite.h
source4/libcli/wrepl/winsrepl.c
source4/libnet/libnet.c
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_join.c
source4/libnet/libnet_lookup.c
source4/libnet/libnet_samdump.c
source4/libnet/libnet_samsync_ldb.c
source4/libnet/libnet_site.c
source4/libnet/libnet_unbecome_dc.c
source4/libnet/libnet_vampire.c
source4/libnet/py_net.c
source4/librpc/rpc/dcerpc_connect.c
source4/librpc/rpc/dcerpc_schannel.c
source4/librpc/rpc/dcerpc_util.c
source4/librpc/rpc/pyrpc.c
source4/nbt_server/dgram/netlogon.c
source4/nbt_server/dgram/ntlogon.c
source4/nbt_server/dgram/request.c
source4/nbt_server/interfaces.c
source4/nbt_server/nbt_server.c
source4/nbt_server/packet.c
source4/nbt_server/query.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/nbt_server/wins/winswack.c
source4/ntp_signd/ntp_signd.c
source4/ntptr/simple_ldb/ntptr_simple_ldb.c
source4/ntvfs/cifs/vfs_cifs.c
source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
source4/ntvfs/ipc/rap_server.c
source4/ntvfs/ipc/vfs_ipc.c
source4/ntvfs/posix/pvfs_shortname.c
source4/ntvfs/posix/vfs_posix.c
source4/ntvfs/print/vfs_print.c
source4/ntvfs/simple/vfs_simple.c
source4/ntvfs/smb2/vfs_smb2.c
source4/param/generic.c
source4/param/provision.c
source4/param/pyparam.c
source4/param/pyparam.h
source4/param/pyparam_util.c
source4/param/secrets.c
source4/param/share_classic.c
source4/param/share_ldb.c
source4/param/tests/loadparm.c
source4/param/util.c
source4/rpc_server/common/server_info.c
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcesrv_auth.c
source4/rpc_server/drsuapi/addentry.c
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/rpc_server/drsuapi/drsutil.c
source4/rpc_server/drsuapi/getncchanges.c
source4/rpc_server/lsa/dcesrv_lsa.c
source4/rpc_server/lsa/lsa_init.c
source4/rpc_server/lsa/lsa_lookup.c
source4/rpc_server/netlogon/dcerpc_netlogon.c
source4/rpc_server/remote/dcesrv_remote.c
source4/rpc_server/samr/dcesrv_samr.c
source4/rpc_server/samr/samr_password.c
source4/rpc_server/service_rpc.c
source4/rpc_server/spoolss/dcesrv_spoolss.c
source4/rpc_server/srvsvc/dcesrv_srvsvc.c
source4/rpc_server/srvsvc/srvsvc_ntvfs.c
source4/rpc_server/wkssvc/dcesrv_wkssvc.c
source4/scripting/python/pyglue.c
source4/smb_server/smb/negprot.c
source4/smb_server/smb/receive.c
source4/smb_server/smb/service.c
source4/smb_server/smb/sesssetup.c
source4/smb_server/smb/signing.c
source4/smb_server/smb/trans2.c
source4/smb_server/smb2/negprot.c
source4/smb_server/smb2/receive.c
source4/smb_server/smb_samba3.c
source4/smb_server/smb_server.c
source4/smbd/process_model.h
source4/smbd/process_prefork.c
source4/smbd/process_single.c
source4/smbd/process_standard.c
source4/smbd/process_thread.c
source4/smbd/server.c
source4/smbd/service_named_pipe.c
source4/smbd/service_stream.c
source4/smbd/service_task.c
source4/torture/auth/ntlmssp.c
source4/torture/auth/pac.c
source4/torture/basic/base.c
source4/torture/basic/charset.c
source4/torture/basic/misc.c
source4/torture/basic/secleak.c
source4/torture/gentest.c
source4/torture/ldap/cldap.c
source4/torture/ldap/cldapbench.c
source4/torture/libnet/domain.c
source4/torture/libnet/groupinfo.c
source4/torture/libnet/groupman.c
source4/torture/libnet/libnet_BecomeDC.c
source4/torture/libnet/libnet_domain.c
source4/torture/libnet/libnet_group.c
source4/torture/libnet/libnet_lookup.c
source4/torture/libnet/libnet_rpc.c
source4/torture/libnet/libnet_user.c
source4/torture/libnet/userinfo.c
source4/torture/libnet/userman.c
source4/torture/local/dbspeed.c
source4/torture/locktest.c
source4/torture/locktest2.c
source4/torture/masktest.c
source4/torture/nbt/browse.c
source4/torture/nbt/dgram.c
source4/torture/nbt/nbt.c
source4/torture/nbt/query.c
source4/torture/nbt/register.c
source4/torture/nbt/wins.c
source4/torture/nbt/winsbench.c
source4/torture/nbt/winsreplication.c
source4/torture/ntp/ntp_signd.c
source4/torture/rap/sam.c
source4/torture/raw/composite.c
source4/torture/raw/context.c
source4/torture/raw/lock.c
source4/torture/raw/lockbench.c
source4/torture/raw/openbench.c
source4/torture/raw/oplock.c
source4/torture/raw/samba3misc.c
source4/torture/raw/tconrate.c
source4/torture/rpc/countcalls.c
source4/torture/rpc/drsuapi.c
source4/torture/rpc/dssync.c
source4/torture/rpc/frsapi.c
source4/torture/rpc/join.c
source4/torture/rpc/mgmt.c
source4/torture/rpc/netlogon.c
source4/torture/rpc/remote_pac.c
source4/torture/rpc/samba3rpc.c
source4/torture/rpc/samlogon.c
source4/torture/rpc/samr.c
source4/torture/rpc/samr_accessmask.c
source4/torture/rpc/samsync.c
source4/torture/rpc/scanner.c
source4/torture/rpc/schannel.c
source4/torture/rpc/session_key.c
source4/torture/rpc/spoolss.c
source4/torture/rpc/spoolss_access.c
source4/torture/rpc/spoolss_notify.c
source4/torture/rpc/testjoin.c
source4/torture/rpc/wkssvc.c
source4/torture/shell.c
source4/torture/smb2/oplock.c
source4/torture/smb2/scan.c
source4/torture/smb2/util.c
source4/torture/smbiconv.c
source4/torture/smbtorture.c
source4/torture/unix/unix_info2.c
source4/torture/unix/whoami.c
source4/torture/util_smb.c
source4/torture/winbind/struct_based.c
source4/utils/net/net_gpo.c
source4/utils/net/net_join.c
source4/utils/ntlm_auth.c
source4/web_server/web_server.c
source4/winbind/idmap.c
source4/winbind/wb_cmd_getpwnam.c
source4/winbind/wb_cmd_getpwuid.c
source4/winbind/wb_dom_info.c
source4/winbind/wb_dom_info_trusted.c
source4/winbind/wb_init_domain.c
source4/winbind/wb_pam_auth.c
source4/winbind/wb_samba3_cmd.c
source4/winbind/wb_server.c
source4/winbind/wb_sid2domain.c
source4/winbind/wb_utils.c
source4/wrepl_server/wrepl_apply_records.c
source4/wrepl_server/wrepl_in_connection.c
source4/wrepl_server/wrepl_scavenging.c
source4/wrepl_server/wrepl_server.c

index 4333f98990dbd6ae20e227c0e9ea836566b81a53..71bd53bbf366e1046e957b91df671a9b4a65c227 100644 (file)
@@ -450,27 +450,27 @@ 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(test->lp_ctx, NULL, "torture", name, default_value);
+       return lpcfg_parm_int(test->lp_ctx, NULL, "torture", name, default_value);
 }
 
 unsigned long torture_setting_ulong(struct torture_context *test,
                                    const char *name,
                                    unsigned long default_value)
 {
-       return lp_parm_ulong(test->lp_ctx, NULL, "torture", name,
+       return lpcfg_parm_ulong(test->lp_ctx, NULL, "torture", name,
                             default_value);
 }
 
 double torture_setting_double(struct torture_context *test, const char *name, 
                                                        double default_value)
 {
-       return lp_parm_double(test->lp_ctx, NULL, "torture", name, default_value);
+       return lpcfg_parm_double(test->lp_ctx, NULL, "torture", name, default_value);
 }
 
 bool torture_setting_bool(struct torture_context *test, const char *name, 
                                                        bool default_value)
 {
-       return lp_parm_bool(test->lp_ctx, NULL, "torture", name, default_value);
+       return lpcfg_parm_bool(test->lp_ctx, NULL, "torture", name, default_value);
 }
 
 const char *torture_setting_string(struct torture_context *test, 
@@ -482,7 +482,7 @@ const char *torture_setting_string(struct torture_context *test,
        SMB_ASSERT(test != NULL);
        SMB_ASSERT(test->lp_ctx != NULL);
        
-       ret = lp_parm_string(test->lp_ctx, NULL, "torture", name);
+       ret = lpcfg_parm_string(test->lp_ctx, NULL, "torture", name);
 
        if (ret == NULL)
                return default_value;
index 178192ec2d404a33f6a447114745cdbc43bc6861..2b6679e7999e964eb8757beecc895fec34471e54 100644 (file)
@@ -35,7 +35,7 @@ static bool iconv_untestable(struct torture_context *tctx)
 {
        iconv_t cd;
 
-       if (!lp_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true))
+       if (!lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "native", true))
                torture_skip(tctx, "system iconv disabled - skipping test");
 
        cd = iconv_open("UTF-16LE", "UCS-4LE");
@@ -158,8 +158,8 @@ static bool test_buffer(struct torture_context *test,
                                                     "failed to open %s to UTF-16LE",
                                                     charset));
                }
-               cd2 = smb_iconv_open_ex(test, charset, "UTF-16LE", lp_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
-               cd3 = smb_iconv_open_ex(test, "UTF-16LE", charset, lp_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
+               cd2 = smb_iconv_open_ex(test, charset, "UTF-16LE", lpcfg_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
+               cd3 = smb_iconv_open_ex(test, "UTF-16LE", charset, lpcfg_parm_bool(test->lp_ctx, NULL, "iconv", "native", true));
                last_charset = charset;
        }
 
@@ -289,7 +289,7 @@ static bool test_codepoint(struct torture_context *tctx, unsigned int codepoint)
        size_t size, size2;
        codepoint_t c;
 
-       size = push_codepoint_convenience(lp_iconv_convenience(tctx->lp_ctx), (char *)buf, codepoint);
+       size = push_codepoint_convenience(lpcfg_iconv_convenience(tctx->lp_ctx), (char *)buf, codepoint);
        torture_assert(tctx, size != -1 || (codepoint >= 0xd800 && codepoint <= 0x10000), 
                       "Invalid Codepoint range");
 
@@ -300,7 +300,7 @@ static bool test_codepoint(struct torture_context *tctx, unsigned int codepoint)
        buf[size+2] = random();
        buf[size+3] = random();
 
-       c = next_codepoint_convenience(lp_iconv_convenience(tctx->lp_ctx), (char *)buf, &size2);
+       c = next_codepoint_convenience(lpcfg_iconv_convenience(tctx->lp_ctx), (char *)buf, &size2);
 
        torture_assert(tctx, c == codepoint, 
                       talloc_asprintf(tctx, 
index bf5624383c0d183cea3dcdd6aaaf1122d793a688..ce7d1e4e9bb62d916e8bbde5818e46523ad79db5 100644 (file)
@@ -376,8 +376,8 @@ static bool test_list_unique_2(struct torture_context *tctx)
        const char **list = (const char **)str_list_make_empty(tctx);
        const char **list_dup = (const char **)str_list_make_empty(tctx);
 
-       count = lp_parm_int(tctx->lp_ctx, NULL, "list_unique", "count", 9);
-       num_dups = lp_parm_int(tctx->lp_ctx, NULL, "list_unique", "dups", 7);
+       count = lpcfg_parm_int(tctx->lp_ctx, NULL, "list_unique", "count", 9);
+       num_dups = lpcfg_parm_int(tctx->lp_ctx, NULL, "list_unique", "dups", 7);
        torture_comment(tctx, "test_list_unique_2() with %d elements and %d dups\n", count, num_dups);
 
        for (i = 0; i < count; i++) {
index b756c1e30c5dadff71d6c24ac41faa8aba21359d..7950ab80015ce5fcf7bd7a11d5bc6375aec6ee12 100644 (file)
@@ -357,14 +357,14 @@ int main(int argc, const char *argv[])
                exit(1);
        }
 
-       load_interfaces(NULL, lp_interfaces(cmdline_lp_ctx), &ifaces);
+       load_interfaces(NULL, lpcfg_interfaces(cmdline_lp_ctx), &ifaces);
 
        ev = s4_event_context_init(talloc_autofree_context());
 
        while (poptPeekArg(pc)) {
                const char *name = poptGetArg(pc);
 
-               ret &= process_one(cmdline_lp_ctx, ev, ifaces, name, lp_nbt_port(cmdline_lp_ctx));
+               ret &= process_one(cmdline_lp_ctx, ev, ifaces, name, lpcfg_nbt_port(cmdline_lp_ctx));
        }
 
        talloc_free(ev);
index e2b3794d06f97381c49b1abccd2ddd894eb8b84d..948081bb1afb4e55a6955348f5adc6f2854b5308 100644 (file)
@@ -611,7 +611,7 @@ static bool test_wbc_change_password(struct torture_context *tctx)
        E_md4hash(oldpass, old_nt_hash);
        E_md4hash(newpass, new_nt_hash);
 
-       if (lp_client_lanman_auth(tctx->lp_ctx) &&
+       if (lpcfg_client_lanman_auth(tctx->lp_ctx) &&
            E_deshash(newpass, new_lanman_hash) &&
            E_deshash(oldpass, old_lanman_hash)) {
 
index 8aff75373e71f74186edd604c6334dd207915be5..acdcfdee69a2d6ef97e676368ef2b0a709a5d324 100644 (file)
@@ -669,9 +669,9 @@ _PUBLIC_ void cli_credentials_set_conf(struct cli_credentials *cred,
                              struct loadparm_context *lp_ctx)
 {
        cli_credentials_set_username(cred, "", CRED_UNINITIALISED);
-       cli_credentials_set_domain(cred, lp_workgroup(lp_ctx), CRED_UNINITIALISED);
-       cli_credentials_set_workstation(cred, lp_netbios_name(lp_ctx), CRED_UNINITIALISED);
-       cli_credentials_set_realm(cred, lp_realm(lp_ctx), CRED_UNINITIALISED);
+       cli_credentials_set_domain(cred, lpcfg_workgroup(lp_ctx), CRED_UNINITIALISED);
+       cli_credentials_set_workstation(cred, lpcfg_netbios_name(lp_ctx), CRED_UNINITIALISED);
+       cli_credentials_set_realm(cred, lpcfg_realm(lp_ctx), CRED_UNINITIALISED);
 }
 
 /**
index 2e88cf4c4e4a7282760658a9a9644912830c09a6..e0fd052cbc07d15ad3ae18c6651d3900b086ce22 100644 (file)
@@ -361,7 +361,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr
        cred->machine_account_pending = false;
        filter = talloc_asprintf(cred, SECRETS_PRIMARY_DOMAIN_FILTER, 
                                       cli_credentials_get_domain(cred));
-       status = cli_credentials_set_secrets(cred, event_context_find(cred), lp_ctx, NULL, 
+       status = cli_credentials_set_secrets(cred, event_context_find(cred), lp_ctx, NULL,
                                           SECRETS_PRIMARY_DOMAIN_DN,
                                             filter, &error_string);
        if (!NT_STATUS_IS_OK(status)) {
@@ -391,7 +391,7 @@ NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred,
        filter = talloc_asprintf(cred, SECRETS_KRBTGT_SEARCH,
                                       cli_credentials_get_realm(cred),
                                       cli_credentials_get_domain(cred));
-       status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL, 
+       status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL,
                                             SECRETS_PRINCIPALS_DN,
                                             filter, &error_string);
        if (!NT_STATUS_IS_OK(status)) {
@@ -423,7 +423,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *c
                                 cli_credentials_get_realm(cred),
                                 cli_credentials_get_domain(cred),
                                 serviceprincipal);
-       status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL, 
+       status = cli_credentials_set_secrets(cred, event_ctx, lp_ctx, NULL,
                                             SECRETS_PRINCIPALS_DN, filter,
                                             &error_string);
        if (!NT_STATUS_IS_OK(status)) {
index f4ee2641d9826b5937423000c655455c012b4701..622f674bf841c25c6ed0606106b2bb7284f43fc4 100644 (file)
@@ -41,7 +41,7 @@ _PUBLIC_ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
                return 0;
        }
 
-       ret = smb_krb5_init_context(cred, event_ctx, lp_ctx, 
+       ret = smb_krb5_init_context(cred, event_ctx, lp_ctx,
                                    &cred->smb_krb5_context);
        if (ret) {
                cred->smb_krb5_context = NULL;
@@ -144,7 +144,7 @@ _PUBLIC_ int cli_credentials_set_ccache(struct cli_credentials *cred,
                return ENOMEM;
        }
 
-       ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx, 
+       ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
                                               &ccc->smb_krb5_context);
        if (ret) {
                (*error_string) = error_message(ret);
@@ -216,7 +216,7 @@ static int cli_credentials_new_ccache(struct cli_credentials *cred,
                return ENOMEM;
        }
 
-       ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx, 
+       ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
                                               &ccc->smb_krb5_context);
        if (ret) {
                talloc_free(ccc);
@@ -417,7 +417,7 @@ _PUBLIC_ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
                return 0;
        }
 
-       ret = cli_credentials_get_ccache(cred, event_ctx, lp_ctx, 
+       ret = cli_credentials_get_ccache(cred, event_ctx, lp_ctx,
                                         &ccache, error_string);
        if (ret) {
                DEBUG(1, ("Failed to get CCACHE for GSSAPI client: %s\n", error_message(ret)));
@@ -607,7 +607,7 @@ _PUBLIC_ int cli_credentials_get_keytab(struct cli_credentials *cred,
                return EINVAL;
        }
 
-       ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx, 
+       ret = cli_credentials_get_krb5_context(cred, event_ctx, lp_ctx,
                                               &smb_krb5_context);
        if (ret) {
                return ret;
@@ -683,7 +683,7 @@ _PUBLIC_ int cli_credentials_set_keytab_name(struct cli_credentials *cred,
 
 _PUBLIC_ int cli_credentials_update_keytab(struct cli_credentials *cred, 
                                           struct tevent_context *event_ctx,
-                                 struct loadparm_context *lp_ctx) 
+                                 struct loadparm_context *lp_ctx)
 {
        krb5_error_code ret;
        struct keytab_container *ktc;
index 361e4c9a1f1c082539a465aa0ccf1a04b763535c..86ce63ef982e47c19723ea22ff499c90a8310375 100644 (file)
@@ -204,8 +204,8 @@ static PyObject *py_creds_guess(py_talloc_Object *self, PyObject *args)
        if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
-       if (lp_ctx == NULL) 
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+       if (lp_ctx == NULL)
                return NULL;
 
        cli_credentials_guess(creds, lp_ctx);
@@ -225,8 +225,8 @@ static PyObject *py_creds_set_machine_account(py_talloc_Object *self, PyObject *
        if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
-       if (lp_ctx == NULL) 
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+       if (lp_ctx == NULL)
                return NULL;
 
        status = cli_credentials_set_machine_account(creds, lp_ctx);
@@ -270,8 +270,8 @@ static PyObject *py_creds_get_named_ccache(py_talloc_Object *self, PyObject *arg
        if (!PyArg_ParseTuple(args, "|Os", &py_lp_ctx, &ccache_name))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
-       if (lp_ctx == NULL) 
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+       if (lp_ctx == NULL)
                return NULL;
 
        event_ctx = tevent_context_init(NULL);
index b166d238de2e19dc8ae9b3d3e8ecb5f41863ae73..3520585c95f49da1acb145210005a15569e9e31e 100644 (file)
@@ -47,7 +47,7 @@ _PUBLIC_ struct gensec_security_ops **gensec_security_all(void)
 
 bool gensec_security_ops_enabled(struct gensec_security_ops *ops, struct gensec_security *security)
 {
-       return lp_parm_bool(security->settings->lp_ctx, NULL, "gensec", ops->name, ops->enabled);
+       return lpcfg_parm_bool(security->settings->lp_ctx, NULL, "gensec", ops->name, ops->enabled);
 }
 
 /* Sometimes we want to force only kerberos, sometimes we want to
@@ -1397,12 +1397,12 @@ static int sort_gensec(struct gensec_security_ops **gs1, struct gensec_security_
 
 int gensec_setting_int(struct gensec_settings *settings, const char *mechanism, const char *name, int default_value)
 {
-       return lp_parm_int(settings->lp_ctx, NULL, mechanism, name, default_value);
+       return lpcfg_parm_int(settings->lp_ctx, NULL, mechanism, name, default_value);
 }
 
 bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism, const char *name, bool default_value)
 {
-       return lp_parm_bool(settings->lp_ctx, NULL, mechanism, name, default_value);
+       return lpcfg_parm_bool(settings->lp_ctx, NULL, mechanism, name, default_value);
 }
 
 /*
index 88fbcce532be4e8be584e5abf84c38d27c241889..f28ab95dbddf7a4741d817ac1434891604191a02 100644 (file)
@@ -247,7 +247,7 @@ static NTSTATUS gensec_gssapi_start(struct gensec_security *gensec_security)
                return NT_STATUS_INTERNAL_ERROR;
        }
 
-       realm = lp_realm(gensec_security->settings->lp_ctx);
+       realm = lpcfg_realm(gensec_security->settings->lp_ctx);
        if (realm != NULL) {
                ret = gsskrb5_set_default_realm(realm);
                if (ret) {
@@ -352,12 +352,12 @@ static NTSTATUS gensec_gssapi_client_start(struct gensec_security *gensec_securi
        gensec_gssapi_state = talloc_get_type(gensec_security->private_data, struct gensec_gssapi_state);
 
        principal = gensec_get_target_principal(gensec_security);
-       if (principal && lp_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
+       if (principal && lpcfg_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
                name_type = GSS_C_NULL_OID;
        } else {
                principal = talloc_asprintf(gensec_gssapi_state, "%s/%s@%s",
                                            gensec_get_target_service(gensec_security), 
-                                           hostname, lp_realm(gensec_security->settings->lp_ctx));
+                                           hostname, lpcfg_realm(gensec_security->settings->lp_ctx));
 
                name_type = GSS_C_NT_USER_NAME;
        }               
@@ -1364,7 +1364,7 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
                
                ret = cli_credentials_set_client_gss_creds(session_info->credentials, 
                                                           gensec_security->event_ctx,
-                                                          gensec_security->settings->lp_ctx, 
+                                                          gensec_security->settings->lp_ctx,
                                                           gensec_gssapi_state->delegated_cred_handle,
                                                           CRED_SPECIFIED, &error_string);
                if (ret) {
index 3ae80ddaf32c09913c1306308c28d6579ecd7504..fc76fad1be1becbb207e9b3c47d5837b40ede7be 100644 (file)
@@ -69,7 +69,7 @@ static struct gensec_settings *settings_from_object(TALLOC_CTX *mem_ctx, PyObjec
        }
        
        s->target_hostname = PyString_AsString(py_hostname);
-       s->lp_ctx = lp_from_py_object(s, py_lp_ctx);
+       s->lp_ctx = lpcfg_from_py_object(s, py_lp_ctx);
        return s;
 }
 
index d4b29484f1c772da992876e2e72550d2cb15c505..6f508b4a9d08ed584c6a0faf70236d33d3e79030 100644 (file)
@@ -126,15 +126,15 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_
                workstation = bind_schannel.oem_netbios_computer.a;
                domain = bind_schannel.oem_netbios_domain.a;
 
-               if (strcasecmp_m(domain, lp_workgroup(gensec_security->settings->lp_ctx)) != 0) {
+               if (strcasecmp_m(domain, lpcfg_workgroup(gensec_security->settings->lp_ctx)) != 0) {
                        DEBUG(3, ("Request for schannel to incorrect domain: %s != our domain %s\n",
-                                 domain, lp_workgroup(gensec_security->settings->lp_ctx)));
+                                 domain, lpcfg_workgroup(gensec_security->settings->lp_ctx)));
 
                        return NT_STATUS_LOGON_FAILURE;
                }
 
                status = schannel_get_creds_state(out_mem_ctx,
-                                                 lp_private_dir(gensec_security->settings->lp_ctx),
+                                                 lpcfg_private_dir(gensec_security->settings->lp_ctx),
                                                  workstation, &creds);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(3, ("Could not find session key for attempted schannel connection from %s: %s\n",
index bbcba8dc5f14211f347ece1bc6178507e072824d..612216a0edbfce44e4c882c652665687b0dd919c 100644 (file)
@@ -827,7 +827,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
 
                if (spnego.negTokenInit.targetPrincipal) {
                        DEBUG(5, ("Server claims it's principal name is %s\n", spnego.negTokenInit.targetPrincipal));
-                       if (lp_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
+                       if (lpcfg_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
                                gensec_set_target_principal(gensec_security, spnego.negTokenInit.targetPrincipal);
                        }
                }
index 3bd938f0f064d120c38ecc532fcaeb78c294fd31..ff356aa86f1b111880afc55e1fd6e95c6b511e1b 100644 (file)
@@ -398,7 +398,7 @@ smb_krb5_init_context_basic(TALLOC_CTX *tmp_ctx,
                return ret;
        }
 
-       realm = lp_realm(lp_ctx);
+       realm = lpcfg_realm(lp_ctx);
        if (realm != NULL) {
                ret = krb5_set_default_realm(krb5_ctx, realm);
                if (ret) {
@@ -480,7 +480,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(lp_ctx, NULL, "krb5", "set_dns_canonicalize", false));
+                                          lpcfg_parm_bool(lp_ctx, NULL, "krb5", "set_dns_canonicalize", false));
 
        return 0;
 }
index a9c3262f07854e48a750574536f7786502f6a71b..17fbfca2aa26a02b82ebbdcee87772ada1b4f454 100644 (file)
@@ -255,7 +255,7 @@ _PUBLIC_ struct tevent_req *auth_check_password_send(TALLOC_CTX *mem_ctx,
        state->method           = NULL;
 
        if (!user_info->mapped_state) {
-               nt_status = map_user_info(req, lp_workgroup(auth_ctx->lp_ctx),
+               nt_status = map_user_info(req, lpcfg_workgroup(auth_ctx->lp_ctx),
                                          user_info, &user_info_tmp);
                if (tevent_req_nterror(req, nt_status)) {
                        return tevent_req_post(req, ev);
@@ -478,15 +478,15 @@ _PUBLIC_ NTSTATUS auth_context_create_methods(TALLOC_CTX *mem_ctx, const char **
 static const char **auth_methods_from_lp(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
 {
        const char **auth_methods = NULL;
-       switch (lp_server_role(lp_ctx)) {
+       switch (lpcfg_server_role(lp_ctx)) {
        case ROLE_STANDALONE:
-               auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "standalone", NULL);
+               auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "standalone", NULL);
                break;
        case ROLE_DOMAIN_MEMBER:
-               auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "member server", NULL);
+               auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "member server", NULL);
                break;
        case ROLE_DOMAIN_CONTROLLER:
-               auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "domain controller", NULL);
+               auth_methods = lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "domain controller", NULL);
                break;
        }
        return auth_methods;
index c8890718784c4b5d3e645268edb79f8f38e7d79a..d5f1df28916be8ceb0507108b9b0ee5b9bd137f0 100644 (file)
@@ -54,7 +54,7 @@ static NTSTATUS anonymous_check_password(struct auth_method_context *ctx,
                                         const struct auth_usersupplied_info *user_info, 
                                         struct auth_serversupplied_info **_server_info)
 {
-       return auth_anonymous_server_info(mem_ctx, lp_netbios_name(ctx->auth_ctx->lp_ctx), _server_info);
+       return auth_anonymous_server_info(mem_ctx, lpcfg_netbios_name(ctx->auth_ctx->lp_ctx), _server_info);
 }
 
 static const struct auth_operations anonymous_auth_ops = {
index 6d1ed0ea103428588206ca516fd27e193a880951..fdcc5bd90ea9705b59b576a62511d6267f536bd7 100644 (file)
@@ -99,7 +99,7 @@ static NTSTATUS authsam_password_ok(struct auth_context *auth_context,
                *lm_sess_key = data_blob(NULL, 0);
                *user_sess_key = data_blob(NULL, 0);
                status = hash_password_check(mem_ctx, 
-                                            lp_lanman_auth(auth_context->lp_ctx),
+                                            lpcfg_lanman_auth(auth_context->lp_ctx),
                                             user_info->password.hash.lanman,
                                             user_info->password.hash.nt,
                                             user_info->mapped.account_name,
@@ -109,8 +109,8 @@ static NTSTATUS authsam_password_ok(struct auth_context *auth_context,
                
        case AUTH_PASSWORD_RESPONSE:
                status = ntlm_password_check(mem_ctx, 
-                                            lp_lanman_auth(auth_context->lp_ctx),
-                                                lp_ntlm_auth(auth_context->lp_ctx),
+                                            lpcfg_lanman_auth(auth_context->lp_ctx),
+                                                lpcfg_ntlm_auth(auth_context->lp_ctx),
                                             user_info->logon_parameters, 
                                             &auth_context->challenge.data, 
                                             &user_info->password.response.lanman, 
@@ -229,8 +229,8 @@ static NTSTATUS authsam_check_password_internals(struct auth_method_context *ctx
                return nt_status;
        }
 
-       nt_status = authsam_make_server_info(tmp_ctx, ctx->auth_ctx->sam_ctx, lp_netbios_name(ctx->auth_ctx->lp_ctx),
-                                            lp_sam_name(ctx->auth_ctx->lp_ctx),
+       nt_status = authsam_make_server_info(tmp_ctx, ctx->auth_ctx->sam_ctx, lpcfg_netbios_name(ctx->auth_ctx->lp_ctx),
+                                            lpcfg_sam_name(ctx->auth_ctx->lp_ctx),
                                             domain_dn,
                                             msg,
                                             user_sess_key, lm_sess_key,
@@ -270,13 +270,13 @@ static NTSTATUS authsam_want_check(struct auth_method_context *ctx,
                return NT_STATUS_NOT_IMPLEMENTED;
        }
 
-       is_local_name = lp_is_myname(ctx->auth_ctx->lp_ctx, 
+       is_local_name = lpcfg_is_myname(ctx->auth_ctx->lp_ctx,
                                  user_info->mapped.domain_name);
-       is_my_domain  = lp_is_mydomain(ctx->auth_ctx->lp_ctx, 
+       is_my_domain  = lpcfg_is_mydomain(ctx->auth_ctx->lp_ctx,
                                       user_info->mapped.domain_name); 
 
        /* check whether or not we service this domain/workgroup name */
-       switch (lp_server_role(ctx->auth_ctx->lp_ctx)) {
+       switch (lpcfg_server_role(ctx->auth_ctx->lp_ctx)) {
                case ROLE_STANDALONE:
                        return NT_STATUS_OK;
 
@@ -297,7 +297,7 @@ static NTSTATUS authsam_want_check(struct auth_method_context *ctx,
                        return NT_STATUS_OK;
        }
 
-       DEBUG(6,("authsam_check_password: lp_server_role() has an undefined value\n"));
+       DEBUG(6,("authsam_check_password: lpcfg_server_role() has an undefined value\n"));
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
@@ -366,8 +366,8 @@ NTSTATUS authsam_get_server_info_principal(TALLOC_CTX *mem_ctx,
        }
 
        nt_status = authsam_make_server_info(tmp_ctx, auth_context->sam_ctx,
-                                            lp_netbios_name(auth_context->lp_ctx),
-                                            lp_workgroup(auth_context->lp_ctx),
+                                            lpcfg_netbios_name(auth_context->lp_ctx),
+                                            lpcfg_workgroup(auth_context->lp_ctx),
                                             domain_dn, 
                                             msg,
                                             user_sess_key, lm_sess_key,
index 6bb07987b5118618cbcbfe45d81af5699a1d8470..898e2cce675ff301642d4860abc184fa3f5447c0 100644 (file)
@@ -49,13 +49,13 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
 
        /* Make a connection to the target server, found by 'password server' in smb.conf */
        
-       lp_smbcli_options(ctx->auth_ctx->lp_ctx, &smb_options);
+       lpcfg_smbcli_options(ctx->auth_ctx->lp_ctx, &smb_options);
 
        /* Make a negprot, WITHOUT SPNEGO, so we get a challenge nice an easy */
        io.in.options.use_spnego = false;
 
        /* Hope we don't get * (the default), as this won't work... */
-       host_list = lp_passwordserver(ctx->auth_ctx->lp_ctx); 
+       host_list = lpcfg_passwordserver(ctx->auth_ctx->lp_ctx);
        if (!host_list) {
                return NT_STATUS_INTERNAL_ERROR;
        }
@@ -63,16 +63,16 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
        if (strequal(io.in.dest_host, "*")) {
                return NT_STATUS_INTERNAL_ERROR;
        }
-       io.in.dest_ports = lp_smb_ports(ctx->auth_ctx->lp_ctx); 
-       io.in.socket_options = lp_socket_options(ctx->auth_ctx->lp_ctx);
-       io.in.gensec_settings = lp_gensec_settings(mem_ctx, ctx->auth_ctx->lp_ctx);
+       io.in.dest_ports = lpcfg_smb_ports(ctx->auth_ctx->lp_ctx);
+       io.in.socket_options = lpcfg_socket_options(ctx->auth_ctx->lp_ctx);
+       io.in.gensec_settings = lpcfg_gensec_settings(mem_ctx, ctx->auth_ctx->lp_ctx);
 
        io.in.called_name = strupper_talloc(mem_ctx, io.in.dest_host);
 
        /* We don't want to get as far as the session setup */
        io.in.credentials = cli_credentials_init_anon(mem_ctx);
        cli_credentials_set_workstation(io.in.credentials,
-                                       lp_netbios_name(ctx->auth_ctx->lp_ctx),
+                                       lpcfg_netbios_name(ctx->auth_ctx->lp_ctx),
                                        CRED_SPECIFIED);
 
        io.in.service = NULL;
@@ -81,9 +81,9 @@ static NTSTATUS server_get_challenge(struct auth_method_context *ctx, TALLOC_CTX
 
        io.in.options = smb_options;
        
-       lp_smbcli_session_options(ctx->auth_ctx->lp_ctx, &io.in.session_options);
+       lpcfg_smbcli_session_options(ctx->auth_ctx->lp_ctx, &io.in.session_options);
 
-       status = smb_composite_connect(&io, mem_ctx, lp_resolve_context(ctx->auth_ctx->lp_ctx),
+       status = smb_composite_connect(&io, mem_ctx, lpcfg_resolve_context(ctx->auth_ctx->lp_ctx),
                                       ctx->auth_ctx->event_ctx);
        NT_STATUS_NOT_OK_RETURN(status);
 
@@ -147,7 +147,7 @@ static NTSTATUS server_check_password(struct auth_method_context *ctx,
 
        session_setup.in.credentials = creds;
        session_setup.in.workgroup = ""; /* Only used with SPNEGO, which we are not doing */
-       session_setup.in.gensec_settings = lp_gensec_settings(session, ctx->auth_ctx->lp_ctx);
+       session_setup.in.gensec_settings = lpcfg_gensec_settings(session, ctx->auth_ctx->lp_ctx);
 
        /* Check password with remove server - this should be async some day */
        nt_status = smb_composite_sesssetup(session, &session_setup);
index aa68bb161e01e9b8f72bb7a8f768238dc9aff341..1c026f6990fbd770b5f943bba0a7b9a48b909513 100644 (file)
@@ -430,7 +430,7 @@ static NTSTATUS smb_pam_setcred(pam_handle_t *pamh, const char * user)
        return pam_to_nt_status(pam_error);
 }
 
-static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx, 
+static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp_ctx,
                                    const struct auth_usersupplied_info *user_info, struct passwd **pws)
 {
        struct smb_pam_user_info *info;
@@ -465,7 +465,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp
                return nt_status;
        }
 
-       nt_status = smb_pam_auth(pamh, lp_null_passwords(lp_ctx), user_info->mapped.account_name);
+       nt_status = smb_pam_auth(pamh, lpcfg_null_passwords(lp_ctx), user_info->mapped.account_name);
        if (!NT_STATUS_IS_OK(nt_status)) {
                smb_pam_end(pamh);
                return nt_status;
@@ -605,7 +605,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp
        char *crypted;
        struct passwd *pws;
        NTSTATUS nt_status;
-       int level = lp_passwordlevel(lp_ctx);
+       int level = lpcfg_passwordlevel(lp_ctx);
 
        *ret_passwd = NULL;
 
@@ -708,7 +708,7 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, struct loadparm_context *lp
 #endif
 
        if (crypted[0] == '\0') {
-               if (!lp_null_passwords(lp_ctx)) {
+               if (!lpcfg_null_passwords(lp_ctx)) {
                        DEBUG(2, ("Disallowing %s with null password\n", username));
                        return NT_STATUS_LOGON_FAILURE;
                }
@@ -814,7 +814,7 @@ static NTSTATUS authunix_check_password(struct auth_method_context *ctx,
                return nt_status;
        }
 
-       nt_status = authunix_make_server_info(mem_ctx, lp_netbios_name(ctx->auth_ctx->lp_ctx),
+       nt_status = authunix_make_server_info(mem_ctx, lpcfg_netbios_name(ctx->auth_ctx->lp_ctx),
                                              user_info, pwd, server_info);
        if (!NT_STATUS_IS_OK(nt_status)) {
                talloc_free(check_ctx);
index 92df0bfe802b84baf6ac7a941d21f5c8b5d68f01..7da68a248b707297fba0115b6c86e39bcb08d880 100644 (file)
@@ -140,8 +140,8 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
                        }
                        
                        chall_blob = data_blob_talloc(mem_ctx, chal, 8);
-                       if (lp_client_ntlmv2_auth(auth_context->lp_ctx)) {
-                               DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx,  lp_netbios_name(auth_context->lp_ctx), lp_workgroup(auth_context->lp_ctx));
+                       if (lpcfg_client_ntlmv2_auth(auth_context->lp_ctx)) {
+                               DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx,  lpcfg_netbios_name(auth_context->lp_ctx), lpcfg_workgroup(auth_context->lp_ctx));
                                DATA_BLOB lmv2_response, ntlmv2_response, lmv2_session_key, ntlmv2_session_key;
                                
                                if (!SMBNTLMv2encrypt_hash(user_info_temp,
@@ -165,7 +165,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
                                SMBOWFencrypt(user_info_in->password.hash.nt->hash, chal, blob.data);
 
                                user_info_temp->password.response.nt = blob;
-                               if (lp_client_lanman_auth(auth_context->lp_ctx) && user_info_in->password.hash.lanman) {
+                               if (lpcfg_client_lanman_auth(auth_context->lp_ctx) && user_info_in->password.hash.lanman) {
                                        DATA_BLOB lm_blob = data_blob_talloc(mem_ctx, NULL, 24);
                                        SMBOWFencrypt(user_info_in->password.hash.lanman->hash, chal, blob.data);
                                        user_info_temp->password.response.lanman = lm_blob;
index 005b42f4e8d4cf3d33006d8279a5af9594d9014c..1bbd4cc568d1ce5eabff67de36af68715c554754 100644 (file)
@@ -206,7 +206,7 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
        if (ntlmssp_state->use_nt_response) {
                flags |= CLI_CRED_NTLM_AUTH;
        }
-       if (lp_client_lanman_auth(gensec_security->settings->lp_ctx)) {
+       if (lpcfg_client_lanman_auth(gensec_security->settings->lp_ctx)) {
                flags |= CLI_CRED_LANMAN_AUTH;
        }
 
@@ -231,7 +231,7 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
        }
        
        if ((ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_LM_KEY)
-           && lp_client_lanman_auth(gensec_security->settings->lp_ctx) && lm_session_key.length == 16) {
+           && lpcfg_client_lanman_auth(gensec_security->settings->lp_ctx) && lm_session_key.length == 16) {
                DATA_BLOB new_session_key = data_blob_talloc(mem_ctx, NULL, 16);
                if (lm_response.length == 24) {
                        SMBsesskeygen_lm_sess_key(lm_session_key.data, lm_response.data, 
@@ -325,17 +325,17 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security *gensec_security)
 
        ntlmssp_state->role = NTLMSSP_CLIENT;
 
-       ntlmssp_state->domain = lp_workgroup(gensec_security->settings->lp_ctx);
+       ntlmssp_state->domain = lpcfg_workgroup(gensec_security->settings->lp_ctx);
 
        ntlmssp_state->unicode = gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "unicode", true);
 
        ntlmssp_state->use_nt_response = gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "send_nt_reponse", true);
 
-       ntlmssp_state->allow_lm_key = (lp_client_lanman_auth(gensec_security->settings->lp_ctx)
+       ntlmssp_state->allow_lm_key = (lpcfg_client_lanman_auth(gensec_security->settings->lp_ctx)
                                              && (gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "allow_lm_key", false)
                                                  || gensec_setting_bool(gensec_security->settings, "ntlmssp_client", "lm_key", false)));
 
-       ntlmssp_state->use_ntlmv2 = lp_client_ntlmv2_auth(gensec_security->settings->lp_ctx);
+       ntlmssp_state->use_ntlmv2 = lpcfg_client_ntlmv2_auth(gensec_security->settings->lp_ctx);
 
        ntlmssp_state->expected_state = NTLMSSP_INITIAL;
 
index 5562180f3a1b008af39e44c4fd4f5f2622786480..a6ade2532b90b9c2ac37de11cf633f7ed9a370a7 100644 (file)
@@ -724,7 +724,7 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
 
        ntlmssp_state->expected_state = NTLMSSP_NEGOTIATE;
 
-       ntlmssp_state->allow_lm_key = (lp_lanman_auth(gensec_security->settings->lp_ctx)
+       ntlmssp_state->allow_lm_key = (lpcfg_lanman_auth(gensec_security->settings->lp_ctx)
                                          && gensec_setting_bool(gensec_security->settings, "ntlmssp_server", "allow_lm_key", false));
 
        ntlmssp_state->neg_flags =
@@ -766,22 +766,22 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security)
        ntlmssp_state->may_set_challenge = auth_ntlmssp_may_set_challenge;
        ntlmssp_state->set_challenge = auth_ntlmssp_set_challenge;
        ntlmssp_state->check_password = auth_ntlmssp_check_password;
-       if (lp_server_role(gensec_security->settings->lp_ctx) == ROLE_STANDALONE) {
+       if (lpcfg_server_role(gensec_security->settings->lp_ctx) == ROLE_STANDALONE) {
                ntlmssp_state->server.is_standalone = true;
        } else {
                ntlmssp_state->server.is_standalone = false;
        }
 
-       ntlmssp_state->server.netbios_name = lp_netbios_name(gensec_security->settings->lp_ctx);
+       ntlmssp_state->server.netbios_name = lpcfg_netbios_name(gensec_security->settings->lp_ctx);
 
-       ntlmssp_state->server.netbios_domain = lp_workgroup(gensec_security->settings->lp_ctx);
+       ntlmssp_state->server.netbios_domain = lpcfg_workgroup(gensec_security->settings->lp_ctx);
 
        {
                char dnsdomname[MAXHOSTNAMELEN], dnsname[MAXHOSTNAMELEN];
 
                /* Find out the DNS domain name */
                dnsdomname[0] = '\0';
-               safe_strcpy(dnsdomname, lp_dnsdomain(gensec_security->settings->lp_ctx), sizeof(dnsdomname) - 1);
+               safe_strcpy(dnsdomname, lpcfg_dnsdomain(gensec_security->settings->lp_ctx), sizeof(dnsdomname) - 1);
 
                /* Find out the DNS host name */
                safe_strcpy(dnsname, ntlmssp_state->server.netbios_name, sizeof(dnsname) - 1);
index 2563b85570b4ec50b9f0753dc3c3deb80a159230..ee4d511fba31960af921e1ad572e869472bcd4a5 100644 (file)
@@ -46,7 +46,7 @@ static PyObject *py_system_session(PyObject *module, PyObject *args)
        if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: Leaks memory */
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: Leaks memory */
        if (lp_ctx == NULL)
                return NULL;
 
@@ -65,7 +65,7 @@ static PyObject *py_system_session_anon(PyObject *module, PyObject *args)
        if (!PyArg_ParseTuple(args, "|O", &py_lp_ctx))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaks memory */
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaks memory */
        if (lp_ctx == NULL)
                return NULL;
 
@@ -84,7 +84,7 @@ static PyObject *py_admin_session(PyObject *module, PyObject *args)
        if (!PyArg_ParseTuple(args, "OO", &py_lp_ctx, &py_sid))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
        if (lp_ctx == NULL)
                return NULL;
 
index 31f52fc6b001baa235c145d60ab6e8a4f782a523..6d27a362e4927737348598b4a0be43490cb04048 100644 (file)
@@ -52,7 +52,7 @@ NTSTATUS samba_server_gensec_start(TALLOC_CTX *mem_ctx,
 
        nt_status = gensec_server_start(mem_ctx, 
                                        event_ctx,
-                                       lp_gensec_settings(mem_ctx, lp_ctx),
+                                       lpcfg_gensec_settings(mem_ctx, lp_ctx),
                                        auth_context,
                                        &gensec_ctx);
        if (!NT_STATUS_IS_OK(nt_status)) {
index e14644d6d871aca274323c8ed69b42ef61848ec8..024d8ec3387110ba4080b298f9f1a5b4ad9038a8 100644 (file)
@@ -29,7 +29,7 @@
 #include "auth/session_proto.h"
 
 _PUBLIC_ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx, 
-                                           struct loadparm_context *lp_ctx) 
+                                           struct loadparm_context *lp_ctx)
 {
        NTSTATUS nt_status;
        struct auth_session_info *session_info = NULL;
index 31c9bd1a78a4af2b38297fe4935074b105e985b2..386f066de494399456e7096960beea4700ac4cf5 100644 (file)
@@ -157,7 +157,7 @@ static int system_session_destructor(struct auth_session_info *info)
  * trusted/prvilaged account), including the local machine account as
  * the off-host credentials
  */ 
-_PUBLIC_ struct auth_session_info *system_session(struct loadparm_context *lp_ctx) 
+_PUBLIC_ struct auth_session_info *system_session(struct loadparm_context *lp_ctx)
 {
        static struct auth_session_info *static_session;
        NTSTATUS nt_status;
@@ -188,7 +188,7 @@ static NTSTATUS _auth_system_session_info(TALLOC_CTX *parent_ctx,
        struct auth_session_info *session_info = NULL;
        TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
        
-       nt_status = auth_system_server_info(mem_ctx, lp_netbios_name(lp_ctx),
+       nt_status = auth_system_server_info(mem_ctx, lpcfg_netbios_name(lp_ctx),
                                            &server_info);
        if (!NT_STATUS_IS_OK(nt_status)) {
                talloc_free(mem_ctx);
@@ -221,7 +221,7 @@ static NTSTATUS _auth_system_session_info(TALLOC_CTX *parent_ctx,
 /*
   Create a system session, but with anonymous credentials (so we do not need to open secrets.ldb)
 */
-_PUBLIC_ struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) 
+_PUBLIC_ struct auth_session_info *system_session_anon(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
 {
        NTSTATUS nt_status;
        struct auth_session_info *session_info = NULL;
@@ -240,7 +240,7 @@ _PUBLIC_ NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx,
 {
        return _auth_system_session_info(parent_ctx, 
                        lp_ctx,
-                       lp_parm_bool(lp_ctx, NULL, "system", "anonymous", false), 
+                       lpcfg_parm_bool(lp_ctx, NULL, "system", "anonymous", false),
                        _session_info);
 }
 
@@ -458,8 +458,8 @@ static NTSTATUS auth_domain_admin_session_info(TALLOC_CTX *parent_ctx,
        struct auth_session_info *session_info = NULL;
        TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
 
-       nt_status = auth_domain_admin_server_info(mem_ctx, lp_netbios_name(lp_ctx),
-                                                 lp_workgroup(lp_ctx), domain_sid,
+       nt_status = auth_domain_admin_server_info(mem_ctx, lpcfg_netbios_name(lp_ctx),
+                                                 lpcfg_workgroup(lp_ctx), domain_sid,
                                                  &server_info);
        if (!NT_STATUS_IS_OK(nt_status)) {
                talloc_free(mem_ctx);
@@ -519,7 +519,7 @@ _PUBLIC_ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
        TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
        
        nt_status = auth_anonymous_server_info(mem_ctx,
-                                              lp_netbios_name(lp_ctx),
+                                              lpcfg_netbios_name(lp_ctx),
                                               &server_info);
        if (!NT_STATUS_IS_OK(nt_status)) {
                talloc_free(mem_ctx);
index 09c9889859eb30d39881af6acf4640b9907f5583..286af058db58bde5725d664ee2c21c7034f4104c 100644 (file)
@@ -111,12 +111,12 @@ static NTSTATUS cldapd_add_socket(struct cldapd_server *cldapd, struct loadparm_
        ret = tsocket_address_inet_from_strings(cldapd,
                                                "ip",
                                                address,
-                                               lp_cldap_port(lp_ctx),
+                                               lpcfg_cldap_port(lp_ctx),
                                                &socket_address);
        if (ret != 0) {
                status = map_nt_error_from_unix(errno);
                DEBUG(0,("invalid address %s:%d - %s:%s\n",
-                        address, lp_cldap_port(lp_ctx),
+                        address, lpcfg_cldap_port(lp_ctx),
                         gai_strerror(ret), nt_errstr(status)));
                return status;
        }
@@ -155,7 +155,7 @@ static NTSTATUS cldapd_startup_interfaces(struct cldapd_server *cldapd, struct l
 
        /* if we are allowing incoming packets from any address, then
           we need to bind to the wildcard address */
-       if (!lp_bind_interfaces_only(lp_ctx)) {
+       if (!lpcfg_bind_interfaces_only(lp_ctx)) {
                status = cldapd_add_socket(cldapd, lp_ctx, "0.0.0.0");
                NT_STATUS_NOT_OK_RETURN(status);
        }
@@ -182,14 +182,14 @@ static void cldapd_task_init(struct task_server *task)
        NTSTATUS status;
        struct interface *ifaces;
        
-       load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+       load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
 
        if (iface_count(ifaces) == 0) {
                task_server_terminate(task, "cldapd: no network interfaces configured", false);
                return;
        }
 
-       switch (lp_server_role(task->lp_ctx)) {
+       switch (lpcfg_server_role(task->lp_ctx)) {
        case ROLE_STANDALONE:
                task_server_terminate(task, "cldap_server: no CLDAP server required in standalone configuration", 
                                      false);
index 7667d9bf3e55eefe40c36968037c2e9f6386a352..aa5533dc9892fa3cbb5cb1d25bc5de853bf39c83 100644 (file)
@@ -58,7 +58,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
        const char *none_attrs[] = {NULL};
        struct ldb_result *dom_res = NULL, *user_res = NULL;
        int ret;
-       const char **services = lp_server_services(lp_ctx);
+       const char **services = lpcfg_server_services(lp_ctx);
        uint32_t server_type;
        const char *pdc_name;
        struct GUID domain_uuid;
@@ -81,10 +81,10 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
        }
 
        /* Lookup using long or short domainname */
-       if (domain && (strcasecmp_m(domain, lp_dnsdomain(lp_ctx)) == 0)) {
+       if (domain && (strcasecmp_m(domain, lpcfg_dnsdomain(lp_ctx)) == 0)) {
                domain_dn = ldb_get_default_basedn(sam_ctx);
        }
-       if (netbios_domain && (strcasecmp_m(netbios_domain, lp_sam_name(lp_ctx)) == 0)) {
+       if (netbios_domain && (strcasecmp_m(netbios_domain, lpcfg_sam_name(lp_ctx)) == 0)) {
                domain_dn = ldb_get_default_basedn(sam_ctx);
        }
        if (domain_dn) {
@@ -180,7 +180,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
                                 "objectClass=domain");
                if (ret != LDB_SUCCESS) {
                        DEBUG(2,("Error finding domain '%s'/'%s' in sam: %s\n",
-                                lp_dnsdomain(lp_ctx),
+                                lpcfg_dnsdomain(lp_ctx),
                                 ldb_dn_get_linearized(domain_dn),
                                 ldb_errstring(sam_ctx)));
                        return NT_STATUS_NO_SUCH_DOMAIN;
@@ -269,24 +269,24 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
 #endif
 
        pdc_name         = talloc_asprintf(mem_ctx, "\\\\%s",
-                                          lp_netbios_name(lp_ctx));
+                                          lpcfg_netbios_name(lp_ctx));
        NT_STATUS_HAVE_NO_MEMORY(pdc_name);
        domain_uuid      = samdb_result_guid(dom_res->msgs[0], "objectGUID");
-       dns_domain       = lp_dnsdomain(lp_ctx);
+       dns_domain       = lpcfg_dnsdomain(lp_ctx);
        forest_domain    = samdb_forest_name(sam_ctx, mem_ctx);
        NT_STATUS_HAVE_NO_MEMORY(forest_domain);
        pdc_dns_name     = talloc_asprintf(mem_ctx, "%s.%s", 
                                           strlower_talloc(mem_ctx, 
-                                                          lp_netbios_name(lp_ctx)), 
+                                                          lpcfg_netbios_name(lp_ctx)),
                                           dns_domain);
        NT_STATUS_HAVE_NO_MEMORY(pdc_dns_name);
-       flatname         = lp_workgroup(lp_ctx);
+       flatname         = lpcfg_workgroup(lp_ctx);
        server_site      = samdb_server_site_name(sam_ctx, mem_ctx);
        NT_STATUS_HAVE_NO_MEMORY(server_site);
        client_site      = samdb_client_site_name(sam_ctx, mem_ctx,
                                                  src_address, NULL);
        NT_STATUS_HAVE_NO_MEMORY(client_site);
-       load_interfaces(mem_ctx, lp_interfaces(lp_ctx), &ifaces);
+       load_interfaces(mem_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
        /*
         * TODO: the caller should pass the address which the client
         * used to trigger this call, as the client is able to reach
@@ -450,7 +450,7 @@ void cldapd_netlogon_request(struct cldap_socket *cldap,
        }
 
        if ((domain == NULL) && (domain_guid == NULL) && (domain_sid == NULL)) {
-               domain = lp_dnsdomain(cldapd->task->lp_ctx);
+               domain = lpcfg_dnsdomain(cldapd->task->lp_ctx);
        }
 
        if (version == -1) {
index b804a15d1cb5f61c3a5d2595b72794a9c22b3c06..1cd0b64ca652d8949a28ffcd878d374de9f649fb 100644 (file)
@@ -425,8 +425,8 @@ static int copy_files(struct tevent_context *ev, struct loadparm_context *lp_ctx
        obs = check_arg_numeric("obs");
        count = check_arg_numeric("count");
 
-       lp_smbcli_options(lp_ctx, &options);
-       lp_smbcli_session_options(lp_ctx, &session_options);
+       lpcfg_smbcli_options(lp_ctx, &options);
+       lpcfg_smbcli_session_options(lp_ctx, &session_options);
 
        /* Allocate IO buffer. We need more than the max IO size because we
         * could accumulate a remainder if ibs and obs don't match.
@@ -444,19 +444,19 @@ static int copy_files(struct tevent_context *ev, struct loadparm_context *lp_ctx
        DEBUG(4, ("IO buffer size is %llu, max xmit is %d\n",
                        (unsigned long long)iomax, options.max_xmit));
 
-       if (!(ifile = open_file(lp_resolve_context(lp_ctx), ev, "if",
-                               lp_smb_ports(lp_ctx), &options,
-                               lp_socket_options(lp_ctx),
+       if (!(ifile = open_file(lpcfg_resolve_context(lp_ctx), ev, "if",
+                               lpcfg_smb_ports(lp_ctx), &options,
+                               lpcfg_socket_options(lp_ctx),
                                &session_options, 
-                               lp_gensec_settings(lp_ctx, lp_ctx)))) {
+                               lpcfg_gensec_settings(lp_ctx, lp_ctx)))) {
                return(FILESYS_EXIT_CODE);
        }
 
-       if (!(ofile = open_file(lp_resolve_context(lp_ctx), ev, "of",
-                               lp_smb_ports(lp_ctx), &options,
-                               lp_socket_options(lp_ctx),
+       if (!(ofile = open_file(lpcfg_resolve_context(lp_ctx), ev, "of",
+                               lpcfg_smb_ports(lp_ctx), &options,
+                               lpcfg_socket_options(lp_ctx),
                                &session_options,
-                               lp_gensec_settings(lp_ctx, lp_ctx)))) {
+                               lpcfg_gensec_settings(lp_ctx, lp_ctx)))) {
                return(FILESYS_EXIT_CODE);
        }
 
index ee499d24bba8ef40b36d06149ddb86f4e1e6c8d8..910a66657eb34062f7bfb96cac0fa4c415102fe9 100644 (file)
@@ -3261,8 +3261,8 @@ static int do_message_op(const char *netbios_name, const char *desthost,
 
        poptFreeContext(pc);
 
-       lp_smbcli_options(cmdline_lp_ctx, &smb_options);
-       lp_smbcli_session_options(cmdline_lp_ctx, &smb_session_options);
+       lpcfg_smbcli_options(cmdline_lp_ctx, &smb_options);
+       lpcfg_smbcli_session_options(cmdline_lp_ctx, &smb_session_options);
 
        ev_ctx = s4_event_context_init(talloc_autofree_context());
 
@@ -3276,25 +3276,25 @@ static int do_message_op(const char *netbios_name, const char *desthost,
   
        if (query_host) {
                rc = do_host_query(cmdline_lp_ctx, ev_ctx, query_host,
-                                  lp_workgroup(cmdline_lp_ctx));
+                                  lpcfg_workgroup(cmdline_lp_ctx));
                return rc;
        }
 
        if (message) {
-               rc = do_message_op(lp_netbios_name(cmdline_lp_ctx), desthost,
-                                  lp_smb_ports(cmdline_lp_ctx), dest_ip,
+               rc = do_message_op(lpcfg_netbios_name(cmdline_lp_ctx), desthost,
+                                  lpcfg_smb_ports(cmdline_lp_ctx), dest_ip,
                                   name_type, ev_ctx,
-                                  lp_resolve_context(cmdline_lp_ctx),
+                                  lpcfg_resolve_context(cmdline_lp_ctx),
                                   &smb_options, 
-                   lp_socket_options(cmdline_lp_ctx));
+                   lpcfg_socket_options(cmdline_lp_ctx));
                return rc;
        }
        
-       if (!do_connect(ctx, ev_ctx, lp_resolve_context(cmdline_lp_ctx),
-                       desthost, lp_smb_ports(cmdline_lp_ctx), service,
-                       lp_socket_options(cmdline_lp_ctx),
+       if (!do_connect(ctx, ev_ctx, lpcfg_resolve_context(cmdline_lp_ctx),
+                       desthost, lpcfg_smb_ports(cmdline_lp_ctx), service,
+                       lpcfg_socket_options(cmdline_lp_ctx),
                        cmdline_credentials, &smb_options, &smb_session_options,
-                       lp_gensec_settings(ctx, cmdline_lp_ctx)))
+                       lpcfg_gensec_settings(ctx, cmdline_lp_ctx)))
                return 1;
 
        if (base_directory) {
index 4866a9a8d9ebfa96c66825935d8cb683730b6443..b8d72781f618629307c444908d82c2f89ca3d3fc 100644 (file)
@@ -595,7 +595,7 @@ unsigned int samdb_result_hashes(TALLOC_CTX *mem_ctx, const struct ldb_message *
        return count;
 }
 
-NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct ldb_message *msg, 
+NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct ldb_message *msg,
                                struct samr_Password **lm_pwd, struct samr_Password **nt_pwd) 
 {
        struct samr_Password *lmPwdHash, *ntPwdHash;
@@ -614,7 +614,7 @@ NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx, struct loadparm_context *lp
                /* Ensure that if we have turned off LM
                 * authentication, that we never use the LM hash, even
                 * if we store it */
-               if (lp_lanman_auth(lp_ctx)) {
+               if (lpcfg_lanman_auth(lp_ctx)) {
                        unsigned int num_lm;
                        num_lm = samdb_result_hashes(mem_ctx, msg, "dBCSPwd", &lmPwdHash);
                        if (num_lm == 0) {
index 7242acfa41253bb2ec479ba795cd7588a1330b65..e9f93038b6328f64900e7f9ffd94d9ba1542cf78 100644 (file)
@@ -101,9 +101,9 @@ static void dnsupdate_rebuild(struct dnsupdate_service *service)
        int fd;
        unsigned int i;
        const char *attrs[] = { "sAMAccountName", NULL };
-       const char *realm = lp_realm(service->task->lp_ctx);
+       const char *realm = lpcfg_realm(service->task->lp_ctx);
        TALLOC_CTX *tmp_ctx = talloc_new(service);
-       const char * const *rndc_command = lp_rndc_command(service->task->lp_ctx);
+       const char * const *rndc_command = lpcfg_rndc_command(service->task->lp_ctx);
 
        /* abort any pending script run */
        TALLOC_FREE(service->confupdate.subreq);
@@ -117,12 +117,12 @@ static void dnsupdate_rebuild(struct dnsupdate_service *service)
                return;
        }
 
-       path = lp_parm_string(service->task->lp_ctx, NULL, "dnsupdate", "path");
+       path = lpcfg_parm_string(service->task->lp_ctx, NULL, "dnsupdate", "path");
        if (path == NULL) {
                path = private_path(tmp_ctx, service->task->lp_ctx, "named.conf.update");
        }
 
-       path_static = lp_parm_string(service->task->lp_ctx, NULL, "dnsupdate", "extra_static_grant_rules");
+       path_static = lpcfg_parm_string(service->task->lp_ctx, NULL, "dnsupdate", "extra_static_grant_rules");
        if (path_static == NULL) {
                path_static = private_path(tmp_ctx, service->task->lp_ctx, "named.conf.update.static");
        }
@@ -286,8 +286,8 @@ static void dnsupdate_spnupdate_done(struct tevent_req *subreq)
  */
 static void dnsupdate_check_names(struct dnsupdate_service *service)
 {
-       const char * const *dns_update_command = lp_dns_update_command(service->task->lp_ctx);
-       const char * const *spn_update_command = lp_spn_update_command(service->task->lp_ctx);
+       const char * const *dns_update_command = lpcfg_dns_update_command(service->task->lp_ctx);
+       const char * const *spn_update_command = lpcfg_spn_update_command(service->task->lp_ctx);
 
        /* kill any existing child */
        TALLOC_FREE(service->nameupdate.subreq);
@@ -355,7 +355,7 @@ static void dnsupdate_task_init(struct task_server *task)
        NTSTATUS status;
        struct dnsupdate_service *service;
 
-       if (lp_server_role(task->lp_ctx) != ROLE_DOMAIN_CONTROLLER) {
+       if (lpcfg_server_role(task->lp_ctx) != ROLE_DOMAIN_CONTROLLER) {
                /* not useful for non-DC */
                return;
        }
@@ -386,10 +386,10 @@ static void dnsupdate_task_init(struct task_server *task)
                return;
        }
 
-       service->confupdate.interval    = lp_parm_int(task->lp_ctx, NULL,
+       service->confupdate.interval    = lpcfg_parm_int(task->lp_ctx, NULL,
                                                      "dnsupdate", "config interval", 60); /* in seconds */
 
-       service->nameupdate.interval    = lp_parm_int(task->lp_ctx, NULL,
+       service->nameupdate.interval    = lpcfg_parm_int(task->lp_ctx, NULL,
                                                      "dnsupdate", "name interval", 600); /* in seconds */
 
        dnsupdate_rebuild(service);
index dae9a8ef1bbca260de29562fd8d6185cd2e2839f..118952a143e52075be2cdb72d33977ca3bae1dd1 100644 (file)
@@ -46,7 +46,7 @@ NTSTATUS kccsrv_check_deleted(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
        uint32_t tombstoneLifetime;
 
        time_t t = time(NULL);
-       if (t - s->last_deleted_check < lp_parm_int(s->task->lp_ctx, NULL, "kccsrv",
+       if (t - s->last_deleted_check < lpcfg_parm_int(s->task->lp_ctx, NULL, "kccsrv",
                                                    "check_deleted_interval", 600)) {
                return NT_STATUS_OK;
        }
index 9937e2e6dd76efc1fb6be49049ebffa62ca95132..3f37208dec4c94ad6bc140d213460b6a629460ec 100644 (file)
@@ -233,7 +233,7 @@ NTSTATUS kccsrv_simple_update(struct kccsrv_service *s, TALLOC_CTX *mem_ctx)
                r1->other_info               = talloc_zero(reps, struct repsFromTo1OtherInfo);
                r1->other_info->dns_name     = talloc_asprintf(r1->other_info, "%s._msdcs.%s",
                                                               GUID_string(mem_ctx, &ntds_guid),
-                                                              lp_dnsdomain(s->task->lp_ctx));
+                                                              lpcfg_dnsdomain(s->task->lp_ctx));
                r1->source_dsa_obj_guid      = ntds_guid;
                r1->source_dsa_invocation_id = invocation_id;
                r1->replica_flags            = 
index 989b8f8c5831a0d2ba9008f0041d8ab05458112b..4507545355af0b432bc4fa617a796829f411b35b 100644 (file)
@@ -169,7 +169,7 @@ static void kccsrv_task_init(struct task_server *task)
        struct kccsrv_service *service;
        uint32_t periodic_startup_interval;
 
-       switch (lp_server_role(task->lp_ctx)) {
+       switch (lpcfg_server_role(task->lp_ctx)) {
        case ROLE_STANDALONE:
                task_server_terminate(task, "kccsrv: no KCC required in standalone configuration", false);
                return;
@@ -217,9 +217,9 @@ static void kccsrv_task_init(struct task_server *task)
                return;
        }
 
-       periodic_startup_interval       = lp_parm_int(task->lp_ctx, NULL, "kccsrv", 
+       periodic_startup_interval       = lpcfg_parm_int(task->lp_ctx, NULL, "kccsrv",
                                                      "periodic_startup_interval", 15); /* in seconds */
-       service->periodic.interval      = lp_parm_int(task->lp_ctx, NULL, "kccsrv", 
+       service->periodic.interval      = lpcfg_parm_int(task->lp_ctx, NULL, "kccsrv",
                                                      "periodic_interval", 300); /* in seconds */
 
        status = kccsrv_periodic_schedule(service, periodic_startup_interval);
index 24110529c5c235db34a4f4ebe79ae84d1428161b..8ce9d0f1a3a2a2535dbcea7e863fc5b23b892256 100644 (file)
@@ -581,7 +581,7 @@ static void dreplsrv_update_refs_trigger(struct tevent_req *req)
 
        ntds_dns_name = talloc_asprintf(r, "%s._msdcs.%s",
                                        ntds_guid_str,
-                                       lp_dnsdomain(service->task->lp_ctx));
+                                       lpcfg_dnsdomain(service->task->lp_ctx));
        if (tevent_req_nomem(ntds_dns_name, req)) {
                return;
        }
index eaff5810835e2b53e935b3755f2d736eeeaf7370..c036228ee7439c5b2449d66dfc92989ed190c80c 100644 (file)
@@ -79,7 +79,7 @@ static WERROR drepl_create_rid_manager_source_dsa(struct dreplsrv_service *servi
        sdsa->repsFrom1->other_info->dns_name =
                talloc_asprintf(sdsa->repsFrom1->other_info, "%s._msdcs.%s",
                                GUID_string(sdsa->repsFrom1->other_info, &sdsa->repsFrom1->source_dsa_obj_guid),
-                               lp_dnsdomain(service->task->lp_ctx));
+                               lpcfg_dnsdomain(service->task->lp_ctx));
        if (!sdsa->repsFrom1->other_info->dns_name) {
                talloc_free(sdsa);
                return WERR_NOMEM;
index e48ae3e5630e9d76d505838c9b625d1c604ff21a..652c16fda4a3322f298b104aa25b249799a800eb 100644 (file)
@@ -138,7 +138,7 @@ static void dreplsrv_task_init(struct task_server *task)
        bool am_rodc;
        int ret;
 
-       switch (lp_server_role(task->lp_ctx)) {
+       switch (lpcfg_server_role(task->lp_ctx)) {
        case ROLE_STANDALONE:
                task_server_terminate(task, "dreplsrv: no DSDB replication required in standalone configuration", 
                                      false);
@@ -187,8 +187,8 @@ static void dreplsrv_task_init(struct task_server *task)
                return;
        }
 
-       periodic_startup_interval       = lp_parm_int(task->lp_ctx, NULL, "dreplsrv", "periodic_startup_interval", 15); /* in seconds */
-       service->periodic.interval      = lp_parm_int(task->lp_ctx, NULL, "dreplsrv", "periodic_interval", 300); /* in seconds */
+       periodic_startup_interval       = lpcfg_parm_int(task->lp_ctx, NULL, "dreplsrv", "periodic_startup_interval", 15); /* in seconds */
+       service->periodic.interval      = lpcfg_parm_int(task->lp_ctx, NULL, "dreplsrv", "periodic_interval", 300); /* in seconds */
 
        status = dreplsrv_periodic_schedule(service, periodic_startup_interval);
        if (!W_ERROR_IS_OK(status)) {
@@ -201,7 +201,7 @@ static void dreplsrv_task_init(struct task_server *task)
        /* if we are a RODC then we do not send DSReplicaSync*/
        ret = samdb_rodc(service->samdb, &am_rodc);
        if (ret == LDB_SUCCESS && !am_rodc) {
-               service->notify.interval = lp_parm_int(task->lp_ctx, NULL, "dreplsrv",
+               service->notify.interval = lpcfg_parm_int(task->lp_ctx, NULL, "dreplsrv",
                                                           "notify_interval", 5); /* in seconds */
                status = dreplsrv_notify_schedule(service, service->notify.interval);
                if (!W_ERROR_IS_OK(status)) {
index 6e38bc46b127d6c6c7325f9a4a07bc687455e6b4..eedeb1a8b32efd414500b8a0d316a3c2ec821148 100644 (file)
@@ -150,7 +150,7 @@ static int acl_module_init(struct ldb_module *module)
        }
 
        data->password_attrs = NULL;
-       data->acl_perform = lp_parm_bool(ldb_get_opaque(ldb, "loadparm"),
+       data->acl_perform = lpcfg_parm_bool(ldb_get_opaque(ldb, "loadparm"),
                                         NULL, "acl", "perform", false);
        ldb_module_set_private(module, data);
 
index 86f9bc43cce0c5fc7423299ad17823c853af4195..e6f288d01cc190ccb942be84d986b361d324f7a0 100644 (file)
@@ -459,7 +459,7 @@ static int kludge_acl_init(struct ldb_module *module)
        }
 
        data->password_attrs = NULL;
-       data->acl_perform = lp_parm_bool(ldb_get_opaque(ldb, "loadparm"),
+       data->acl_perform = lpcfg_parm_bool(ldb_get_opaque(ldb, "loadparm"),
                                         NULL, "acl", "perform", false);
        ldb_module_set_private(module, data);
 
index e6a315d2ef85953127fdf672b1daae93cd0a1125..5065bd565ec180b1ce015b4b06e1442f19594007 100644 (file)
@@ -582,7 +582,7 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
                                            data->partitions[i]->ctrl->dn) != 0)) {
                                char *ref = talloc_asprintf(ac,
                                                            "ldap://%s/%s%s",
-                                                           lp_dnsdomain(lp_ctx),
+                                                           lpcfg_dnsdomain(lp_ctx),
                                                            ldb_dn_get_linearized(data->partitions[i]->ctrl->dn),
                                                            req->op.search.scope == LDB_SCOPE_ONELEVEL ? "??base" : "");
 
index 99bba57d10531cd6004389333f1a1ffb11fdff9e..0f078b5c76fcf28dac12b56f903f1516e4e39adb 100644 (file)
@@ -1404,7 +1404,7 @@ static int setup_password_fields(struct setup_password_fields_io *io)
                return ret;
        }
 
-       if (lp_lanman_auth(lp_ctx)) {
+       if (lpcfg_lanman_auth(lp_ctx)) {
                ret = setup_lm_fields(io);
                if (ret != LDB_SUCCESS) {
                        return ret;
@@ -1807,12 +1807,12 @@ static int setup_io(struct ph_context *ac,
                return LDB_ERR_UNWILLING_TO_PERFORM;
        }
 
-       if (lp_lanman_auth(lp_ctx) && (lm_hash != NULL)) {
+       if (lpcfg_lanman_auth(lp_ctx) && (lm_hash != NULL)) {
                io->n.lm_hash = talloc(io->ac, struct samr_Password);
                memcpy(io->n.lm_hash->hash, lm_hash->data, MIN(lm_hash->length,
                       sizeof(io->n.lm_hash->hash)));
        }
-       if (lp_lanman_auth(lp_ctx) && (old_lm_hash != NULL)) {
+       if (lpcfg_lanman_auth(lp_ctx) && (old_lm_hash != NULL)) {
                io->og.lm_hash = talloc(io->ac, struct samr_Password);
                memcpy(io->og.lm_hash->hash, old_lm_hash->data, MIN(old_lm_hash->length,
                       sizeof(io->og.lm_hash->hash)));
@@ -2061,9 +2061,9 @@ static int get_domain_data_callback(struct ldb_request *req,
                lp_ctx = talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
                                         struct loadparm_context);
 
-               ac->status->domain_data.dns_domain = lp_dnsdomain(lp_ctx);
-               ac->status->domain_data.realm = lp_realm(lp_ctx);
-               ac->status->domain_data.netbios_domain = lp_sam_name(lp_ctx);
+               ac->status->domain_data.dns_domain = lpcfg_dnsdomain(lp_ctx);
+               ac->status->domain_data.realm = lpcfg_realm(lp_ctx);
+               ac->status->domain_data.netbios_domain = lpcfg_sam_name(lp_ctx);
 
                ac->status->reject_reason = SAM_PWD_CHANGE_NO_ERROR;
 
index 2205be07c18e7a3c1093036f34a4f9df930a279d..160f60f18c49b6f641d9ecb4678d3bbbb6d31178 100644 (file)
@@ -2180,7 +2180,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
 
                referral = talloc_asprintf(req,
                                           "ldap://%s/%s",
-                                          lp_dnsdomain(lp_ctx),
+                                          lpcfg_dnsdomain(lp_ctx),
                                           ldb_dn_get_linearized(msg->dn));
                ret = ldb_module_send_referral(req, referral);
                return ldb_module_done(req, NULL, NULL, ret);
index 2b0c4b9fa8a1a7256143c958a08aa4c80d565584..9cde5c89f7abd0a7d33574b8afa174bdce4492c4 100644 (file)
@@ -72,7 +72,7 @@ static void ridalloc_poke_rid_manager(struct ldb_module *module)
                (struct loadparm_context *)ldb_get_opaque(ldb, "loadparm");
        TALLOC_CTX *tmp_ctx = talloc_new(module);
 
-       msg = messaging_client_init(tmp_ctx, lp_messaging_path(tmp_ctx, lp_ctx),
+       msg = messaging_client_init(tmp_ctx, lpcfg_messaging_path(tmp_ctx, lp_ctx),
                                    ldb_get_event_context(ldb));
        if (!msg) {
                DEBUG(3,(__location__ ": Failed to create messaging context\n"));
index 6c21382cd3f028445a124f9edf9851b14947c581..9368e0d007d11cea96df8fc0dd0cab67072aa347 100644 (file)
@@ -56,7 +56,7 @@ static int samba3sid_next_sid(struct ldb_module *module,
                                 DSDB_FLAG_NEXT_MODULE |
                                 DSDB_SEARCH_SEARCH_ALL_PARTITIONS,
                                 "(&(objectClass=sambaDomain)(sambaDomainName=%s))",
-                                lp_sam_name(ldb_get_opaque(ldb, "loadparm")));
+                                lpcfg_sam_name(ldb_get_opaque(ldb, "loadparm")));
        if (ret != LDB_SUCCESS) {
                ldb_asprintf_errstring(ldb,
                                       __location__
index b9a97200189ed1b295e91fb14705bfe1de946311..9ae308b9bc855a0f7f1a46038150d8ce9a84d3db 100644 (file)
@@ -950,7 +950,7 @@ static int samldb_fill_object(struct samldb_ctx *ac, const char *type)
        }
 
        if ( ! ac->sid) {
-               sid_generator = lp_sid_generator(lp_ctx);
+               sid_generator = lpcfg_sid_generator(lp_ctx);
                if (sid_generator == SID_GENERATOR_INTERNAL) {
                        ret = samldb_add_step(ac, samldb_allocate_sid);
                        if (ret != LDB_SUCCESS) return ret;
index 67b55385cbc9a1250341a0298c63aa1173b0abb5..2b4e9a1438e752eedbdffa95585707640d42bbda 100644 (file)
@@ -83,7 +83,7 @@ static int samdb_credentials_destructor(struct cli_credentials *creds)
   that we always get the same pointer in ldb_wrap_connect()
  */
 struct cli_credentials *samdb_credentials(struct tevent_context *event_ctx, 
-                                         struct loadparm_context *lp_ctx) 
+                                         struct loadparm_context *lp_ctx)
 {
        static struct cli_credentials *static_credentials;
        struct cli_credentials *cred;
@@ -126,9 +126,9 @@ struct ldb_context *samdb_connect(TALLOC_CTX *mem_ctx,
                                  struct auth_session_info *session_info)
 {
        struct ldb_context *ldb;
-       ldb = ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, 
-                              lp_sam_url(lp_ctx), session_info,
-                              samdb_credentials(ev_ctx, lp_ctx), 
+       ldb = ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx,
+                              lpcfg_sam_url(lp_ctx), session_info,
+                              samdb_credentials(ev_ctx, lp_ctx),
                               0);
        if (!ldb) {
                return NULL;
index ad0312dd723bbc63e82955155104593c009e332d..f05b7e2a186dbf68407e46f6658d0dd296533e58 100644 (file)
@@ -33,7 +33,7 @@ struct ldb_context *privilege_connect(TALLOC_CTX *mem_ctx,
                                      struct tevent_context *ev_ctx,
                                      struct loadparm_context *lp_ctx)
 {
-       return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, "privilege.ldb", 
+       return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, "privilege.ldb",
                                NULL, NULL, 0);
 }
 
index e9136475113f0e308f9841d4550533b65309f168..c8bbea75317d5d34ffd48933493e45d7310f8bff 100644 (file)
@@ -517,7 +517,7 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
        unsigned int i;
        krb5_error_code ret = 0;
        krb5_boolean is_computer = FALSE;
-       char *realm = strupper_talloc(mem_ctx, lp_realm(lp_ctx));
+       char *realm = strupper_talloc(mem_ctx, lpcfg_realm(lp_ctx));
 
        struct samba_kdc_entry *p;
        NTTIME acct_expiry;
@@ -604,7 +604,7 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
         * their probably patheticly insecure password) */
 
        if (entry_ex->entry.flags.server
-           && lp_parm_bool(lp_ctx, NULL, "kdc", "require spn for service", true)) {
+           && lpcfg_parm_bool(lp_ctx, 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;
                }
@@ -663,7 +663,7 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
                    && principal->name.name_string.len == 2
                    && (strcmp(principal->name.name_string.val[0], "kadmin") == 0)
                    && (strcmp(principal->name.name_string.val[1], "changepw") == 0)
-                   && lp_is_my_domain_or_realm(lp_ctx, principal->realm)) {
+                   && lpcfg_is_my_domain_or_realm(lp_ctx, principal->realm)) {
                        entry_ex->entry.flags.change_pw = 1;
                }
                entry_ex->entry.flags.client = 0;
@@ -769,7 +769,7 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
 {
        struct loadparm_context *lp_ctx = kdc_db_ctx->lp_ctx;
        const char *dnsdomain;
-       char *realm = strupper_talloc(mem_ctx, lp_realm(lp_ctx));
+       char *realm = strupper_talloc(mem_ctx, lpcfg_realm(lp_ctx));
        DATA_BLOB password_utf16;
        struct samr_Password password_hash;
        const struct ldb_val *password_val;
@@ -1052,8 +1052,8 @@ static krb5_error_code samba_kdc_fetch_krbtgt(krb5_context context,
 
        /* krbtgt case.  Either us or a trusted realm */
 
-       if (lp_is_my_domain_or_realm(lp_ctx, principal->realm)
-           && lp_is_my_domain_or_realm(lp_ctx, principal->name.name_string.val[1])) {
+       if (lpcfg_is_my_domain_or_realm(lp_ctx, principal->realm)
+           && lpcfg_is_my_domain_or_realm(lp_ctx, principal->name.name_string.val[1])) {
                /* us */
                /* Cludge, cludge cludge.  If the realm part of krbtgt/realm,
                 * is in our db, then direct the caller at our primary
@@ -1077,7 +1077,7 @@ static krb5_error_code samba_kdc_fetch_krbtgt(krb5_context context,
                        return HDB_ERR_NOENTRY;
                }
 
-               realm_fixed = strupper_talloc(mem_ctx, lp_realm(lp_ctx));
+               realm_fixed = strupper_talloc(mem_ctx, lpcfg_realm(lp_ctx));
                if (!realm_fixed) {
                        ret = ENOMEM;
                        krb5_set_error_message(context, ret, "strupper_talloc: out of memory");
@@ -1112,13 +1112,13 @@ static krb5_error_code samba_kdc_fetch_krbtgt(krb5_context context,
 
                /* Either an inbound or outbound trust */
 
-               if (strcasecmp(lp_realm(lp_ctx), principal->realm) == 0) {
+               if (strcasecmp(lpcfg_realm(lp_ctx), principal->realm) == 0) {
                        /* look for inbound trust */
                        direction = INBOUND;
                        realm = principal->name.name_string.val[1];
                }
 
-               if (strcasecmp(lp_realm(lp_ctx), principal->name.name_string.val[1]) == 0) {
+               if (strcasecmp(lpcfg_realm(lp_ctx), principal->name.name_string.val[1]) == 0) {
                        /* look for outbound trust */
                        direction = OUTBOUND;
                        realm = principal->realm;
index e16e20b4705d218e0aaf4edc6b2ec449fb5bae5f..5adb0709cfb7f636b98d7cf1d3b2bb85e4968736 100644 (file)
@@ -483,7 +483,7 @@ static NTSTATUS kdc_add_socket(struct kdc_server *kdc,
                                     model_ops,
                                     &kdc_tcp_stream_ops,
                                     "ip", address, &port,
-                                    lp_socket_options(kdc->task->lp_ctx),
+                                    lpcfg_socket_options(kdc->task->lp_ctx),
                                     kdc_socket);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Failed to bind to %s:%u TCP - %s\n",
@@ -547,8 +547,8 @@ static NTSTATUS kdc_startup_interfaces(struct kdc_server *kdc, struct loadparm_c
 
        for (i=0; i<num_interfaces; i++) {
                const char *address = talloc_strdup(tmp_ctx, iface_n_ip(ifaces, i));
-               uint16_t kdc_port = lp_krb5_port(lp_ctx);
-               uint16_t kpasswd_port = lp_kpasswd_port(lp_ctx);
+               uint16_t kdc_port = lpcfg_krb5_port(lp_ctx);
+               uint16_t kpasswd_port = lpcfg_kpasswd_port(lp_ctx);
 
                if (kdc_port) {
                        status = kdc_add_socket(kdc, model_ops,
@@ -620,8 +620,8 @@ static NTSTATUS kdc_check_generic_kerberos(struct irpc_message *msg,
        }
 
        ret = krb5_make_principal(kdc->smb_krb5_context->krb5_context, &principal,
-                                 lp_realm(kdc->task->lp_ctx),
-                                 "krbtgt", lp_realm(kdc->task->lp_ctx),
+                                 lpcfg_realm(kdc->task->lp_ctx),
+                                 "krbtgt", lpcfg_realm(kdc->task->lp_ctx),
                                  NULL);
 
        if (ret != 0) {
@@ -678,7 +678,7 @@ static void kdc_task_init(struct task_server *task)
        krb5_error_code ret;
        struct interface *ifaces;
 
-       switch (lp_server_role(task->lp_ctx)) {
+       switch (lpcfg_server_role(task->lp_ctx)) {
        case ROLE_STANDALONE:
                task_server_terminate(task, "kdc: no KDC required in standalone configuration", false);
                return;
@@ -690,7 +690,7 @@ static void kdc_task_init(struct task_server *task)
                break;
        }
 
-       load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+       load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
 
        if (iface_count(ifaces) == 0) {
                task_server_terminate(task, "kdc: no network interfaces configured", false);
index fb6723c77cdb20e43a0ee14ecf8664fb22dc8070..9c02ac3465e35cb3885b34489f4193632d5dcea1 100644 (file)
@@ -222,7 +222,7 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
        case KRB5_KPASSWD_VERS_CHANGEPW:
        {
                DATA_BLOB password;
-               if (!convert_string_talloc_convenience(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx),
+               if (!convert_string_talloc_convenience(mem_ctx, lpcfg_iconv_convenience(kdc->task->lp_ctx),
                                               CH_UTF8, CH_UTF16,
                                               (const char *)input->data,
                                               input->length,
@@ -262,7 +262,7 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
                                                        reply);
                }
 
-               if (!convert_string_talloc_convenience(mem_ctx, lp_iconv_convenience(kdc->task->lp_ctx),
+               if (!convert_string_talloc_convenience(mem_ctx, lpcfg_iconv_convenience(kdc->task->lp_ctx),
                                               CH_UTF8, CH_UTF16,
                                               (const char *)chpw.newpasswd.data,
                                               chpw.newpasswd.length,
index cb1284cfca4eab83e4d600c0c5439feff7a33190..58ab1673ff8bd4bf51c40481946cd1c857747f0d 100644 (file)
@@ -82,11 +82,11 @@ static int mit_samba_context_init(struct mit_samba_context **_ctx)
        }
 
        /* init s4 configuration */
-       s4_conf_file = lp_configfile(ctx->db_ctx->lp_ctx);
+       s4_conf_file = lpcfg_configfile(ctx->db_ctx->lp_ctx);
        if (s4_conf_file) {
-               lp_load(ctx->db_ctx->lp_ctx, s4_conf_file);
+               lpcfg_load(ctx->db_ctx->lp_ctx, s4_conf_file);
        } else {
-               lp_load_default(ctx->db_ctx->lp_ctx);
+               lpcfg_load_default(ctx->db_ctx->lp_ctx);
        }
 
        ctx->session_info = system_session(ctx->db_ctx->lp_ctx);
index 8c203e555d8aa3143f2a6f7c90baf5e6ecb441ad..3eeb26c98d7d8cc02f2b2586ac565537fe78def0 100644 (file)
@@ -140,8 +140,8 @@ NTSTATUS samba_kdc_get_pac_blob(TALLOC_CTX *mem_ctx,
        }
 
        nt_status = authsam_make_server_info(mem_ctx, p->kdc_db_ctx->samdb,
-                                            lp_netbios_name(p->kdc_db_ctx->lp_ctx),
-                                            lp_sam_name(p->kdc_db_ctx->lp_ctx),
+                                            lpcfg_netbios_name(p->kdc_db_ctx->lp_ctx),
+                                            lpcfg_sam_name(p->kdc_db_ctx->lp_ctx),
                                             p->realm_dn,
                                             p->msg,
                                             data_blob(NULL, 0),
index 23210fa17689fed4e796c924fa457515988fe799..a6566df92ae86c2f3259b8b2fb389120b4131868 100644 (file)
@@ -184,9 +184,9 @@ NTSTATUS ldapsrv_backend_Init(struct ldapsrv_connection *conn)
        conn->ldb = ldb_wrap_connect(conn, 
                                     conn->connection->event.ctx,
                                     conn->lp_ctx,
-                                    lp_sam_url(conn->lp_ctx), 
+                                    lpcfg_sam_url(conn->lp_ctx),
                                     conn->session_info,
-                                    samdb_credentials(conn->connection->event.ctx, conn->lp_ctx), 
+                                    samdb_credentials(conn->connection->event.ctx, conn->lp_ctx),
                                     conn->global_catalog ? LDB_FLG_RDONLY : 0);
        if (conn->ldb == NULL) {
                return NT_STATUS_INTERNAL_DB_CORRUPTION;
@@ -199,7 +199,7 @@ NTSTATUS ldapsrv_backend_Init(struct ldapsrv_connection *conn)
                        = gensec_use_kerberos_mechs(conn, backends, conn->server_credentials);
                unsigned int i, j = 0;
                for (i = 0; ops && ops[i]; i++) {
-                       if (!lp_parm_bool(conn->lp_ctx,  NULL, "gensec", ops[i]->name, ops[i]->enabled))
+                       if (!lpcfg_parm_bool(conn->lp_ctx,  NULL, "gensec", ops[i]->name, ops[i]->enabled))
                                continue;
 
                        if (ops[i]->sasl_name && ops[i]->server_start) {
index 49d3d58edf95e0f6d5a431c01efd76ee0ea1d583..946e1bf3b7dca0eee0d7865dd94a9c7489b223dc 100644 (file)
@@ -490,7 +490,7 @@ static const struct stream_server_ops ldap_stream_priv_ops = {
   add a socket address to the list of events, one event per port
 */
 static NTSTATUS add_socket(struct tevent_context *event_context,
-                          struct loadparm_context *lp_ctx, 
+                          struct loadparm_context *lp_ctx,
                           const struct model_ops *model_ops,
                           const char *address, struct ldapsrv_service *ldap_service)
 {
@@ -501,7 +501,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
        status = stream_setup_socket(event_context, lp_ctx,
                                     model_ops, &ldap_stream_nonpriv_ops,
                                     "ipv4", address, &port, 
-                                    lp_socket_options(lp_ctx), 
+                                    lpcfg_socket_options(lp_ctx),
                                     ldap_service);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("ldapsrv failed to bind to %s:%u - %s\n",
@@ -512,11 +512,11 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
        if (tls_support(ldap_service->tls_params)) {
                /* add ldaps server */
                port = 636;
-               status = stream_setup_socket(event_context, lp_ctx, 
+               status = stream_setup_socket(event_context, lp_ctx,
                                             model_ops,
                                             &ldap_stream_nonpriv_ops,
                                             "ipv4", address, &port, 
-                                            lp_socket_options(lp_ctx), 
+                                            lpcfg_socket_options(lp_ctx),
                                             ldap_service);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(0,("ldapsrv failed to bind to %s:%u - %s\n",
@@ -538,7 +538,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
                                             model_ops,
                                             &ldap_stream_nonpriv_ops,
                                             "ipv4", address, &port, 
-                                            lp_socket_options(lp_ctx), 
+                                            lpcfg_socket_options(lp_ctx),
                                             ldap_service);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(0,("ldapsrv failed to bind to %s:%u - %s\n",
@@ -567,7 +567,7 @@ static void ldapsrv_task_init(struct task_server *task)
        NTSTATUS status;
        const struct model_ops *model_ops;
 
-       switch (lp_server_role(task->lp_ctx)) {
+       switch (lpcfg_server_role(task->lp_ctx)) {
        case ROLE_STANDALONE:
                task_server_terminate(task, "ldap_server: no LDAP server required in standalone configuration", 
                                      false);
@@ -595,12 +595,12 @@ static void ldapsrv_task_init(struct task_server *task)
        ldap_service->tls_params = tls_initialise(ldap_service, task->lp_ctx);
        if (ldap_service->tls_params == NULL) goto failed;
 
-       if (lp_interfaces(task->lp_ctx) && lp_bind_interfaces_only(task->lp_ctx)) {
+       if (lpcfg_interfaces(task->lp_ctx) && lpcfg_bind_interfaces_only(task->lp_ctx)) {
                struct interface *ifaces;
                int num_interfaces;
                int i;
 
-               load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+               load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
                num_interfaces = iface_count(ifaces);
 
                /* We have been given an interfaces line, and been 
@@ -613,8 +613,8 @@ static void ldapsrv_task_init(struct task_server *task)
                        if (!NT_STATUS_IS_OK(status)) goto failed;
                }
        } else {
-               status = add_socket(task->event_ctx, task->lp_ctx, model_ops, 
-                                   lp_socket_address(task->lp_ctx), ldap_service);
+               status = add_socket(task->event_ctx, task->lp_ctx, model_ops,
+                                   lpcfg_socket_address(task->lp_ctx), ldap_service);
                if (!NT_STATUS_IS_OK(status)) goto failed;
        }
 
@@ -626,7 +626,7 @@ static void ldapsrv_task_init(struct task_server *task)
        status = stream_setup_socket(task->event_ctx, task->lp_ctx,
                                     model_ops, &ldap_stream_nonpriv_ops,
                                     "unix", ldapi_path, NULL, 
-                                    lp_socket_options(task->lp_ctx), 
+                                    lpcfg_socket_options(task->lp_ctx),
                                     ldap_service);
        talloc_free(ldapi_path);
        if (!NT_STATUS_IS_OK(status)) {
@@ -657,7 +657,7 @@ static void ldapsrv_task_init(struct task_server *task)
        status = stream_setup_socket(task->event_ctx, task->lp_ctx,
                                     model_ops, &ldap_stream_priv_ops,
                                     "unix", ldapi_path, NULL,
-                                    lp_socket_options(task->lp_ctx),
+                                    lpcfg_socket_options(task->lp_ctx),
                                     ldap_service);
        talloc_free(ldapi_path);
        if (!NT_STATUS_IS_OK(status)) {
index 77218290ff955baa655d3f0c08479c4e2f15be0e..7d9e65d55f5b7ef44d3fc46d6536b05fc7aff0b5 100644 (file)
@@ -66,8 +66,8 @@ static void popt_samba_callback(poptContext con,
        const char *pname;
 
        if (reason == POPT_CALLBACK_REASON_POST) {
-               if (lp_configfile(cmdline_lp_ctx) == NULL) {
-                       lp_load_default(cmdline_lp_ctx);
+               if (lpcfg_configfile(cmdline_lp_ctx) == NULL) {
+                       lpcfg_load_default(cmdline_lp_ctx);
                }
                /* Hook any 'every Samba program must do this, after
                 * the smb.conf is setup' functions here */
@@ -108,14 +108,14 @@ static void popt_samba_callback(poptContext con,
                break;
 
        case OPT_OPTION:
-               if (!lp_set_option(cmdline_lp_ctx, arg)) {
+               if (!lpcfg_set_option(cmdline_lp_ctx, arg)) {
                        fprintf(stderr, "Error setting option '%s'\n", arg);
                        exit(1);
                }
                break;
 
        case 'd':
-               lp_set_cmdline(cmdline_lp_ctx, "log level", arg);
+               lpcfg_set_cmdline(cmdline_lp_ctx, "log level", arg);
                break;
 
        case OPT_DEBUG_STDERR:
@@ -124,14 +124,14 @@ static void popt_samba_callback(poptContext con,
 
        case 's':
                if (arg) {
-                       lp_load(cmdline_lp_ctx, arg);
+                       lpcfg_load(cmdline_lp_ctx, arg);
                }
                break;
 
        case 'l':
                if (arg) {
                        char *new_logfile = talloc_asprintf(NULL, "%s/log.%s", arg, pname);
-                       lp_set_cmdline(cmdline_lp_ctx, "log file", new_logfile);
+                       lpcfg_set_cmdline(cmdline_lp_ctx, "log file", new_logfile);
                        talloc_free(new_logfile);
                }
                break;
@@ -152,36 +152,36 @@ static void popt_common_callback(poptContext con,
        switch(opt->val) {
        case 'O':
                if (arg) {
-                       lp_set_cmdline(lp_ctx, "socket options", arg);
+                       lpcfg_set_cmdline(lp_ctx, "socket options", arg);
                }
                break;
        
        case 'W':
-               lp_set_cmdline(lp_ctx, "workgroup", arg);
+               lpcfg_set_cmdline(lp_ctx, "workgroup", arg);
                break;
 
        case 'r':
-               lp_set_cmdline(lp_ctx, "realm", arg);
+               lpcfg_set_cmdline(lp_ctx, "realm", arg);
                break;
                
        case 'n':
-               lp_set_cmdline(lp_ctx, "netbios name", arg);
+               lpcfg_set_cmdline(lp_ctx, "netbios name", arg);
                break;
                
        case 'i':
-               lp_set_cmdline(lp_ctx, "netbios scope", arg);
+               lpcfg_set_cmdline(lp_ctx, "netbios scope", arg);
                break;
 
        case 'm':
-               lp_set_cmdline(lp_ctx, "client max protocol", arg);
+               lpcfg_set_cmdline(lp_ctx, "client max protocol", arg);
                break;
 
        case 'R':
-               lp_set_cmdline(lp_ctx, "name resolve order", arg);
+               lpcfg_set_cmdline(lp_ctx, "name resolve order", arg);
                break;
 
        case 'S':
-               lp_set_cmdline(lp_ctx, "client signing", arg);
+               lpcfg_set_cmdline(lp_ctx, "client signing", arg);
                break;
 
        }
index 261dac05c67f8b4c8e0f959fa5d96166fb582d4e..b205cb48a886545ee8d596d1fdb7375348d3d544 100644 (file)
@@ -171,7 +171,7 @@ static NTSTATUS dcom_connect_host(struct com_context *ctx,
        if (server == NULL) { 
                return dcerpc_pipe_connect(ctx->event_ctx, p, "ncalrpc", 
                                                                   &ndr_table_IRemoteActivation,
-                                                                  dcom_get_server_credentials(ctx, NULL), ctx->event_ctx, ctx->lp_ctx);
+                                                                  dcom_get_server_credentials(ctx, NULL), ctx->event_ctx, ctx->lp_ctx);
        }
        loc_ctx = talloc_new(ctx);
 
@@ -182,7 +182,7 @@ static NTSTATUS dcom_connect_host(struct com_context *ctx,
                        bd->flags |= DCERPC_DEBUG_PRINT_BOTH;
                status = dcerpc_pipe_connect_b(ctx->event_ctx, p, bd, 
                                                                           &ndr_table_IRemoteActivation,
-                                                                  dcom_get_server_credentials(ctx, bd->host), ctx->event_ctx, ctx->lp_ctx);
+                                                                  dcom_get_server_credentials(ctx, bd->host), ctx->event_ctx, ctx->lp_ctx);
                goto end;
        }
 
index 80256c9a940a7e4000e9dcd8d418ddfce7db0100..365b67b6afa3549861bdfeb2d22d54d5bade2512 100644 (file)
@@ -166,7 +166,7 @@ static int ldb_wrap_destructor(struct ldb_wrap *w)
        ldb_set_modules_dir(ldb,
                            talloc_asprintf(ldb,
                                            "%s/ldb",
-                                           lp_modulesdir(lp_ctx)));
+                                           lpcfg_modulesdir(lp_ctx)));
 
        if (session_info) {
                if (ldb_set_opaque(ldb, "sessionInfo", session_info)) {
@@ -197,7 +197,7 @@ static int ldb_wrap_destructor(struct ldb_wrap *w)
                return NULL;
        }
 
-       if (lp_ctx != NULL && strcmp(lp_sam_url(lp_ctx), url) == 0) {
+       if (lp_ctx != NULL && strcmp(lpcfg_sam_url(lp_ctx), url) == 0) {
                dsdb_set_global_schema(ldb);
        }
 
@@ -212,7 +212,7 @@ static int ldb_wrap_destructor(struct ldb_wrap *w)
        }
 
        /* allow admins to force non-sync ldb for all databases */
-       if (lp_parm_bool(lp_ctx, NULL, "ldb", "nosync", false)) {
+       if (lpcfg_parm_bool(lp_ctx, NULL, "ldb", "nosync", false)) {
                flags |= LDB_FLG_NOSYNC;
        }
 
@@ -253,7 +253,7 @@ static int ldb_wrap_destructor(struct ldb_wrap *w)
        DLIST_ADD(ldb_wrap_list, w);
 
        /* make the resulting schema global */
-       if (lp_ctx != NULL && strcmp(lp_sam_url(lp_ctx), url) == 0) {
+       if (lp_ctx != NULL && strcmp(lpcfg_sam_url(lp_ctx), url) == 0) {
                struct dsdb_schema *schema = dsdb_get_schema(ldb, NULL);
                if (schema) {
                        dsdb_make_schema_global(ldb, schema);
index 2b7b23739e48ddb9ffc827787de51f10ec51e164..e8cdb90b9f60061c703245ea22dbc29bdeab3f86 100644 (file)
@@ -56,7 +56,7 @@ static PyObject *py_ldb_set_loadparm(PyObject *self, PyObject *args)
 
        ldb = PyLdb_AsLdbContext(self);
 
-       lp_ctx = lp_from_py_object(ldb, py_lp_ctx);
+       lp_ctx = lpcfg_from_py_object(ldb, py_lp_ctx);
        if (lp_ctx == NULL) {
                PyErr_SetString(PyExc_TypeError, "Expected loadparm object");
                return NULL;
index ddcf945400a6155ed0db3d2c893a8360d290045d..131f6c5f74925ae2835cbb316f10d5a4de31e1a8 100644 (file)
@@ -84,7 +84,7 @@ PyObject *py_messaging_connect(PyTypeObject *self, PyObject *args, PyObject *kwa
        ev = s4_event_context_init(ret->mem_ctx);
 
        if (messaging_path == NULL) {
-               messaging_path = lp_messaging_path(ret->mem_ctx, 
+               messaging_path = lpcfg_messaging_path(ret->mem_ctx,
                                                                   py_default_loadparm_context(ret->mem_ctx));
        } else {
                messaging_path = talloc_strdup(ret->mem_ctx, messaging_path);
@@ -338,7 +338,7 @@ PyObject *py_irpc_connect(PyTypeObject *self, PyObject *args, PyObject *kwargs)
        ev = s4_event_context_init(ret->mem_ctx);
 
        if (messaging_path == NULL) {
-               messaging_path = lp_messaging_path(ret->mem_ctx, 
+               messaging_path = lpcfg_messaging_path(ret->mem_ctx,
                                                                   py_default_loadparm_context(ret->mem_ctx));
        } else {
                messaging_path = talloc_strdup(ret->mem_ctx, messaging_path);
index 87a3c7a124cae4162be2f83ebd43ef7fef3b2c0d..44a116af1ffe56f7d8a9abb6ff38ea32eb2d9fe6 100644 (file)
@@ -215,19 +215,19 @@ static bool irpc_setup(struct torture_context *tctx, void **_data)
 
        *_data = data = talloc(tctx, struct irpc_test_data);
 
-       lp_set_cmdline(tctx->lp_ctx, "pid directory", "piddir.tmp");
+       lpcfg_set_cmdline(tctx->lp_ctx, "pid directory", "piddir.tmp");
 
        data->ev = tctx->ev;
        torture_assert(tctx, data->msg_ctx1 = 
                       messaging_init(tctx, 
-                                     lp_messaging_path(tctx, tctx->lp_ctx), 
+                                     lpcfg_messaging_path(tctx, tctx->lp_ctx),
                                      cluster_id(0, MSG_ID1),
                                      data->ev),
                       "Failed to init first messaging context");
 
        torture_assert(tctx, data->msg_ctx2 = 
                       messaging_init(tctx, 
-                                     lp_messaging_path(tctx, tctx->lp_ctx),
+                                     lpcfg_messaging_path(tctx, tctx->lp_ctx),
                                      cluster_id(0, MSG_ID2), 
                                      data->ev),
                       "Failed to init second messaging context");
index 96cb180ff7a01a5d7cc043af1c3635970aad3075..bf6f13bc671f07e23059ae8247a028183c0cfc25 100644 (file)
@@ -67,12 +67,12 @@ static bool test_ping_speed(struct torture_context *tctx)
        int timelimit = torture_setting_int(tctx, "timelimit", 10);
        uint32_t msg_ping, msg_exit;
 
-       lp_set_cmdline(tctx->lp_ctx, "pid directory", "piddir.tmp");
+       lpcfg_set_cmdline(tctx->lp_ctx, "pid directory", "piddir.tmp");
 
        ev = tctx->ev;
 
        msg_server_ctx = messaging_init(tctx, 
-                                       lp_messaging_path(tctx, tctx->lp_ctx), cluster_id(0, 1), 
+                                       lpcfg_messaging_path(tctx, tctx->lp_ctx), cluster_id(0, 1),
                                        ev);
        
        torture_assert(tctx, msg_server_ctx != NULL, "Failed to init ping messaging context");
@@ -81,7 +81,7 @@ static bool test_ping_speed(struct torture_context *tctx)
        messaging_register_tmp(msg_server_ctx, tctx, exit_message, &msg_exit);
 
        msg_client_ctx = messaging_init(tctx, 
-                                       lp_messaging_path(tctx, tctx->lp_ctx), 
+                                       lpcfg_messaging_path(tctx, tctx->lp_ctx),
                                        cluster_id(0, 2), 
                                        ev);
 
index b932ee5bff0bde7138f805c9b005facc35fe4647..bdc2337b4844f8aca5839f80d9e410b8c5d72926 100644 (file)
@@ -161,23 +161,23 @@ static NTSTATUS gp_cli_connect(struct gp_context *gp_ctx)
 
        gp_ctx->cli = smbcli_state_init(gp_ctx);
 
-       lp_smbcli_options(gp_ctx->lp_ctx, &options);
-       lp_smbcli_session_options(gp_ctx->lp_ctx, &session_options);
+       lpcfg_smbcli_options(gp_ctx->lp_ctx, &options);
+       lpcfg_smbcli_session_options(gp_ctx->lp_ctx, &session_options);
 
 
        return smbcli_full_connection(gp_ctx,
                        &gp_ctx->cli,
                        gp_ctx->active_dc.name,
-                       lp_smb_ports(gp_ctx->lp_ctx),
+                       lpcfg_smb_ports(gp_ctx->lp_ctx),
                        "sysvol",
                        NULL,
-                       lp_socket_options(gp_ctx->lp_ctx),
+                       lpcfg_socket_options(gp_ctx->lp_ctx),
                        gp_ctx->credentials,
-                       lp_resolve_context(gp_ctx->lp_ctx),
+                       lpcfg_resolve_context(gp_ctx->lp_ctx),
                        gp_ctx->ev_ctx,
                        &options,
                        &session_options,
-                       lp_gensec_settings(gp_ctx, gp_ctx->lp_ctx));
+                       lpcfg_gensec_settings(gp_ctx, gp_ctx->lp_ctx));
 
        return NT_STATUS_OK;
 }
index 5e76b3f7478c0930cfeb3f8ed00a5f56bc0ca38d..9a66f4f6ac4e7129b562bce42c7f84635814846b 100644 (file)
@@ -158,7 +158,7 @@ NTSTATUS gp_init(TALLOC_CTX *mem_ctx,
        io = talloc_zero(mem_ctx, struct libnet_LookupDCs);
        NT_STATUS_HAVE_NO_MEMORY(io);
        io->in.name_type = NBT_NAME_PDC;
-       io->in.domain_name = lp_workgroup(lp_ctx);
+       io->in.domain_name = lpcfg_workgroup(lp_ctx);
 
        /* Find Active DC's */
        rv = libnet_LookupDCs(net_ctx, mem_ctx, io);
index 8d0ab2df4ae7d8e5e5656a6d22fb74d253c88655..f2d32431dfb9b499bd8aefd6b808ffa81623af33 100644 (file)
@@ -156,7 +156,7 @@ NTSTATUS gp_create_gpo (struct gp_context *gp_ctx, const char *display_name, str
        gpo->display_name = talloc_strdup(gpo, display_name);
        NT_STATUS_HAVE_NO_MEMORY_AND_FREE(gpo->display_name, mem_ctx);
 
-       gpo->file_sys_path = talloc_asprintf(gpo, "\\\\%s\\sysvol\\%s\\Policies\\%s", lp_dnsdomain(gp_ctx->lp_ctx), lp_dnsdomain(gp_ctx->lp_ctx), name);
+       gpo->file_sys_path = talloc_asprintf(gpo, "\\\\%s\\sysvol\\%s\\Policies\\%s", lpcfg_dnsdomain(gp_ctx->lp_ctx), lpcfg_dnsdomain(gp_ctx->lp_ctx), name);
        NT_STATUS_HAVE_NO_MEMORY_AND_FREE(gpo->file_sys_path, mem_ctx);
 
        /* Create the GPT */
index 58894feb3a53cc3e9f85be408c7a0947b94a8d8e..a3ba6c535116761daf0dd3145ced286218a3974d 100644 (file)
@@ -275,7 +275,7 @@ static PyObject *py_open_samba(PyObject *self, PyObject *args, PyObject *kwargs)
                                         &py_credentials))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
        if (lp_ctx == NULL) {
                PyErr_SetString(PyExc_TypeError, "Expected loadparm context");
                return NULL;
@@ -346,7 +346,7 @@ static PyObject *py_open_ldb_file(PyObject *self, PyObject *args, PyObject *kwar
                                         &py_credentials, &py_lp_ctx))
                return NULL;
 
-       lp_ctx = lp_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
+       lp_ctx = lpcfg_from_py_object(NULL, py_lp_ctx); /* FIXME: leaky */
        if (lp_ctx == NULL) {
                PyErr_SetString(PyExc_TypeError, "Expected loadparm context");
                return NULL;
index f4949939c9760b9fd9fe5250bba24f4e2ba5ee34..f798496dbe775e975d7e54e2fa2f6ac329646979 100644 (file)
@@ -38,7 +38,7 @@ static WERROR mount_samba_hive(struct registry_context *ctx,
        const char *location;
 
        location = talloc_asprintf(ctx, "%s/%s.ldb",
-                                  lp_private_dir(lp_ctx),
+                                  lpcfg_private_dir(lp_ctx),
                                   name);
        W_ERROR_HAVE_NO_MEMORY(location);
 
index cba283f558ff0163becf1c6e9ea1e6db804c06f4..0195064a800158aff6aec35dd0e05f79c122b1d0 100644 (file)
@@ -42,7 +42,7 @@ static bool test_udp(struct torture_context *tctx)
        TALLOC_CTX *mem_ctx = tctx;
        struct interface *ifaces;
 
-       load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+       load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
 
        status = socket_create("ip", SOCKET_TYPE_DGRAM, &sock1, 0);
        torture_assert_ntstatus_ok(tctx, status, "creating DGRAM IP socket 1");
@@ -135,7 +135,7 @@ static bool test_tcp(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "creating IP stream socket 1");
        talloc_steal(mem_ctx, sock2);
 
-       load_interfaces(tctx, lp_interfaces(tctx->lp_ctx), &ifaces);
+       load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
        localhost = socket_address_from_strings(sock1, sock1->backend_name, 
                                                iface_best_ip(ifaces, "127.0.0.1"), 0);
        torture_assert(tctx, localhost, "Localhost not found");
index 470b555aeeaf6633136d1d9a9f80a4f6a9909703..63724e96286d203d7e3b438c0c8a0cee9878a9cb 100644 (file)
@@ -357,11 +357,11 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context *
        struct tls_params *params;
        int ret;
        TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
-       const char *keyfile = lp_tls_keyfile(tmp_ctx, lp_ctx);
-       const char *certfile = lp_tls_certfile(tmp_ctx, lp_ctx);
-       const char *cafile = lp_tls_cafile(tmp_ctx, lp_ctx);
-       const char *crlfile = lp_tls_crlfile(tmp_ctx, lp_ctx);
-       const char *dhpfile = lp_tls_dhpfile(tmp_ctx, lp_ctx);
+       const char *keyfile = lpcfg_tls_keyfile(tmp_ctx, lp_ctx);
+       const char *certfile = lpcfg_tls_certfile(tmp_ctx, lp_ctx);
+       const char *cafile = lpcfg_tls_cafile(tmp_ctx, lp_ctx);
+       const char *crlfile = lpcfg_tls_crlfile(tmp_ctx, lp_ctx);
+       const char *dhpfile = lpcfg_tls_dhpfile(tmp_ctx, lp_ctx);
        void tls_cert_generate(TALLOC_CTX *, const char *, const char *, const char *, const char *);
        params = talloc(mem_ctx, struct tls_params);
        if (params == NULL) {
@@ -369,7 +369,7 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context *
                return NULL;
        }
 
-       if (!lp_tls_enabled(lp_ctx) || keyfile == NULL || *keyfile == 0) {
+       if (!lpcfg_tls_enabled(lp_ctx) || keyfile == NULL || *keyfile == 0) {
                params->tls_enabled = false;
                talloc_free(tmp_ctx);
                return params;
@@ -377,8 +377,8 @@ struct tls_params *tls_initialise(TALLOC_CTX *mem_ctx, struct loadparm_context *
 
        if (!file_exist(cafile)) {
                char *hostname = talloc_asprintf(mem_ctx, "%s.%s",
-                                                lp_netbios_name(lp_ctx),
-                                                lp_dnsdomain(lp_ctx));
+                                                lpcfg_netbios_name(lp_ctx),
+                                                lpcfg_dnsdomain(lp_ctx));
                if (hostname == NULL) {
                        goto init_failed;
                }
index 804c57c2b29a9f430141b124daf04f3d44d56174..5a2635ac0b682a7f583c3d4d6000d9be5f482984 100644 (file)
@@ -225,7 +225,7 @@ _PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
 
        status = gensec_client_start(conn, &conn->gensec,
                                     conn->event.event_ctx, 
-                                    lp_gensec_settings(conn, lp_ctx));
+                                    lpcfg_gensec_settings(conn, lp_ctx));
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0, ("Failed to start GENSEC engine (%s)\n", nt_errstr(status)));
                goto failed;
index 281266361e418b1ebc360787e774a3a207af02c0..b000b20f1e3dcc10bf27bc08bec4874055d08ea1 100644 (file)
@@ -339,8 +339,8 @@ _PUBLIC_ struct composite_context *ldap_connect_send(struct ldap_connection *con
                 * local host name as the target for gensec's
                 * DIGEST-MD5 mechanism */
                conn->host = talloc_asprintf(conn, "%s.%s",
-                                            lp_netbios_name(conn->lp_ctx),
-                                            lp_dnsdomain(conn->lp_ctx));
+                                            lpcfg_netbios_name(conn->lp_ctx),
+                                            lpcfg_dnsdomain(conn->lp_ctx));
                if (composite_nomem(conn->host, state->ctx)) {
                        return result;
                }
@@ -375,7 +375,7 @@ _PUBLIC_ struct composite_context *ldap_connect_send(struct ldap_connection *con
                }
                
                ctx = socket_connect_multi_send(state, conn->host, 1, &conn->port,
-                                               lp_resolve_context(conn->lp_ctx), conn->event.event_ctx);
+                                               lpcfg_resolve_context(conn->lp_ctx), conn->event.event_ctx);
                if (ctx == NULL) goto failed;
 
                ctx->async.fn = ldap_connect_recv_tcp_conn;
@@ -405,7 +405,7 @@ static void ldap_connect_got_sock(struct composite_context *ctx,
        talloc_steal(conn, conn->sock);
        if (conn->ldaps) {
                struct socket_context *tls_socket;
-               char *cafile = lp_tls_cafile(conn->sock, conn->lp_ctx);
+               char *cafile = lpcfg_tls_cafile(conn->sock, conn->lp_ctx);
 
                if (!cafile || !*cafile) {
                        talloc_free(conn->sock);
index da58eb86656642bcd2514020313bf664a8c30bdc..0ad3e1230b5544054b552bd2b6681907161b0ddb 100644 (file)
@@ -101,6 +101,6 @@ bool resolve_context_add_bcast_method(struct resolve_context *ctx, struct interf
 bool resolve_context_add_bcast_method_lp(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
 {
        struct interface *ifaces;
-       load_interfaces(ctx, lp_interfaces(lp_ctx), &ifaces);
-       return resolve_context_add_bcast_method(ctx, ifaces, lp_nbt_port(lp_ctx), lp_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
+       load_interfaces(ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+       return resolve_context_add_bcast_method(ctx, ifaces, lpcfg_nbt_port(lp_ctx), lpcfg_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
 }
index 950815ddc486390cbf4d0fca679d4a5a532f9f5f..c01b46290979e2bb3807ba7f94e299bc1097bf4b 100644 (file)
@@ -146,5 +146,5 @@ bool resolve_context_add_file_method(struct resolve_context *ctx, const char *lo
 
 bool resolve_context_add_file_method_lp(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
 {
-       return resolve_context_add_file_method(ctx, lp_parm_string(lp_ctx, NULL, "resolv", "host file"));
+       return resolve_context_add_file_method(ctx, lpcfg_parm_string(lp_ctx, NULL, "resolv", "host file"));
 }
index 887e0d543e4e7ec0b21e4a89b0d58941ec22976f..69c05a2ea0ae39ee79997ab17f62eb5026c7370e 100644 (file)
@@ -21,9 +21,9 @@
 #include "libcli/resolve/resolve.h"
 #include "param/param.h"
 
-struct resolve_context *lp_resolve_context(struct loadparm_context *lp_ctx)
+struct resolve_context *lpcfg_resolve_context(struct loadparm_context *lp_ctx)
 {
-       const char **methods = lp_name_resolve_order(lp_ctx);
+       const char **methods = lpcfg_name_resolve_order(lp_ctx);
        int i;
        struct resolve_context *ret = resolve_context_init(lp_ctx);
 
index 03eaf8786fd6a26bd573bae3b6be8a08b5fe4816..989f40e6cda65c791e1960f76ca2992f3cd75a1e 100644 (file)
@@ -77,6 +77,6 @@ bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **a
 bool resolve_context_add_wins_method_lp(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
 {
        struct interface *ifaces;
-       load_interfaces(ctx, lp_interfaces(lp_ctx), &ifaces);
-       return resolve_context_add_wins_method(ctx, lp_wins_server_list(lp_ctx), ifaces, lp_nbt_port(lp_ctx), lp_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
+       load_interfaces(ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+       return resolve_context_add_wins_method(ctx, lpcfg_wins_server_list(lp_ctx), ifaces, lpcfg_nbt_port(lp_ctx), lpcfg_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
 }
index 448e05a6ed46cbd989ce80059c7a3414f85256c7..84d9e78b911fcd4ed0e4944a89299952fb0758ab 100644 (file)
@@ -178,7 +178,7 @@ struct smb_composite_connectmulti {
                int num_dests;
                const char **hostnames;
                const char **addresses;
-               int *ports;     /* Either NULL for lp_smb_ports() per
+               int *ports;     /* Either NULL for lpcfg_smb_ports() per
                                 * destination or a list of explicit ports */
        } in;
        struct {
index 75cb34f6327dfa6387d6628bb8e13d7ccee81c57..032be8f79f1d0831fbb58273df8e0ec0ed4f3d86 100644 (file)
@@ -136,7 +136,7 @@ NTSTATUS wrepl_socket_split_stream(struct wrepl_socket *wrepl_socket,
 const char *wrepl_best_ip(struct loadparm_context *lp_ctx, const char *peer_ip)
 {
        struct interface *ifaces;
-       load_interfaces(lp_ctx, lp_interfaces(lp_ctx), &ifaces);
+       load_interfaces(lp_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
        return iface_best_ip(ifaces, peer_ip);
 }
 
index 86cf80b4da8742e4a314eb6e1affee75226f0bb6..05f18b42a5f993d697e4ccf61466f68bad45fa61 100644 (file)
@@ -46,7 +46,7 @@ struct libnet_context *libnet_context_init(struct tevent_context *ev,
        dcerpc_init(lp_ctx);
 
        /* name resolution methods */
-       ctx->resolve_ctx = lp_resolve_context(lp_ctx);
+       ctx->resolve_ctx = lpcfg_resolve_context(lp_ctx);
 
        /* connected services' params */
        ZERO_STRUCT(ctx->samr);
index 833f5d3bd605c755db1d2aeb0f65c09f8645c9d9..828fd521d95051ccf8f756cd040149be01681d0f 100644 (file)
@@ -740,7 +740,7 @@ struct libnet_BecomeDC_state {
 static int32_t get_dc_function_level(struct loadparm_context *lp_ctx)
 {
        /* per default we are (Windows) 2008 R2 compatible */
-       return lp_parm_int(lp_ctx, NULL, "ads", "dc function level",
+       return lpcfg_parm_int(lp_ctx, NULL, "ads", "dc function level",
                           DS_DOMAIN_FUNCTION_2008_R2);
 }
 
@@ -766,7 +766,7 @@ static void becomeDC_send_cldap(struct libnet_BecomeDC_state *s)
 
        ret = tsocket_address_inet_from_strings(s, "ip",
                                                s->source_dsa.address,
-                                               lp_cldap_port(s->libnet->lp_ctx),
+                                               lpcfg_cldap_port(s->libnet->lp_ctx),
                                                &dest_address);
        if (ret != 0) {
                c->status = map_nt_error_from_unix(errno);
@@ -1549,12 +1549,12 @@ static void becomeDC_drsuapi_connect_send(struct libnet_BecomeDC_state *s,
                 *       configuration partition works fine, but it fails for
                 *       the domain partition.
                 */
-               if (lp_parm_bool(s->libnet->lp_ctx, NULL, "become_dc",
+               if (lpcfg_parm_bool(s->libnet->lp_ctx, NULL, "become_dc",
                                 "force krb5", true))
                {
                        krb5_str = "krb5,";
                }
-               if (lp_parm_bool(s->libnet->lp_ctx, NULL, "become_dc",
+               if (lpcfg_parm_bool(s->libnet->lp_ctx, NULL, "become_dc",
                                 "print", false))
                {
                        print_str = "print,";
@@ -2905,7 +2905,7 @@ static void becomeDC_drsuapi_update_refs_send(struct libnet_BecomeDC_state *s,
        r->in.req.req1.options          = DRSUAPI_DRS_ADD_REF | DRSUAPI_DRS_DEL_REF;
 
        /* I think this is how we mark ourselves as a RODC */
-       if (!lp_parm_bool(s->libnet->lp_ctx, NULL, "repl", "RODC", false)) {
+       if (!lpcfg_parm_bool(s->libnet->lp_ctx, NULL, "repl", "RODC", false)) {
                r->in.req.req1.options |= DRSUAPI_DRS_WRIT_REP;
        }
 
index a8edabf760928e96fb94b8e50c356f64a244355c..dd533355adf35f0d036453b753a70481c24e1748 100644 (file)
@@ -226,7 +226,7 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
                return NT_STATUS_NO_MEMORY;
        }
 
-       remote_ldb = ldb_wrap_connect(tmp_ctx, ctx->event_ctx, ctx->lp_ctx, 
+       remote_ldb = ldb_wrap_connect(tmp_ctx, ctx->event_ctx, ctx->lp_ctx,
                                      remote_ldb_url, 
                                      NULL, ctx->cred, 0);
        if (!remote_ldb) {
@@ -560,8 +560,8 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru
                        connect_with_info->out.domain_name = talloc_strdup(tmp_ctx, r->in.domain_name);
                } else {
                        /* Bugger, we just lost our way to automatically find the domain name */
-                       connect_with_info->out.domain_name = talloc_strdup(tmp_ctx, lp_workgroup(ctx->lp_ctx));
-                       connect_with_info->out.realm = talloc_strdup(tmp_ctx, lp_realm(ctx->lp_ctx));
+                       connect_with_info->out.domain_name = talloc_strdup(tmp_ctx, lpcfg_workgroup(ctx->lp_ctx));
+                       connect_with_info->out.realm = talloc_strdup(tmp_ctx, lpcfg_realm(ctx->lp_ctx));
                }
        }
 
@@ -934,7 +934,7 @@ static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx,
        if (r->in.netbios_name != NULL) {
                netbios_name = r->in.netbios_name;
        } else {
-               netbios_name = talloc_strdup(tmp_mem, lp_netbios_name(ctx->lp_ctx));
+               netbios_name = talloc_strdup(tmp_mem, lpcfg_netbios_name(ctx->lp_ctx));
                if (!netbios_name) {
                        r->out.error_string = NULL;
                        talloc_free(tmp_mem);
index 177292c7cd066dd998f74540c4132e48fb85f18f..43a7654d4b80044d23f0de909f566cf5c65a5205 100644 (file)
@@ -193,11 +193,11 @@ struct composite_context* libnet_LookupDCs_send(struct libnet_context *ctx,
        struct composite_context *c;
        struct messaging_context *msg_ctx = 
                messaging_client_init(mem_ctx,
-                                                         lp_messaging_path(mem_ctx, ctx->lp_ctx), 
+                                                         lpcfg_messaging_path(mem_ctx, ctx->lp_ctx),
                                                          ctx->event_ctx);
 
-       c = finddcs_send(mem_ctx, lp_netbios_name(ctx->lp_ctx),
-                                        lp_nbt_port(ctx->lp_ctx), io->in.domain_name,
+       c = finddcs_send(mem_ctx, lpcfg_netbios_name(ctx->lp_ctx),
+                                        lpcfg_nbt_port(ctx->lp_ctx), io->in.domain_name,
                                         io->in.name_type, NULL, ctx->resolve_ctx,
                                         ctx->event_ctx, msg_ctx);
        return c;
index 8092260515b97e0da47b35d21ea5a1576b8b0c27..ab58598f296d99565500b2c7a0814b88a6826e74 100644 (file)
@@ -185,7 +185,7 @@ NTSTATUS libnet_SamDump(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
                        if (strcasecmp_m(s->name, secret_name) != 0) {
                                continue;
                        }
-                       if (!convert_string_talloc_convenience(mem_ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF16, CH_UNIX, 
+                       if (!convert_string_talloc_convenience(mem_ctx, lpcfg_iconv_convenience(ctx->lp_ctx), CH_UTF16, CH_UNIX,
                                                  s->secret.data, s->secret.length, 
                                                  (void **)&secret_string, NULL, false)) {
                                r->out.error_string = talloc_asprintf(mem_ctx, 
index 05b0c13862311f1b27aae2db4cdaf43e5a4c5c87..b9e93cf7c8c05e5c8eadbf633fd0a2dbdaba6bec 100644 (file)
@@ -1186,7 +1186,7 @@ static NTSTATUS libnet_samsync_ldb_init(TALLOC_CTX *mem_ctx,
                
                state->remote_ldb = ldb_wrap_connect(mem_ctx, 
                                                     state->samsync_state->machine_net_ctx->event_ctx,
-                                                    state->samsync_state->machine_net_ctx->lp_ctx, 
+                                                    state->samsync_state->machine_net_ctx->lp_ctx,
                                                     ldap_url, 
                                                     NULL, state->samsync_state->machine_net_ctx->cred,
                                                     0);
@@ -1215,7 +1215,7 @@ NTSTATUS libnet_samsync_ldb(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, str
 
        state->sam_ldb         = samdb_connect(mem_ctx, 
                                               ctx->event_ctx,
-                                              ctx->lp_ctx, 
+                                              ctx->lp_ctx,
                                               r->in.session_info);
        if (!state->sam_ldb) {
                return NT_STATUS_INTERNAL_DB_ERROR;
index bd6dfbf4217f7ea5e429c603d719dcbffc3431a5..e4f037d0b8491e3894cef468c1df6cdf1015f3ee 100644 (file)
@@ -168,7 +168,7 @@ NTSTATUS libnet_JoinSite(struct libnet_context *ctx,
        }
 
        make_nbt_name_client(&name, libnet_r->out.samr_binding->host);
-       status = resolve_name(lp_resolve_context(ctx->lp_ctx), &name, r, &dest_addr, ctx->event_ctx);
+       status = resolve_name(lpcfg_resolve_context(ctx->lp_ctx), &name, r, &dest_addr, ctx->event_ctx);
        if (!NT_STATUS_IS_OK(status)) {
                libnet_r->out.error_string = NULL;
                talloc_free(tmp_ctx);
@@ -179,7 +179,7 @@ NTSTATUS libnet_JoinSite(struct libnet_context *ctx,
        r->in.dest_address = dest_addr;
        r->in.netbios_name = libnet_r->in.netbios_name;
        r->in.domain_dn_str = libnet_r->out.domain_dn_str;
-       r->in.cldap_port = lp_cldap_port(ctx->lp_ctx);
+       r->in.cldap_port = lpcfg_cldap_port(ctx->lp_ctx);
 
        status = libnet_FindSite(tmp_ctx, ctx, r);
        if (!NT_STATUS_IS_OK(status)) {
index a8b53df56d3325fc6e84e06c3dee4f8d349f9361..cf0142da8625caa7b80d3f6e4694a7fef0a3f12a 100644 (file)
@@ -274,7 +274,7 @@ static void unbecomeDC_send_cldap(struct libnet_UnbecomeDC_state *s)
 
        ret = tsocket_address_inet_from_strings(s, "ip",
                                                s->source_dsa.address,
-                                               lp_cldap_port(s->libnet->lp_ctx),
+                                               lpcfg_cldap_port(s->libnet->lp_ctx),
                                                &dest_address);
        if (ret != 0) {
                c->status = map_nt_error_from_unix(errno);
index 9f1f9626bf8df0165e7b4a9af57e10793e691b2a..b85869e93ea7ac3b589dee927e4b0a55838c04b2 100644 (file)
@@ -378,7 +378,7 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s
                return werror_to_ntstatus(status);
        }
 
-       if (lp_parm_bool(s->lp_ctx, NULL, "become dc", "dump objects", false)) {
+       if (lpcfg_parm_bool(s->lp_ctx, NULL, "become dc", "dump objects", false)) {
                for (i=0; i < schema_objs->num_objects; i++) {
                        struct ldb_ldif ldif;
                        fprintf(stdout, "#\n");
@@ -652,7 +652,7 @@ NTSTATUS libnet_vampire_cb_store_chunk(void *private_data,
                return werror_to_ntstatus(status);
        }
 
-       if (lp_parm_bool(s->lp_ctx, NULL, "become dc", "dump objects", false)) {
+       if (lpcfg_parm_bool(s->lp_ctx, NULL, "become dc", "dump objects", false)) {
                for (i=0; i < objs->num_objects; i++) {
                        struct ldb_ldif ldif;
                        fprintf(stdout, "#\n");
@@ -689,7 +689,7 @@ NTSTATUS libnet_vampire_cb_store_chunk(void *private_data,
                        return NT_STATUS_FOOBAR;
                }
 
-               if (lp_parm_bool(s->lp_ctx, NULL, "become dc", "dump objects", false)) {
+               if (lpcfg_parm_bool(s->lp_ctx, NULL, "become dc", "dump objects", false)) {
                        DEBUG(0,("# %s\n", sa->lDAPDisplayName));
                        NDR_PRINT_DEBUG(drsuapi_DsReplicaLinkedAttribute, &linked_attributes[i]);
                        dump_data(0,
@@ -727,7 +727,7 @@ NTSTATUS libnet_Vampire(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
        if (r->in.netbios_name != NULL) {
                netbios_name = r->in.netbios_name;
        } else {
-               netbios_name = talloc_reference(join, lp_netbios_name(ctx->lp_ctx));
+               netbios_name = talloc_reference(join, lpcfg_netbios_name(ctx->lp_ctx));
                if (!netbios_name) {
                        talloc_free(join);
                        r->out.error_string = NULL;
@@ -780,8 +780,8 @@ NTSTATUS libnet_Vampire(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
        /* Now set these values into the smb.conf - we probably had
         * empty or useless defaults here from whatever smb.conf we
         * started with */
-       lp_set_cmdline(s->lp_ctx, "realm", join->out.realm);
-       lp_set_cmdline(s->lp_ctx, "workgroup", join->out.domain_name);
+       lpcfg_set_cmdline(s->lp_ctx, "realm", join->out.realm);
+       lpcfg_set_cmdline(s->lp_ctx, "workgroup", join->out.domain_name);
 
        b.in.domain_dns_name            = join->out.realm;
        b.in.domain_netbios_name        = join->out.domain_name;
@@ -796,7 +796,7 @@ NTSTATUS libnet_Vampire(struct libnet_context *ctx, TALLOC_CTX *mem_ctx,
        b.in.callbacks.config_chunk     = libnet_vampire_cb_store_chunk;
        b.in.callbacks.domain_chunk     = libnet_vampire_cb_store_chunk;
 
-       b.in.rodc_join = lp_parm_bool(s->lp_ctx, NULL, "repl", "RODC", false);
+       b.in.rodc_join = lpcfg_parm_bool(s->lp_ctx, NULL, "repl", "RODC", false);
 
        status = libnet_BecomeDC(ctx, s, &b);
        if (!NT_STATUS_IS_OK(status)) {
index 9b5fa5d76b035652a3f97f022e210cc567231bcd..f5eea223e6e75cd2fb754de347ef434891558e4d 100644 (file)
@@ -281,7 +281,7 @@ static PyObject *py_net_vampire(py_net_Object *self, PyObject *args, PyObject *k
                return NULL;
        }
 
-       r.in.netbios_name  = lp_netbios_name(self->libnet_ctx->lp_ctx);
+       r.in.netbios_name  = lpcfg_netbios_name(self->libnet_ctx->lp_ctx);
        r.out.error_string = NULL;
 
        mem_ctx = talloc_new(NULL);
@@ -346,7 +346,7 @@ static PyObject *net_obj_new(PyTypeObject *type, PyObject *args, PyObject *kwarg
        ret->ev = s4_event_context_init(NULL);
        ret->mem_ctx = talloc_new(ret->ev);
 
-       lp = lp_from_py_object(ret->mem_ctx, py_lp);
+       lp = lpcfg_from_py_object(ret->mem_ctx, py_lp);
        if (lp == NULL) {
                Py_DECREF(ret);
                return NULL;
index bd371be2d3aac26af3079512f0c3c9911382f443..7779d31f9924c7a6e5acf5aee80f1f75eec52645 100644 (file)
@@ -111,19 +111,19 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb_send(TALLOC_CT
        /* prepare smb connection parameters: we're connecting to IPC$ share on
           remote rpc server */
        conn->in.dest_host              = s->io.binding->host;
-       conn->in.dest_ports                  = lp_smb_ports(lp_ctx);
+       conn->in.dest_ports                  = lpcfg_smb_ports(lp_ctx);
        if (s->io.binding->target_hostname == NULL)
                conn->in.called_name = "*SMBSERVER"; /* FIXME: This is invalid */
        else
                conn->in.called_name            = s->io.binding->target_hostname;
-       conn->in.socket_options         = lp_socket_options(lp_ctx);
+       conn->in.socket_options         = lpcfg_socket_options(lp_ctx);
        conn->in.service                = "IPC$";
        conn->in.service_type           = NULL;
-       conn->in.workgroup              = lp_workgroup(lp_ctx);
-       conn->in.gensec_settings = lp_gensec_settings(conn, lp_ctx);
+       conn->in.workgroup              = lpcfg_workgroup(lp_ctx);
+       conn->in.gensec_settings = lpcfg_gensec_settings(conn, lp_ctx);
 
-       lp_smbcli_options(lp_ctx, &conn->in.options);
-       lp_smbcli_session_options(lp_ctx, &conn->in.session_options);
+       lpcfg_smbcli_options(lp_ctx, &conn->in.options);
+       lpcfg_smbcli_session_options(lp_ctx, &conn->in.session_options);
 
        /*
         * provide proper credentials - user supplied, but allow a
@@ -244,18 +244,18 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb2_send(
                cli_credentials_guess(s->io.creds, lp_ctx);
        }
 
-       lp_smbcli_options(lp_ctx, &options);
+       lpcfg_smbcli_options(lp_ctx, &options);
 
        /* send smb2 connect request */
        conn_req = smb2_connect_send(mem_ctx, s->io.binding->host, 
-                       lp_parm_string_list(mem_ctx, lp_ctx, NULL, "smb2", "ports", NULL),
+                       lpcfg_parm_string_list(mem_ctx, lp_ctx, NULL, "smb2", "ports", NULL),
                                        "IPC$", 
                                     s->io.resolve_ctx,
                                     s->io.creds,
                                     c->event_ctx,
                                     &options,
-                                        lp_socket_options(lp_ctx),
-                                        lp_gensec_settings(mem_ctx, lp_ctx)
+                                        lpcfg_socket_options(lp_ctx),
+                                        lpcfg_gensec_settings(mem_ctx, lp_ctx)
                                         );
        composite_continue(c, conn_req, continue_smb2_connect, c);
        return c;
@@ -462,7 +462,7 @@ static struct composite_context* dcerpc_pipe_connect_ncalrpc_send(TALLOC_CTX *me
        s->io  = *io;
 
        /* send pipe open request */
-       pipe_req = dcerpc_pipe_open_pipe_send(s->io.pipe->conn, lp_ncalrpc_dir(lp_ctx), 
+       pipe_req = dcerpc_pipe_open_pipe_send(s->io.pipe->conn, lpcfg_ncalrpc_dir(lp_ctx),
                                              s->io.binding->endpoint);
        composite_continue(c, pipe_req, continue_pipe_open_ncalrpc, c);
        return c;
@@ -539,7 +539,7 @@ static void continue_connect(struct composite_context *c, struct pipe_connect_st
        pc.binding      = s->binding;
        pc.interface    = s->table;
        pc.creds        = s->credentials;
-       pc.resolve_ctx  = lp_resolve_context(s->lp_ctx);
+       pc.resolve_ctx  = lpcfg_resolve_context(s->lp_ctx);
 
        /* connect dcerpc pipe depending on required transport */
        switch (s->binding->transport) {
@@ -746,7 +746,7 @@ _PUBLIC_ struct composite_context* dcerpc_pipe_connect_b_send(TALLOC_CTX *parent
        if (composite_nomem(s->pipe, c)) return c;
 
        if (DEBUGLEVEL >= 10)
-               s->pipe->conn->packet_log_dir = lp_lockdir(lp_ctx);
+               s->pipe->conn->packet_log_dir = lpcfg_lockdir(lp_ctx);
 
        /* store parameters in state structure */
        s->binding      = binding;
index 253748218ac34373c43086fa020a43c305179959..b8839f9c77a9ccbad8ab9527980a221fa6560a5a 100644 (file)
@@ -327,7 +327,7 @@ static void continue_schannel_key(struct composite_context *ctx)
 
        /* send bind auth request with received creds */
        auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table, s->credentials, 
-                                        lp_gensec_settings(c, s->lp_ctx),
+                                        lpcfg_gensec_settings(c, s->lp_ctx),
                                         DCERPC_AUTH_TYPE_SCHANNEL, s->auth_level,
                                         NULL);
        if (composite_nomem(auth_req, c)) return;
index b2bd145d1af5663ca70661610e3149611dc2ee91..280115eb90821ea99ab6646079c506cfaed0261c 100644 (file)
@@ -460,7 +460,7 @@ static void continue_ntlmssp_connection(struct composite_context *ctx)
        /* initiate a authenticated bind */
        auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
                                         s->credentials, 
-                                        lp_gensec_settings(c, s->lp_ctx),
+                                        lpcfg_gensec_settings(c, s->lp_ctx),
                                         DCERPC_AUTH_TYPE_NTLMSSP,
                                         dcerpc_auth_level(s->pipe->conn),
                                         s->table->authservices->names[0]);
@@ -493,7 +493,7 @@ static void continue_spnego_after_wrong_pass(struct composite_context *ctx)
        /* initiate a authenticated bind */
        auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
                                         s->credentials, 
-                                        lp_gensec_settings(c, s->lp_ctx), 
+                                        lpcfg_gensec_settings(c, s->lp_ctx),
                                         DCERPC_AUTH_TYPE_SPNEGO,
                                         dcerpc_auth_level(s->pipe->conn),
                                         s->table->authservices->names[0]);
@@ -618,7 +618,7 @@ struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p,
                /* try SPNEGO with fallback to NTLMSSP */
                auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
                                                 s->credentials, 
-                                                lp_gensec_settings(c, s->lp_ctx), 
+                                                lpcfg_gensec_settings(c, s->lp_ctx),
                                                 DCERPC_AUTH_TYPE_SPNEGO,
                                                 dcerpc_auth_level(conn),
                                                 s->table->authservices->names[0]);
@@ -628,7 +628,7 @@ struct composite_context *dcerpc_pipe_auth_send(struct dcerpc_pipe *p,
 
        auth_req = dcerpc_bind_auth_send(c, s->pipe, s->table,
                                         s->credentials, 
-                                        lp_gensec_settings(c, s->lp_ctx), 
+                                        lpcfg_gensec_settings(c, s->lp_ctx),
                                         auth_type,
                                         dcerpc_auth_level(conn),
                                         s->table->authservices->names[0]);
index d0f9878b317ef749eba75179b64e417c9daa5e91..258e4584be961ad26007698b92433281f8d26e03 100644 (file)
@@ -317,7 +317,7 @@ PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, Py
                return NULL;
        }
 
-       lp_ctx = lp_from_py_object(mem_ctx, py_lp_ctx);
+       lp_ctx = lpcfg_from_py_object(mem_ctx, py_lp_ctx);
        if (lp_ctx == NULL) {
                PyErr_SetString(PyExc_TypeError, "Expected loadparm context");
                talloc_free(mem_ctx);
@@ -411,7 +411,7 @@ static PyObject *dcerpc_interface_new(PyTypeObject *type, PyObject *args, PyObje
                return NULL;
        }
 
-       lp_ctx = lp_from_py_object(mem_ctx, py_lp_ctx);
+       lp_ctx = lpcfg_from_py_object(mem_ctx, py_lp_ctx);
        if (lp_ctx == NULL) {
                PyErr_SetString(PyExc_TypeError, "Expected loadparm context");
                talloc_free(mem_ctx);
index c9d864c3c37da8893b2700c8757b2b0d35f8f934..8e231ccc23326cfd28818cbcc5dcd39793b10122 100644 (file)
@@ -55,13 +55,13 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
 
        samctx = iface->nbtsrv->sam_ctx;
 
-       if (lp_server_role(iface->nbtsrv->task->lp_ctx) != ROLE_DOMAIN_CONTROLLER
+       if (lpcfg_server_role(iface->nbtsrv->task->lp_ctx) != ROLE_DOMAIN_CONTROLLER
            || !samdb_is_pdc(samctx)) {
                DEBUG(2, ("Not a PDC, so not processing LOGON_PRIMARY_QUERY\n"));
                return;         
        }
 
-       if (strcasecmp_m(name->name, lp_workgroup(iface->nbtsrv->task->lp_ctx)) != 0) {
+       if (strcasecmp_m(name->name, lpcfg_workgroup(iface->nbtsrv->task->lp_ctx)) != 0) {
                DEBUG(5,("GetDC requested for a domian %s that we don't host\n", name->name));
                return;
        }
@@ -72,16 +72,16 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
        pdc = &netlogon_response.data.get_pdc;
 
        pdc->command = NETLOGON_RESPONSE_FROM_PDC;
-       pdc->pdc_name         = lp_netbios_name(iface->nbtsrv->task->lp_ctx);
+       pdc->pdc_name         = lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx);
        pdc->unicode_pdc_name = pdc->pdc_name;
-       pdc->domain_name      = lp_workgroup(iface->nbtsrv->task->lp_ctx);
+       pdc->domain_name      = lpcfg_workgroup(iface->nbtsrv->task->lp_ctx);
        pdc->nt_version       = 1;
        pdc->lmnt_token       = 0xFFFF;
        pdc->lm20_token       = 0xFFFF;
 
        dgram_mailslot_netlogon_reply(reply_iface->dgmsock, 
                                      packet, 
-                                     lp_netbios_name(iface->nbtsrv->task->lp_ctx),
+                                     lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx),
                                      netlogon->req.pdc.mailslot_name,
                                      &netlogon_response);
 }
@@ -137,7 +137,7 @@ static void nbtd_netlogon_samlogon(struct dgram_mailslot_handler *dgmslot,
 
        dgram_mailslot_netlogon_reply(reply_iface->dgmsock, 
                                      packet, 
-                                     lp_netbios_name(iface->nbtsrv->task->lp_ctx),
+                                     lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx),
                                      netlogon->req.logon.mailslot_name,
                                      &netlogon_response);
 }
index 87e76e08eebe42e73fef6912fb318287cc13207e..978d354abc5428c4ece2bd4f7a5caf14248534f0 100644 (file)
@@ -51,9 +51,9 @@ static void nbtd_ntlogon_sam_logon(struct dgram_mailslot_handler *dgmslot,
        logon = &reply.req.reply;
 
        logon->server           = talloc_asprintf(packet, "\\\\%s", 
-                                                 lp_netbios_name(iface->nbtsrv->task->lp_ctx));
+                                                 lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx));
        logon->user_name        = ntlogon->req.logon.user_name;
-       logon->domain           = lp_workgroup(iface->nbtsrv->task->lp_ctx);
+       logon->domain           = lpcfg_workgroup(iface->nbtsrv->task->lp_ctx);
        logon->nt_version       = 1;
        logon->lmnt_token       = 0xFFFF;
        logon->lm20_token       = 0xFFFF;
@@ -62,7 +62,7 @@ static void nbtd_ntlogon_sam_logon(struct dgram_mailslot_handler *dgmslot,
 
        dgram_mailslot_ntlogon_reply(reply_iface->dgmsock, 
                                     packet, 
-                                    lp_netbios_name(iface->nbtsrv->task->lp_ctx),
+                                    lpcfg_netbios_name(iface->nbtsrv->task->lp_ctx),
                                     ntlogon->req.logon.mailslot_name,
                                     &reply);
 }
index 4a3bd133685558ca653465085b284cf7d326a6a7..0e9a0459458c185a60b862556756701d3383aa85 100644 (file)
@@ -83,7 +83,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
        
                bcast_addr = socket_address_from_strings(tmp_ctx, bcast_dgmsock->sock->backend_name, 
                                                         iface->bcast_address, 
-                                                        lp_dgram_port(iface->nbtsrv->task->lp_ctx));
+                                                        lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx));
                if (!bcast_addr) {
                        talloc_free(tmp_ctx);
                        return NT_STATUS_NO_MEMORY;
@@ -93,7 +93,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
                if (!NT_STATUS_IS_OK(status)) {
                        talloc_free(tmp_ctx);
                        DEBUG(0,("Failed to bind to %s:%d - %s\n", 
-                                iface->bcast_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx), 
+                                iface->bcast_address, lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx),
                                 nt_errstr(status)));
                        return status;
                }
@@ -109,7 +109,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
        }
 
        bind_addr = socket_address_from_strings(tmp_ctx, iface->dgmsock->sock->backend_name, 
-                                               bind_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx));
+                                               bind_address, lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx));
        if (!bind_addr) {
                talloc_free(tmp_ctx);
                return NT_STATUS_NO_MEMORY;
@@ -119,7 +119,7 @@ NTSTATUS nbtd_dgram_setup(struct nbtd_interface *iface, const char *bind_address
        if (!NT_STATUS_IS_OK(status)) {
                talloc_free(tmp_ctx);
                DEBUG(0,("Failed to bind to %s:%d - %s\n", 
-                        bind_address, lp_dgram_port(iface->nbtsrv->task->lp_ctx), nt_errstr(status)));
+                        bind_address, lpcfg_dgram_port(iface->nbtsrv->task->lp_ctx), nt_errstr(status)));
                return status;
        }
 
index 19639dd167eca7ee53f28faacfe5406bd8e53cb6..bd2143e26ce3cb39d2d27dfc2fa8cb18dff719ac 100644 (file)
@@ -193,7 +193,7 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
                }
 
                bcast_address = socket_address_from_strings(bcast_nbtsock, bcast_nbtsock->sock->backend_name, 
-                                                           bcast, lp_nbt_port(lp_ctx));
+                                                           bcast, lpcfg_nbt_port(lp_ctx));
                if (!bcast_address) {
                        talloc_free(iface);
                        return NT_STATUS_NO_MEMORY;
@@ -202,7 +202,7 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
                status = socket_listen(bcast_nbtsock->sock, bcast_address, 0, 0);
                if (!NT_STATUS_IS_OK(status)) {
                        DEBUG(0,("Failed to bind to %s:%d - %s\n", 
-                                bcast, lp_nbt_port(lp_ctx), nt_errstr(status)));
+                                bcast, lpcfg_nbt_port(lp_ctx), nt_errstr(status)));
                        talloc_free(iface);
                        return status;
                }
@@ -220,12 +220,12 @@ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv,
 
        unicast_address = socket_address_from_strings(iface->nbtsock, 
                                                      iface->nbtsock->sock->backend_name, 
-                                                     bind_address, lp_nbt_port(lp_ctx));
+                                                     bind_address, lpcfg_nbt_port(lp_ctx));
 
        status = socket_listen(iface->nbtsock->sock, unicast_address, 0, 0);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Failed to bind to %s:%d - %s\n", 
-                        bind_address, lp_nbt_port(lp_ctx), nt_errstr(status)));
+                        bind_address, lpcfg_nbt_port(lp_ctx), nt_errstr(status)));
                talloc_free(iface);
                return status;
        }
@@ -283,7 +283,7 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con
 
        /* if we are allowing incoming packets from any address, then
           we also need to bind to the wildcard address */
-       if (!lp_bind_interfaces_only(lp_ctx)) {
+       if (!lpcfg_bind_interfaces_only(lp_ctx)) {
                const char *primary_address;
 
                /* the primary address is the address we will return
@@ -293,7 +293,7 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con
                        primary_address = iface_n_ip(ifaces, 0);
                } else {
                        primary_address = inet_ntoa(interpret_addr2(
-                                                       lp_netbios_name(lp_ctx)));
+                                                       lpcfg_netbios_name(lp_ctx)));
                }
                primary_address = talloc_strdup(tmp_ctx, primary_address);
                NT_STATUS_HAVE_NO_MEMORY(primary_address);
@@ -318,12 +318,12 @@ NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_con
                bcast   = talloc_strdup(tmp_ctx, bcast);
                netmask = talloc_strdup(tmp_ctx, iface_n_netmask(ifaces, i));
 
-               status = nbtd_add_socket(nbtsrv, lp_ctx, 
+               status = nbtd_add_socket(nbtsrv, lp_ctx,
                                         address, address, bcast, netmask);
                NT_STATUS_NOT_OK_RETURN(status);
        }
 
-       if (lp_wins_server_list(lp_ctx)) {
+       if (lpcfg_wins_server_list(lp_ctx)) {
                status = nbtd_add_wins_socket(nbtsrv);
                NT_STATUS_NOT_OK_RETURN(status);
        }
index 38abf7135e967d95320cd5f7b3b4e1fb71719e11..2ffa91158737a36890d9481308b6fa1c0287b009 100644 (file)
@@ -39,7 +39,7 @@ static void nbtd_task_init(struct task_server *task)
        NTSTATUS status;
        struct interface *ifaces;
 
-       load_interfaces(task, lp_interfaces(task->lp_ctx), &ifaces);
+       load_interfaces(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
 
        if (iface_count(ifaces) == 0) {
                task_server_terminate(task, "nbtd: no network interfaces configured", false);
index ff4e94fef9ecfc2591a62965b62f174774fef421..af96a0130b5fdeb72ccb9df0a7cbc9b6924649b9 100644 (file)
@@ -79,7 +79,7 @@ bool nbtd_self_packet(struct nbt_name_socket *nbtsock,
        struct nbtd_server *nbtsrv = iface->nbtsrv;
        
        /* if its not from the nbt port, then it wasn't a broadcast from us */
-       if (src->port != lp_nbt_port(iface->nbtsrv->task->lp_ctx)) {
+       if (src->port != lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx)) {
                return false;
        }
 
index be1492f1cd1bb4bc8ca4f03a5d0011673d8585f6..c888dcaca1535dd567aea8702e06770e8358bef4 100644 (file)
@@ -82,7 +82,7 @@ void nbtd_request_query(struct nbt_name_socket *nbtsock,
        if (!(packet->operation & NBT_FLAG_BROADCAST) &&
           (packet->operation & NBT_FLAG_RECURSION_DESIRED) &&
           (iname->nb_flags & NBT_NM_GROUP) &&
-          lp_wins_support(iface->nbtsrv->task->lp_ctx)) {
+          lpcfg_wins_support(iface->nbtsrv->task->lp_ctx)) {
                nbtd_winsserver_request(nbtsock, packet, src);
                return;
        }
index a2840ab5c03c4ba9b17ee479ffb2254299f92340..b151fd285d7bc6d3c63fce53e9602d7edbb312ec 100644 (file)
@@ -93,7 +93,7 @@ static void name_refresh_handler(struct tevent_context *ev, struct tevent_timer
           registration packets */
        io.in.name            = iname->name;
        io.in.dest_addr       = iface->bcast_address;
-       io.in.dest_port       = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+       io.in.dest_port       = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
        io.in.address         = iface->ip_address;
        io.in.nb_flags        = iname->nb_flags;
        io.in.ttl             = iname->ttl;
@@ -118,7 +118,7 @@ static void name_refresh_handler(struct tevent_context *ev, struct tevent_timer
 static void nbtd_start_refresh_timer(struct nbtd_iface_name *iname)
 {
        uint32_t refresh_time;
-       uint32_t max_refresh_time = lp_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
+       uint32_t max_refresh_time = lpcfg_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
 
        refresh_time = MIN(max_refresh_time, iname->ttl/2);
        
@@ -171,7 +171,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
                                     uint16_t nb_flags)
 {
        struct nbtd_iface_name *iname;
-       const char *scope = lp_netbios_scope(iface->nbtsrv->task->lp_ctx);
+       const char *scope = lpcfg_netbios_scope(iface->nbtsrv->task->lp_ctx);
        struct nbt_name_register_bcast io;
        struct composite_context *creq;
        struct nbtd_server *nbtsrv = iface->nbtsrv;
@@ -188,7 +188,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(iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "bcast_ttl", 300000);
+       iname->ttl               = lpcfg_parm_int(iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "bcast_ttl", 300000);
        iname->registration_time = timeval_zero();
        iname->wins_server       = NULL;
 
@@ -211,7 +211,7 @@ static void nbtd_register_name_iface(struct nbtd_interface *iface,
        /* setup a broadcast name registration request */
        io.in.name            = iname->name;
        io.in.dest_addr       = iface->bcast_address;
-       io.in.dest_port       = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+       io.in.dest_port       = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
        io.in.address         = iface->ip_address;
        io.in.nb_flags        = nb_flags;
        io.in.ttl             = iname->ttl;
@@ -262,29 +262,29 @@ void nbtd_register_names(struct nbtd_server *nbtsrv)
 
        /* note that we don't initially mark the names "ACTIVE". They are 
           marked active once registration is successful */
-       nbtd_register_name(nbtsrv, lp_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
-       nbtd_register_name(nbtsrv, lp_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_USER,   nb_flags);
-       nbtd_register_name(nbtsrv, lp_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_SERVER, nb_flags);
+       nbtd_register_name(nbtsrv, lpcfg_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
+       nbtd_register_name(nbtsrv, lpcfg_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_USER,   nb_flags);
+       nbtd_register_name(nbtsrv, lpcfg_netbios_name(nbtsrv->task->lp_ctx), NBT_NAME_SERVER, nb_flags);
 
-       aliases = lp_netbios_aliases(nbtsrv->task->lp_ctx);
+       aliases = lpcfg_netbios_aliases(nbtsrv->task->lp_ctx);
        while (aliases && aliases[0]) {
                nbtd_register_name(nbtsrv, aliases[0], NBT_NAME_CLIENT, nb_flags);
                nbtd_register_name(nbtsrv, aliases[0], NBT_NAME_SERVER, nb_flags);
                aliases++;
        }
 
-       if (lp_server_role(nbtsrv->task->lp_ctx) == ROLE_DOMAIN_CONTROLLER)     {
+       if (lpcfg_server_role(nbtsrv->task->lp_ctx) == ROLE_DOMAIN_CONTROLLER)  {
                bool is_pdc = samdb_is_pdc(nbtsrv->sam_ctx);
                if (is_pdc) {
-                       nbtd_register_name(nbtsrv, lp_workgroup(nbtsrv->task->lp_ctx),
+                       nbtd_register_name(nbtsrv, lpcfg_workgroup(nbtsrv->task->lp_ctx),
                                           NBT_NAME_PDC, nb_flags);
                }
-               nbtd_register_name(nbtsrv, lp_workgroup(nbtsrv->task->lp_ctx),
+               nbtd_register_name(nbtsrv, lpcfg_workgroup(nbtsrv->task->lp_ctx),
                                   NBT_NAME_LOGON, nb_flags | NBT_NM_GROUP);
        }
 
        nb_flags |= NBT_NM_GROUP;
-       nbtd_register_name(nbtsrv, lp_workgroup(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
+       nbtd_register_name(nbtsrv, lpcfg_workgroup(nbtsrv->task->lp_ctx), NBT_NAME_CLIENT, nb_flags);
 
        nb_flags |= NBT_NM_PERMANENT;
        nbtd_register_name(nbtsrv, "__SAMBA__",       NBT_NAME_CLIENT, nb_flags);
index 93382d7ddc65ba8c28a396e0b84a01d3acb8f709..fd609b2780c8f6f23c1bfcfde749ba9fdf269764 100644 (file)
@@ -89,10 +89,10 @@ static int wins_ldb_init(struct ldb_module *module)
 
        ldb_module_set_private(module, NULL);
 
-       owner = lp_parm_string(lp_ctx, NULL, "winsdb", "local_owner");
+       owner = lpcfg_parm_string(lp_ctx, NULL, "winsdb", "local_owner");
        if (!owner) {
                struct interface *ifaces;
-               load_interfaces(module, lp_interfaces(lp_ctx), &ifaces);
+               load_interfaces(module, lpcfg_interfaces(lp_ctx), &ifaces);
                owner = iface_n_ip(ifaces, 0);
                if (!owner) {
                        owner = "0.0.0.0";
index 94c354a22a19f0a176cde6aa34f581262ae7efd8..bbd943aca147207e84f5c8b29370dbc0cfd3885e 100644 (file)
@@ -58,7 +58,7 @@ static void nbtd_wins_register_retry(struct tevent_context *ev, struct tevent_ti
 static void nbtd_wins_start_refresh_timer(struct nbtd_iface_name *iname)
 {
        uint32_t refresh_time;
-       uint32_t max_refresh_time = lp_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
+       uint32_t max_refresh_time = lpcfg_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "max_refresh_time", 7200);
 
        refresh_time = MIN(max_refresh_time, iname->ttl/2);
        
@@ -141,7 +141,7 @@ static void nbtd_wins_refresh(struct tevent_context *ev, struct tevent_timer *te
        /* setup a wins name refresh request */
        io.in.name            = iname->name;
        io.in.wins_servers    = (const char **)str_list_make_single(tmp_ctx, iname->wins_server);
-       io.in.wins_port       = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+       io.in.wins_port       = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
        io.in.addresses       = nbtd_address_list(iface, tmp_ctx);
        io.in.nb_flags        = iname->nb_flags;
        io.in.ttl             = iname->ttl;
@@ -180,7 +180,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(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "wins_retry", 300);
+               int wins_retry_time = lpcfg_parm_int(iname->iface->nbtsrv->task->lp_ctx, NULL, "nbtd", "wins_retry", 300);
                event_add_timed(iname->iface->nbtsrv->task->event_ctx, 
                                iname,
                                timeval_current_ofs(wins_retry_time, 0),
@@ -237,8 +237,8 @@ void nbtd_winsclient_register(struct nbtd_iface_name *iname)
 
        /* setup a wins name register request */
        io.in.name            = iname->name;
-       io.in.wins_port       = lp_nbt_port(iname->iface->nbtsrv->task->lp_ctx);
-       io.in.wins_servers    = lp_wins_server_list(iname->iface->nbtsrv->task->lp_ctx);
+       io.in.wins_port       = lpcfg_nbt_port(iname->iface->nbtsrv->task->lp_ctx);
+       io.in.wins_servers    = lpcfg_wins_server_list(iname->iface->nbtsrv->task->lp_ctx);
        io.in.addresses       = nbtd_address_list(iface, iname);
        io.in.nb_flags        = iname->nb_flags;
        io.in.ttl             = iname->ttl;
index fef5cc84d57386a1958adeead31ceb74658a7ef7..a0fe87dc68835a78e29d15c76028ffc01277be7e 100644 (file)
@@ -971,11 +971,11 @@ static bool winsdb_check_or_add_module_list(struct tevent_context *ev_ctx,
        talloc_free(h->ldb);
        h->ldb = NULL;
 
-       if (lp_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
+       if (lpcfg_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
                flags |= LDB_FLG_NOSYNC;
        }
 
-       h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)),
+       h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lpcfg_wins_url(lp_ctx)),
                                  NULL, NULL, flags);
        if (!h->ldb) goto failed;
 
@@ -1007,16 +1007,16 @@ struct winsdb_handle *winsdb_connect(TALLOC_CTX *mem_ctx,
        h = talloc_zero(mem_ctx, struct winsdb_handle);
        if (!h) return NULL;
 
-       if (lp_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
+       if (lpcfg_parm_bool(lp_ctx, NULL,"winsdb", "nosync", false)) {
                flags |= LDB_FLG_NOSYNC;
        }
 
-       h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lp_wins_url(lp_ctx)),
+       h->ldb = ldb_wrap_connect(h, ev_ctx, lp_ctx, lock_path(h, lp_ctx, lpcfg_wins_url(lp_ctx)),
                                  NULL, NULL, flags);
        if (!h->ldb) goto failed;       
 
        h->caller = caller;
-       h->hook_script = lp_wins_hook(lp_ctx);
+       h->hook_script = lpcfg_wins_hook(lp_ctx);
 
        h->local_owner = talloc_strdup(h, owner);
        if (!h->local_owner) goto failed;
index ff4c5fdbb96486a82f0434ed869b33c3e14c838f..516258e8925e810f015428efa0b55957f8d80e42 100644 (file)
@@ -415,7 +415,7 @@ static void wins_register_wack(struct nbt_name_socket *nbtsock,
        if (talloc_reference(s, src) == NULL) goto failed;
 
        s->io.in.nbtd_server    = iface->nbtsrv;
-       s->io.in.nbt_port       = lp_nbt_port(iface->nbtsrv->task->lp_ctx);
+       s->io.in.nbt_port       = lpcfg_nbt_port(iface->nbtsrv->task->lp_ctx);
        s->io.in.event_ctx      = iface->nbtsrv->task->event_ctx;
        s->io.in.name           = rec->name;
        s->io.in.num_addresses  = winsdb_addr_list_length(rec->addresses);
@@ -672,7 +672,7 @@ static void nbtd_wins_randomize1Clist(struct loadparm_context *lp_ctx,
        /* first sort the addresses depending on the matching to the client */
        LDB_TYPESAFE_QSORT(addresses, num_addrs, src, nbtd_wins_randomize1Clist_sort);
 
-       mask = lp_parm_string(lp_ctx, NULL, "nbtd", "wins_randomize1Clist_mask");
+       mask = lpcfg_parm_string(lp_ctx, NULL, "nbtd", "wins_randomize1Clist_mask");
        if (!mask) {
                mask = "255.255.255.0";
        }
@@ -750,7 +750,7 @@ static void nbtd_winsserver_query(struct loadparm_context *lp_ctx,
         * Value: 0 = deactivated, 1 = activated
         */
        if (name->type == NBT_NAME_LOGON && 
-           lp_parm_bool(lp_ctx, NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) {
+           lpcfg_parm_bool(lp_ctx, NULL, "nbtd", "wins_prepend1Bto1Cqueries", true)) {
                struct nbt_name name_1b;
 
                name_1b = *name;
@@ -764,7 +764,7 @@ static void nbtd_winsserver_query(struct loadparm_context *lp_ctx,
 
        status = winsdb_lookup(winssrv->wins_db, name, packet, &rec);
        if (!NT_STATUS_IS_OK(status)) {
-               if (!lp_wins_dns_proxy(lp_ctx)) {
+               if (!lpcfg_wins_dns_proxy(lp_ctx)) {
                        goto notfound;
                }
 
@@ -846,7 +846,7 @@ static void nbtd_winsserver_query(struct loadparm_context *lp_ctx,
         * Value: 0 = deactivated, 1 = activated
         */
        if (name->type == NBT_NAME_LOGON && 
-           lp_parm_bool(lp_ctx, NULL, "nbtd", "wins_randomize1Clist", false)) {
+           lpcfg_parm_bool(lp_ctx, NULL, "nbtd", "wins_randomize1Clist", false)) {
                nbtd_wins_randomize1Clist(lp_ctx, addresses, src);
        }
 
@@ -959,7 +959,7 @@ static void nbtd_winsserver_release(struct nbt_name_socket *nbtsock,
                if (strcmp(rec->wins_owner, winssrv->wins_db->local_owner) != 0) {
                        modify_flags = WINSDB_FLAG_ALLOC_VERSION | WINSDB_FLAG_TAKE_OWNERSHIP;
                }
-               if (lp_parm_bool(iface->nbtsrv->task->lp_ctx, NULL, "wreplsrv", "propagate name releases", false)) {
+               if (lpcfg_parm_bool(iface->nbtsrv->task->lp_ctx, NULL, "wreplsrv", "propagate name releases", false)) {
                        /*
                         * We have an option to propagate every name release,
                         * this is off by default to match windows servers
@@ -1038,7 +1038,7 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
        uint32_t tmp;
        const char *owner;
 
-       if (!lp_wins_support(nbtsrv->task->lp_ctx)) {
+       if (!lpcfg_wins_support(nbtsrv->task->lp_ctx)) {
                nbtsrv->winssrv = NULL;
                return NT_STATUS_OK;
        }
@@ -1046,18 +1046,18 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
        nbtsrv->winssrv = talloc_zero(nbtsrv, struct wins_server);
        NT_STATUS_HAVE_NO_MEMORY(nbtsrv->winssrv);
 
-       nbtsrv->winssrv->config.max_renew_interval = lp_max_wins_ttl(nbtsrv->task->lp_ctx);
-       nbtsrv->winssrv->config.min_renew_interval = lp_min_wins_ttl(nbtsrv->task->lp_ctx);
-       tmp = lp_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv", "tombstone_interval", 6*24*60*60);
+       nbtsrv->winssrv->config.max_renew_interval = lpcfg_max_wins_ttl(nbtsrv->task->lp_ctx);
+       nbtsrv->winssrv->config.min_renew_interval = lpcfg_min_wins_ttl(nbtsrv->task->lp_ctx);
+       tmp = lpcfg_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv", "tombstone_interval", 6*24*60*60);
        nbtsrv->winssrv->config.tombstone_interval = tmp;
-       tmp = lp_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60);
+       tmp = lpcfg_parm_int(nbtsrv->task->lp_ctx, NULL, "wreplsrv"," tombstone_timeout", 1*24*60*60);
        nbtsrv->winssrv->config.tombstone_timeout = tmp;
 
-       owner = lp_parm_string(nbtsrv->task->lp_ctx, NULL, "winsdb", "local_owner");
+       owner = lpcfg_parm_string(nbtsrv->task->lp_ctx, NULL, "winsdb", "local_owner");
 
        if (owner == NULL) {
                struct interface *ifaces;
-               load_interfaces(nbtsrv->task, lp_interfaces(nbtsrv->task->lp_ctx), &ifaces);
+               load_interfaces(nbtsrv->task, lpcfg_interfaces(nbtsrv->task->lp_ctx), &ifaces);
                owner = iface_n_ip(ifaces, 0);
        }
 
index a58362830acb94e2749898fa8e11b2b5a1bdfd26..0fd9767b738198e8323b85e239f8c6a480352012 100644 (file)
@@ -163,7 +163,7 @@ static void wins_release_demand_handler(struct nbt_name_request *req)
                if (state->current_address < state->io->in.num_addresses) {
                        struct nbtd_interface *iface;
 
-                       state->release.in.dest_port = lp_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
+                       state->release.in.dest_port = lpcfg_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
                        state->release.in.dest_addr = state->io->in.addresses[state->current_address];
                        state->release.in.address   = state->release.in.dest_addr;
                        state->release.in.timeout   = (state->addresses_left > 1 ? 2 : 1);
@@ -223,7 +223,7 @@ static struct composite_context *wins_release_demand_send(TALLOC_CTX *mem_ctx, s
         *   with 2 retries
         */
        state->release.in.name        = *state->io->in.name;
-       state->release.in.dest_port   = lp_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
+       state->release.in.dest_port   = lpcfg_nbt_port(state->io->in.nbtd_server->task->lp_ctx);
        state->release.in.dest_addr   = state->io->in.addresses[state->current_address];
        state->release.in.address     = state->release.in.dest_addr;
        state->release.in.broadcast   = false;
@@ -306,7 +306,7 @@ NTSTATUS nbtd_proxy_wins_challenge(struct irpc_message *msg,
        s->req = req;
 
        s->io.in.nbtd_server    = nbtd_server;
-       s->io.in.nbt_port       = lp_nbt_port(nbtd_server->task->lp_ctx);
+       s->io.in.nbt_port       = lpcfg_nbt_port(nbtd_server->task->lp_ctx);
        s->io.in.event_ctx      = msg->ev;
        s->io.in.name           = &req->in.name;
        s->io.in.num_addresses  = req->in.num_addrs;
index 3110b20059884fdd6c22ef210397ec647982f64b..029071e2c24afdb20175ce2f75f65b855d36f57a 100644 (file)
@@ -491,9 +491,9 @@ static void ntp_signd_task_init(struct task_server *task)
 
        const char *address;
 
-       if (!directory_create_or_exist(lp_ntp_signd_socket_directory(task->lp_ctx), geteuid(), 0755)) {
+       if (!directory_create_or_exist(lpcfg_ntp_signd_socket_directory(task->lp_ctx), geteuid(), 0755)) {
                char *error = talloc_asprintf(task, "Cannot create NTP signd pipe directory: %s", 
-                                             lp_ntp_signd_socket_directory(task->lp_ctx));
+                                             lpcfg_ntp_signd_socket_directory(task->lp_ctx));
                task_server_terminate(task,
                                      error, true);
                return;
@@ -525,14 +525,14 @@ static void ntp_signd_task_init(struct task_server *task)
                return;
        }
 
-       address = talloc_asprintf(ntp_signd, "%s/socket", lp_ntp_signd_socket_directory(task->lp_ctx));
+       address = talloc_asprintf(ntp_signd, "%s/socket", lpcfg_ntp_signd_socket_directory(task->lp_ctx));
 
        status = stream_setup_socket(ntp_signd->task->event_ctx, 
                                     ntp_signd->task->lp_ctx,
                                     model_ops, 
                                     &ntp_signd_stream_ops, 
                                     "unix", address, NULL,
-                                    lp_socket_options(ntp_signd->task->lp_ctx), 
+                                    lpcfg_socket_options(ntp_signd->task->lp_ctx),
                                     ntp_signd);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("Failed to bind to %s - %s\n",
index ef456f05dff93a129a18c45af5994eaeb5dd2ae5..7197af8bfc4bf858fa343fec3e925108b1c3a391 100644 (file)
@@ -44,7 +44,7 @@
  */
 static struct ldb_context *sptr_db_connect(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx, struct loadparm_context *lp_ctx)
 {
-       return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lp_spoolss_url(lp_ctx), system_session(lp_ctx), 
+       return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lpcfg_spoolss_url(lp_ctx), system_session(lp_ctx),
                                NULL, 0);
 }
 
@@ -129,7 +129,7 @@ static WERROR sptr_PrintServerData(struct ntptr_GenericHandle *server,
                                   union spoolss_PrinterData *r,
                                   enum winreg_Type *type)
 {
-       struct dcerpc_server_info *server_info = lp_dcerpc_server_info(mem_ctx, server->ntptr->lp_ctx);
+       struct dcerpc_server_info *server_info = lpcfg_dcerpc_server_info(mem_ctx, server->ntptr->lp_ctx);
        if (strcmp("W3SvcInstalled", value_name) == 0) {
                *type           = REG_DWORD;
                r->value        = 0;
@@ -212,13 +212,13 @@ static WERROR sptr_PrintServerData(struct ntptr_GenericHandle *server,
                r->binary       = blob;
                return WERR_OK;
        } else if (strcmp("DNSMachineName", value_name) == 0) {
-               const char *dnsdomain = lp_dnsdomain(server->ntptr->lp_ctx);
+               const char *dnsdomain = lpcfg_dnsdomain(server->ntptr->lp_ctx);
 
                if (dnsdomain == NULL) return WERR_INVALID_PARAM;
 
                *type           = REG_SZ;
                r->string       = talloc_asprintf(mem_ctx, "%s.%s",
-                                                         lp_netbios_name(server->ntptr->lp_ctx),
+                                                         lpcfg_netbios_name(server->ntptr->lp_ctx),
                                                          dnsdomain);
                W_ERROR_HAVE_NO_MEMORY(r->string);
                return WERR_OK;
index 9821d2751b6f1f4fe0f48edf5edde8c86fa0df90..a8cd89a2ec6d27ad655b083ee4ad0e29c2db9400 100644 (file)
@@ -231,24 +231,24 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
 
        /* connect to the server, using the smbd event context */
        io.in.dest_host = host;
-       io.in.dest_ports = lp_smb_ports(ntvfs->ctx->lp_ctx);
-       io.in.socket_options = lp_socket_options(ntvfs->ctx->lp_ctx);
+       io.in.dest_ports = lpcfg_smb_ports(ntvfs->ctx->lp_ctx);
+       io.in.socket_options = lpcfg_socket_options(ntvfs->ctx->lp_ctx);
        io.in.called_name = host;
        io.in.credentials = credentials;
        io.in.fallback_to_anonymous = false;
-       io.in.workgroup = lp_workgroup(ntvfs->ctx->lp_ctx);
+       io.in.workgroup = lpcfg_workgroup(ntvfs->ctx->lp_ctx);
        io.in.service = remote_share;
        io.in.service_type = "?????";
-       io.in.gensec_settings = lp_gensec_settings(p, ntvfs->ctx->lp_ctx);
-       lp_smbcli_options(ntvfs->ctx->lp_ctx, &io.in.options);
-       lp_smbcli_session_options(ntvfs->ctx->lp_ctx, &io.in.session_options);
+       io.in.gensec_settings = lpcfg_gensec_settings(p, ntvfs->ctx->lp_ctx);
+       lpcfg_smbcli_options(ntvfs->ctx->lp_ctx, &io.in.options);
+       lpcfg_smbcli_session_options(ntvfs->ctx->lp_ctx, &io.in.session_options);
 
        if (!(ntvfs->ctx->client_caps & NTVFS_CLIENT_CAP_LEVEL_II_OPLOCKS)) {
                io.in.options.use_level2_oplocks = false;
        }
 
        creq = smb_composite_connect_send(&io, p,
-                                         lp_resolve_context(ntvfs->ctx->lp_ctx),
+                                         lpcfg_resolve_context(ntvfs->ctx->lp_ctx),
                                          ntvfs->ctx->event_ctx);
        status = smb_composite_connect_recv(creq, p);
        NT_STATUS_NOT_OK_RETURN(status);
index 6ee69616101a17d026d7517565d21538e2bab1c9..2a8c69e2207b129c0e13210986cee23355b4f84c 100644 (file)
@@ -836,7 +836,7 @@ static NTSTATUS cifspsx_fsattr(struct ntvfs_module_context *ntvfs,
        fs->generic.out.serial_number = 1;
        fs->generic.out.fs_type = talloc_strdup(req, "NTFS");
        fs->generic.out.volume_name = talloc_strdup(req, 
-                                                   lp_servicename(req->tcon->service));
+                                                   lpcfg_servicename(req->tcon->service));
 
        return NT_STATUS_OK;
 }
index b919cbcb200ba2fded8f13007824b1c0dbda4296..126c78ca9327cd04b91c5f5c092b771ee3dce70b 100644 (file)
@@ -46,7 +46,7 @@ NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
        r->out.available = 0;
        r->out.info = NULL;
 
-       nterr = share_get_context_by_name(mem_ctx, lp_share_backend(lp_ctx), event_ctx, lp_ctx, &sctx);
+       nterr = share_get_context_by_name(mem_ctx, lpcfg_share_backend(lp_ctx), event_ctx, lp_ctx, &sctx);
        if (!NT_STATUS_IS_OK(nterr)) {
                return nterr;
        }
index bfc792ec9555d4666f67b91b305356a4d1920dc7..4f143986fcfd062419d413e42dea6955c6e042b0 100644 (file)
@@ -270,7 +270,7 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
        }
 
        directory = talloc_asprintf(req, "%s/np",
-                                   lp_ncalrpc_dir(ipriv->ntvfs->ctx->lp_ctx));
+                                   lpcfg_ncalrpc_dir(ipriv->ntvfs->ctx->lp_ctx));
        NT_STATUS_HAVE_NO_MEMORY(directory);
 
        state = talloc(req, struct ipc_open_state);
index fc1cad18949028d471c9ebf7e04d4233d8e08b46..bdd86f20973a2a8545db648352f53e88110de6d2 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(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "cachesize", 512);
+       ctx->cache_size = lpcfg_parm_int(pvfs->ntvfs->ctx->lp_ctx, 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(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "prefix", -1);
+       ctx->mangle_prefix = lpcfg_parm_int(pvfs->ntvfs->ctx->lp_ctx, NULL, "mangle", "prefix", -1);
        if (ctx->mangle_prefix < 0 || ctx->mangle_prefix > 6) {
                ctx->mangle_prefix = DEFAULT_MANGLE_PREFIX;
        }
index 05bdd0a8aa569dc323e8ed8d12ebc67d8d5d8b14..1e0efcddc8481c34ac2d7db1c90dc7f7f9ab7ea2 100644 (file)
@@ -266,7 +266,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
        pvfs->notify_context = notify_init(pvfs, 
                                           pvfs->ntvfs->ctx->server_id,  
                                           pvfs->ntvfs->ctx->msg_ctx, 
-                                          pvfs->ntvfs->ctx->lp_ctx, 
+                                          pvfs->ntvfs->ctx->lp_ctx,
                                           pvfs->ntvfs->ctx->event_ctx,
                                           pvfs->ntvfs->ctx->config);
 
index 0530e04f6dfefa23bd1ee037aecf6ba68dc0c365..06c9dfcc2f528df6315dcac0201bcf3dea2d20e0 100644 (file)
@@ -88,7 +88,7 @@ static NTSTATUS print_ioctl(struct ntvfs_module_context *ntvfs,
 
                p = (char *)io->ioctl.out.blob.data;
                SSVAL(p,0, 1 /* REWRITE: fsp->rap_print_jobid */);
-               push_string(p+2, lp_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII);
+               push_string(p+2, lpcfg_netbios_name(ntvfs->ctx->lp_ctx), 15, STR_TERMINATE|STR_ASCII);
                push_string(p+18, ntvfs->ctx->config->name, 13, STR_TERMINATE|STR_ASCII);
                return NT_STATUS_OK;
        }
index 6dbd6f0352bfcca3920d351a2b682a6ee74da7b3..03bf76634d14412e3d46a0d15f936ab5c0e5e952 100644 (file)
@@ -833,7 +833,7 @@ static NTSTATUS svfs_fsattr(struct ntvfs_module_context *ntvfs,
        fs->generic.out.serial_number = 1;
        fs->generic.out.fs_type = talloc_strdup(req, "NTFS");
        fs->generic.out.volume_name = talloc_strdup(req, 
-                                                   lp_servicename(req->tcon->service));
+                                                   lpcfg_servicename(req->tcon->service));
 
        return NT_STATUS_OK;
 }
index e279b5ab494e4eae3bbd6c84780a61ca2d2be692..b2c90f59081a0b9770af154a6f685c224719f796 100644 (file)
@@ -246,16 +246,16 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       lp_smbcli_options(ntvfs->ctx->lp_ctx, &options);
+       lpcfg_smbcli_options(ntvfs->ctx->lp_ctx, &options);
 
        creq = smb2_connect_send(p, host,
-                       lp_parm_string_list(p, ntvfs->ctx->lp_ctx, NULL, "smb2", "ports", NULL),
+                       lpcfg_parm_string_list(p, ntvfs->ctx->lp_ctx, NULL, "smb2", "ports", NULL),
                                remote_share, 
-                                lp_resolve_context(ntvfs->ctx->lp_ctx),
+                                lpcfg_resolve_context(ntvfs->ctx->lp_ctx),
                                 credentials,
                                 ntvfs->ctx->event_ctx, &options,
-                                lp_socket_options(ntvfs->ctx->lp_ctx),
-                                lp_gensec_settings(p, ntvfs->ctx->lp_ctx)
+                                lpcfg_socket_options(ntvfs->ctx->lp_ctx),
+                                lpcfg_gensec_settings(p, ntvfs->ctx->lp_ctx)
                                 );
 
        status = smb2_connect_recv(creq, p, &tree);
index 29b97bc09edc72e93b523b754ff8259d56eeb6c9..8becffbce5b6171d517bdf59a12cbe0385eb493b 100644 (file)
@@ -233,14 +233,14 @@ int param_use(struct loadparm_context *lp_ctx, struct param_context *ctx)
                bool isglobal = strcmp(section->name, "global") == 0;
                for (param = section->parameters->entries; param; param = param->next) {
                        if (isglobal)
-                               lp_do_global_parameter(lp_ctx, param->key,
+                               lpcfg_do_global_parameter(lp_ctx, param->key,
                                                       param->value);
                        else {
                                struct loadparm_service *service = 
-                                                       lp_service(lp_ctx, section->name);
+                                                       lpcfg_service(lp_ctx, section->name);
                                if (service == NULL)
-                                       service = lp_add_service(lp_ctx, lp_default_service(lp_ctx), section->name);
-                               lp_do_service_parameter(lp_ctx, service, param->key, param->value);
+                                       service = lpcfg_add_service(lp_ctx, lpcfg_default_service(lp_ctx), section->name);
+                               lpcfg_do_service_parameter(lp_ctx, service, param->key, param->value);
                        }
                }
        }
index 0df370b4c276a2502364ea7179452e9f6ed6c3f4..b0387869b5db2666bd0f90c7d3a9eb9b0475e898 100644 (file)
@@ -126,7 +126,7 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
                 settings->targetdir));
        parameters = PyDict_New();
 
-       configfile = lp_configfile(lp_ctx);
+       configfile = lpcfg_configfile(lp_ctx);
        if (configfile != NULL) {
                PyDict_SetItemString(parameters, "smbconf", 
                                     PyString_FromString(configfile));
@@ -193,7 +193,7 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
        result->domaindn = talloc_strdup(mem_ctx, PyString_AsString(PyObject_GetAttrString(py_result, "domaindn")));
 
        /* FIXME paths */
-       result->lp_ctx = lp_from_py_object(result, PyObject_GetAttrString(py_result, "lp"));
+       result->lp_ctx = lpcfg_from_py_object(result, PyObject_GetAttrString(py_result, "lp"));
        result->samdb = PyLdb_AsLdbContext(PyObject_GetAttrString(py_result, "samdb"));
 
        return NT_STATUS_OK;
@@ -373,7 +373,7 @@ struct ldb_context *provision_get_schema(TALLOC_CTX *mem_ctx, struct loadparm_co
        
        parameters = PyDict_New();
 
-       setupdir = lp_setupdir(lp_ctx);
+       setupdir = lpcfg_setupdir(lp_ctx);
        PyDict_SetItemString(parameters, "setup_dir", 
                             PyString_FromString(setupdir));
        if (override_prefixmap) {
index a648f65d4e60db6d44b4bdd7be55a066c078e744..b1e0d7df0e092154c4057a6dd119e0be21a14677 100644 (file)
@@ -50,51 +50,51 @@ static PyObject *py_lp_ctx_get_helper(struct loadparm_context *lp_ctx, const cha
                strwicmp(service_name, GLOBAL_NAME2)) {
                struct loadparm_service *service;
                /* its a share parameter */
-               service = lp_service(lp_ctx, service_name);
+               service = lpcfg_service(lp_ctx, service_name);
                if (service == NULL) {
                        return NULL;
                }
                if (strchr(param_name, ':')) {
                        /* its a parametric option on a share */
-                       const char *type = talloc_strndup(lp_ctx, param_name, 
+                       const char *type = talloc_strndup(lp_ctx, param_name,
                                                                                          strcspn(param_name, ":"));
                        const char *option = strchr(param_name, ':') + 1;
                        const char *value;
                        if (type == NULL || option == NULL) {
                        return NULL;
                        }
-                       value = lp_get_parametric(lp_ctx, service, type, option);
+                       value = lpcfg_get_parametric(lp_ctx, service, type, option);
                        if (value == NULL) {
                        return NULL;
                        }
                        return PyString_FromString(value);
                }
 
-               parm = lp_parm_struct(param_name);
+               parm = lpcfg_parm_struct(param_name);
                if (parm == NULL || parm->pclass == P_GLOBAL) {
                        return NULL;
                }
-               parm_ptr = lp_parm_ptr(lp_ctx, service, parm);
+               parm_ptr = lpcfg_parm_ptr(lp_ctx, service, parm);
     } else if (strchr(param_name, ':')) {
                /* its a global parametric option */
-               const char *type = talloc_strndup(lp_ctx, 
+               const char *type = talloc_strndup(lp_ctx,
                                  param_name, strcspn(param_name, ":"));
                const char *option = strchr(param_name, ':') + 1;
                const char *value;
                if (type == NULL || option == NULL) {
                        return NULL;
                }
-               value = lp_get_parametric(lp_ctx, NULL, type, option);
+               value = lpcfg_get_parametric(lp_ctx, NULL, type, option);
                if (value == NULL)
                        return NULL;
                return PyString_FromString(value);
        } else {
                /* its a global parameter */
-               parm = lp_parm_struct(param_name);
+               parm = lpcfg_parm_struct(param_name);
                if (parm == NULL) {
                        return NULL;
                }
-               parm_ptr = lp_parm_ptr(lp_ctx, NULL, parm);
+               parm_ptr = lpcfg_parm_ptr(lp_ctx, NULL, parm);
        }
 
        if (parm == NULL || parm_ptr == NULL) {
@@ -149,7 +149,7 @@ static PyObject *py_lp_ctx_load(py_talloc_Object *self, PyObject *args)
        if (!PyArg_ParseTuple(args, "s", &filename))
                return NULL;
 
-       ret = lp_load(PyLoadparmContext_AsLoadparmContext(self), filename);
+       ret = lpcfg_load(PyLoadparmContext_AsLoadparmContext(self), filename);
 
        if (!ret) {
                PyErr_Format(PyExc_RuntimeError, "Unable to load file %s", filename);
@@ -161,7 +161,7 @@ static PyObject *py_lp_ctx_load(py_talloc_Object *self, PyObject *args)
 static PyObject *py_lp_ctx_load_default(py_talloc_Object *self)
 {
        bool ret;
-        ret = lp_load_default(PyLoadparmContext_AsLoadparmContext(self));
+        ret = lpcfg_load_default(PyLoadparmContext_AsLoadparmContext(self));
 
        if (!ret) {
                PyErr_SetString(PyExc_RuntimeError, "Unable to load default file");
@@ -190,7 +190,7 @@ static PyObject *py_lp_ctx_is_myname(py_talloc_Object *self, PyObject *args)
        if (!PyArg_ParseTuple(args, "s", &name))
                return NULL;
 
-       return PyBool_FromLong(lp_is_myname(PyLoadparmContext_AsLoadparmContext(self), name));
+       return PyBool_FromLong(lpcfg_is_myname(PyLoadparmContext_AsLoadparmContext(self), name));
 }
 
 static PyObject *py_lp_ctx_is_mydomain(py_talloc_Object *self, PyObject *args)
@@ -199,7 +199,7 @@ static PyObject *py_lp_ctx_is_mydomain(py_talloc_Object *self, PyObject *args)
        if (!PyArg_ParseTuple(args, "s", &name))
                return NULL;
 
-       return PyBool_FromLong(lp_is_mydomain(PyLoadparmContext_AsLoadparmContext(self), name));
+       return PyBool_FromLong(lpcfg_is_mydomain(PyLoadparmContext_AsLoadparmContext(self), name));
 }
 
 static PyObject *py_lp_ctx_set(py_talloc_Object *self, PyObject *args)
@@ -209,7 +209,7 @@ static PyObject *py_lp_ctx_set(py_talloc_Object *self, PyObject *args)
        if (!PyArg_ParseTuple(args, "ss", &name, &value))
                return NULL;
 
-       ret = lp_set_cmdline(PyLoadparmContext_AsLoadparmContext(self), name, value);
+       ret = lpcfg_set_cmdline(PyLoadparmContext_AsLoadparmContext(self), name, value);
        if (!ret) {
                PyErr_SetString(PyExc_RuntimeError, "Unable to set parameter");
                return NULL;
@@ -237,11 +237,11 @@ static PyObject *py_lp_ctx_services(py_talloc_Object *self)
        struct loadparm_context *lp_ctx = PyLoadparmContext_AsLoadparmContext(self);
        PyObject *ret;
        int i;
-       ret = PyList_New(lp_numservices(lp_ctx));
-       for (i = 0; i < lp_numservices(lp_ctx); i++) {
-               struct loadparm_service *service = lp_servicebynum(lp_ctx, i);
+       ret = PyList_New(lpcfg_numservices(lp_ctx));
+       for (i = 0; i < lpcfg_numservices(lp_ctx); i++) {
+               struct loadparm_service *service = lpcfg_servicebynum(lp_ctx, i);
                if (service != NULL) {
-                       PyList_SetItem(ret, i, PyString_FromString(lp_servicename(service)));
+                       PyList_SetItem(ret, i, PyString_FromString(lpcfg_servicename(service)));
                }
        }
        return ret;
@@ -263,7 +263,7 @@ static PyObject *py_lp_dump(PyObject *self, PyObject *args)
                return NULL;
        }
 
-       lp_dump(lp_ctx, f, show_defaults, lp_numservices(lp_ctx));
+       lpcfg_dump(lp_ctx, f, show_defaults, lpcfg_numservices(lp_ctx));
 
        Py_RETURN_NONE;
 }
@@ -299,12 +299,12 @@ static PyMethodDef py_lp_ctx_methods[] = {
 
 static PyObject *py_lp_ctx_default_service(py_talloc_Object *self, void *closure)
 {
-       return PyLoadparmService_FromService(lp_default_service(PyLoadparmContext_AsLoadparmContext(self)));
+       return PyLoadparmService_FromService(lpcfg_default_service(PyLoadparmContext_AsLoadparmContext(self)));
 }
 
 static PyObject *py_lp_ctx_config_file(py_talloc_Object *self, void *closure)
 {
-       const char *configfile = lp_configfile(PyLoadparmContext_AsLoadparmContext(self));
+       const char *configfile = lpcfg_configfile(PyLoadparmContext_AsLoadparmContext(self));
        if (configfile == NULL)
                Py_RETURN_NONE;
        else
@@ -336,7 +336,7 @@ static PyObject *py_lp_ctx_new(PyTypeObject *type, PyObject *args, PyObject *kwa
 
 static Py_ssize_t py_lp_ctx_len(py_talloc_Object *self)
 {
-       return lp_numservices(PyLoadparmContext_AsLoadparmContext(self));
+       return lpcfg_numservices(PyLoadparmContext_AsLoadparmContext(self));
 }
 
 static PyObject *py_lp_ctx_getitem(py_talloc_Object *self, PyObject *name)
@@ -346,7 +346,7 @@ static PyObject *py_lp_ctx_getitem(py_talloc_Object *self, PyObject *name)
                PyErr_SetString(PyExc_TypeError, "Only string subscripts are supported");
                return NULL;
        }
-       service = lp_service(PyLoadparmContext_AsLoadparmContext(self), PyString_AsString(name));
+       service = lpcfg_service(PyLoadparmContext_AsLoadparmContext(self), PyString_AsString(name));
        if (service == NULL) {
                PyErr_SetString(PyExc_KeyError, "No such section");
                return NULL;
@@ -396,7 +396,7 @@ static PyObject *py_lp_service_dump(PyObject *self, PyObject *args)
 
        default_service = PyLoadparmService_AsLoadparmService(py_default_service);
 
-       lp_dump_one(f, show_defaults, service, default_service);
+       lpcfg_dump_one(f, show_defaults, service, default_service);
 
        Py_RETURN_NONE;
 }
index 4657dbafdff32dcd081528278938408ef4d73172..e8944f5fa1994e870e6a6d78a1ca2852102992d1 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "param/param.h"
 
-_PUBLIC_ struct loadparm_context *lp_from_py_object(TALLOC_CTX *mem_ctx, PyObject *py_obj);
+_PUBLIC_ struct loadparm_context *lpcfg_from_py_object(TALLOC_CTX *mem_ctx, PyObject *py_obj);
 _PUBLIC_ struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx);
 
 #endif /* _PYPARAM_H_ */
index 8136746f52e3bcf67fcc0c3e54b18854472e5111..8c98cbcbfee44fa84eaf80d48d503984a1777187 100644 (file)
 
 #define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_type(obj, struct loadparm_context)
 
-_PUBLIC_ struct loadparm_context *lp_from_py_object(TALLOC_CTX *mem_ctx, PyObject *py_obj)
+_PUBLIC_ struct loadparm_context *lpcfg_from_py_object(TALLOC_CTX *mem_ctx, PyObject *py_obj)
 {
     struct loadparm_context *lp_ctx;
 
     if (PyString_Check(py_obj)) {
         lp_ctx = loadparm_init(mem_ctx);
-        if (!lp_load(lp_ctx, PyString_AsString(py_obj))) {
+        if (!lpcfg_load(lp_ctx, PyString_AsString(py_obj))) {
             talloc_free(lp_ctx);
                        PyErr_Format(PyExc_RuntimeError, "Unable to load %s", 
                                                 PyString_AsString(py_obj));
@@ -43,7 +43,7 @@ _PUBLIC_ struct loadparm_context *lp_from_py_object(TALLOC_CTX *mem_ctx, PyObjec
     if (py_obj == Py_None) {
         lp_ctx = loadparm_init(mem_ctx);
                /* We're not checking that loading the file succeeded *on purpose */
-        lp_load_default(lp_ctx);
+        lpcfg_load_default(lp_ctx);
         return lp_ctx;
     }
 
@@ -54,7 +54,7 @@ struct loadparm_context *py_default_loadparm_context(TALLOC_CTX *mem_ctx)
 {
     struct loadparm_context *ret;
     ret = loadparm_init(mem_ctx);
-    if (!lp_load_default(ret))
+    if (!lpcfg_load_default(ret))
         return NULL;
     return ret;
 }
index 8c135dc2c661847d4630ac8ca46452712d38d95a..d17c5f71cec4b81dae966de2f76ac169324a9348 100644 (file)
@@ -93,7 +93,7 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
                                        struct tevent_context *ev_ctx,
                                        struct loadparm_context *lp_ctx)
 {
-       return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lp_secrets_url(lp_ctx),
+       return ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lpcfg_secrets_url(lp_ctx),
                               NULL, NULL, 0);
 }
 
index d732372f450b26fe89b3bcb6e901216ddfffea52..fcfe54864953b781412a1168a64f9edaa1bc78d2 100644 (file)
@@ -47,7 +47,7 @@ static const char *sclassic_string_option(struct share_config *scfg,
 {
        struct loadparm_service *s = talloc_get_type(scfg->opaque, 
                                                     struct loadparm_service);
-       struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data, 
+       struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data,
                                                          struct loadparm_context);
        char *parm, *val;
        const char *ret;
@@ -61,7 +61,7 @@ static const char *sclassic_string_option(struct share_config *scfg,
                *val = '\0';
                val++;
 
-               ret = lp_parm_string(lp_ctx, s, parm, val);
+               ret = lpcfg_parm_string(lp_ctx, s, parm, val);
                if (!ret) {
                        ret = defval;
                }
@@ -74,25 +74,25 @@ static const char *sclassic_string_option(struct share_config *scfg,
        }
 
        if (strcmp(opt_name, SHARE_PATH) == 0) {
-               return lp_pathname(s, lp_default_service(lp_ctx));
+               return lpcfg_pathname(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_COMMENT) == 0) {
-               return lp_comment(s, lp_default_service(lp_ctx));
+               return lpcfg_comment(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_VOLUME) == 0) {
-               return volume_label(s, lp_default_service(lp_ctx));
+               return volume_label(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_TYPE) == 0) {
-               if (lp_print_ok(s, lp_default_service(lp_ctx))) {
+               if (lpcfg_print_ok(s, lpcfg_default_service(lp_ctx))) {
                        return "PRINTER";
                }
-               if (strcmp("NTFS", lp_fstype(s, lp_default_service(lp_ctx))) == 0) {
+               if (strcmp("NTFS", lpcfg_fstype(s, lpcfg_default_service(lp_ctx))) == 0) {
                        return "DISK";
                }
-               return lp_fstype(s, lp_default_service(lp_ctx));
+               return lpcfg_fstype(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_PASSWORD) == 0) {
@@ -109,7 +109,7 @@ static int sclassic_int_option(struct share_config *scfg, const char *opt_name,
 {
        struct loadparm_service *s = talloc_get_type(scfg->opaque, 
                                                     struct loadparm_service);
-       struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data, 
+       struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data,
                                                          struct loadparm_context);
        char *parm, *val;
        int ret;
@@ -123,7 +123,7 @@ static int sclassic_int_option(struct share_config *scfg, const char *opt_name,
                *val = '\0';
                val++;
 
-               ret = lp_parm_int(lp_ctx, s, parm, val, defval);
+               ret = lpcfg_parm_int(lp_ctx, s, parm, val, defval);
                if (!ret) {
                        ret = defval;
                }
@@ -132,27 +132,27 @@ static int sclassic_int_option(struct share_config *scfg, const char *opt_name,
        }
 
        if (strcmp(opt_name, SHARE_CSC_POLICY) == 0) {
-               return lp_csc_policy(s, lp_default_service(lp_ctx));
+               return lpcfg_csc_policy(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_MAX_CONNECTIONS) == 0) {
-               return lp_max_connections(s, lp_default_service(lp_ctx));
+               return lpcfg_max_connections(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_CREATE_MASK) == 0) {
-               return lp_create_mask(s, lp_default_service(lp_ctx));
+               return lpcfg_create_mask(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_DIR_MASK) == 0) {
-               return lp_dir_mask(s, lp_default_service(lp_ctx));
+               return lpcfg_dir_mask(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_FORCE_DIR_MODE) == 0) {
-               return lp_force_dir_mode(s, lp_default_service(lp_ctx));
+               return lpcfg_force_dir_mode(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_FORCE_CREATE_MODE) == 0) {
-               return lp_force_create_mode(s, lp_default_service(lp_ctx));
+               return lpcfg_force_create_mode(s, lpcfg_default_service(lp_ctx));
        }
 
 
@@ -167,7 +167,7 @@ static bool sclassic_bool_option(struct share_config *scfg, const char *opt_name
 {
        struct loadparm_service *s = talloc_get_type(scfg->opaque, 
                                                     struct loadparm_service);
-       struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data, 
+       struct loadparm_context *lp_ctx = talloc_get_type(scfg->ctx->priv_data,
                                                          struct loadparm_context);
        char *parm, *val;
        bool ret;
@@ -181,7 +181,7 @@ static bool sclassic_bool_option(struct share_config *scfg, const char *opt_name
                *val = '\0';
 &n