summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-07-16 14:32:42 +1000
committerAndrew Tridgell <tridge@samba.org>2010-07-16 18:24:27 +1000
commit6b266b85cf34145ac1f03d8f787b81121e4ec92b (patch)
tree9f6faebdcf58c73e0297bfdf3b905ef256f8e478 /source4/libnet
parente4c35c5a09dd66c9280caa39130b7e3b941b7e51 (diff)
downloadsamba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.gz
samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.tar.bz2
samba-6b266b85cf34145ac1f03d8f787b81121e4ec92b.zip
s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
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>
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet.c2
-rw-r--r--source4/libnet/libnet_become_dc.c10
-rw-r--r--source4/libnet/libnet_join.c8
-rw-r--r--source4/libnet/libnet_lookup.c6
-rw-r--r--source4/libnet/libnet_samdump.c2
-rw-r--r--source4/libnet/libnet_samsync_ldb.c4
-rw-r--r--source4/libnet/libnet_site.c4
-rw-r--r--source4/libnet/libnet_unbecome_dc.c2
-rw-r--r--source4/libnet/libnet_vampire.c14
-rw-r--r--source4/libnet/py_net.c4
10 files changed, 28 insertions, 28 deletions
diff --git a/source4/libnet/libnet.c b/source4/libnet/libnet.c
index 86cf80b4da..05f18b42a5 100644
--- a/source4/libnet/libnet.c
+++ b/source4/libnet/libnet.c
@@ -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);
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 833f5d3bd6..828fd521d9 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -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;
}
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index a8edabf760..dd533355ad 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -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);
diff --git a/source4/libnet/libnet_lookup.c b/source4/libnet/libnet_lookup.c
index 177292c7cd..43a7654d4b 100644
--- a/source4/libnet/libnet_lookup.c
+++ b/source4/libnet/libnet_lookup.c
@@ -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;
diff --git a/source4/libnet/libnet_samdump.c b/source4/libnet/libnet_samdump.c
index 8092260515..ab58598f29 100644
--- a/source4/libnet/libnet_samdump.c
+++ b/source4/libnet/libnet_samdump.c
@@ -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,
diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c
index 05b0c13862..b9e93cf7c8 100644
--- a/source4/libnet/libnet_samsync_ldb.c
+++ b/source4/libnet/libnet_samsync_ldb.c
@@ -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;
diff --git a/source4/libnet/libnet_site.c b/source4/libnet/libnet_site.c
index bd6dfbf421..e4f037d0b8 100644
--- a/source4/libnet/libnet_site.c
+++ b/source4/libnet/libnet_site.c
@@ -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)) {
diff --git a/source4/libnet/libnet_unbecome_dc.c b/source4/libnet/libnet_unbecome_dc.c
index a8b53df56d..cf0142da86 100644
--- a/source4/libnet/libnet_unbecome_dc.c
+++ b/source4/libnet/libnet_unbecome_dc.c
@@ -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);
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 9f1f9626bf..b85869e93e 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -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)) {
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
index 9b5fa5d76b..f5eea223e6 100644
--- a/source4/libnet/py_net.c
+++ b/source4/libnet/py_net.c
@@ -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;