summaryrefslogtreecommitdiff
path: root/source4/dsdb
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/dsdb
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/dsdb')
-rw-r--r--source4/dsdb/common/util.c4
-rw-r--r--source4/dsdb/dns/dns_update.c18
-rw-r--r--source4/dsdb/kcc/kcc_deleted.c2
-rw-r--r--source4/dsdb/kcc/kcc_periodic.c2
-rw-r--r--source4/dsdb/kcc/kcc_service.c6
-rw-r--r--source4/dsdb/repl/drepl_out_helpers.c2
-rw-r--r--source4/dsdb/repl/drepl_ridalloc.c2
-rw-r--r--source4/dsdb/repl/drepl_service.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/kludge_acl.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c12
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/ridalloc.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba3sid.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c2
-rw-r--r--source4/dsdb/samdb/samdb.c8
-rw-r--r--source4/dsdb/samdb/samdb_privilege.c2
18 files changed, 40 insertions, 40 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 4866a9a8d9..b8d72781f6 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -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) {
diff --git a/source4/dsdb/dns/dns_update.c b/source4/dsdb/dns/dns_update.c
index 7242acfa41..e9f93038b6 100644
--- a/source4/dsdb/dns/dns_update.c
+++ b/source4/dsdb/dns/dns_update.c
@@ -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);
diff --git a/source4/dsdb/kcc/kcc_deleted.c b/source4/dsdb/kcc/kcc_deleted.c
index dae9a8ef1b..118952a143 100644
--- a/source4/dsdb/kcc/kcc_deleted.c
+++ b/source4/dsdb/kcc/kcc_deleted.c
@@ -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;
}
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index 9937e2e6dd..3f37208dec 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -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 =
diff --git a/source4/dsdb/kcc/kcc_service.c b/source4/dsdb/kcc/kcc_service.c
index 989b8f8c58..4507545355 100644
--- a/source4/dsdb/kcc/kcc_service.c
+++ b/source4/dsdb/kcc/kcc_service.c
@@ -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);
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c
index 24110529c5..8ce9d0f1a3 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -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;
}
diff --git a/source4/dsdb/repl/drepl_ridalloc.c b/source4/dsdb/repl/drepl_ridalloc.c
index eaff581083..c036228ee7 100644
--- a/source4/dsdb/repl/drepl_ridalloc.c
+++ b/source4/dsdb/repl/drepl_ridalloc.c
@@ -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;
diff --git a/source4/dsdb/repl/drepl_service.c b/source4/dsdb/repl/drepl_service.c
index e48ae3e563..652c16fda4 100644
--- a/source4/dsdb/repl/drepl_service.c
+++ b/source4/dsdb/repl/drepl_service.c
@@ -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)) {
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 6e38bc46b1..eedeb1a8b3 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -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);
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 86f9bc43cc..e6f288d01c 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -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);
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index e6a315d2ef..5065bd565e 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -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" : "");
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 99bba57d10..0f078b5c76 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -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;
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 2205be07c1..160f60f18c 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -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);
diff --git a/source4/dsdb/samdb/ldb_modules/ridalloc.c b/source4/dsdb/samdb/ldb_modules/ridalloc.c
index 2b0c4b9fa8..9cde5c89f7 100644
--- a/source4/dsdb/samdb/ldb_modules/ridalloc.c
+++ b/source4/dsdb/samdb/ldb_modules/ridalloc.c
@@ -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"));
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sid.c b/source4/dsdb/samdb/ldb_modules/samba3sid.c
index 6c21382cd3..9368e0d007 100644
--- a/source4/dsdb/samdb/ldb_modules/samba3sid.c
+++ b/source4/dsdb/samdb/ldb_modules/samba3sid.c
@@ -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__
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index b9a9720018..9ae308b9bc 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -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;
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 67b55385cb..2b4e9a1438 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -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;
diff --git a/source4/dsdb/samdb/samdb_privilege.c b/source4/dsdb/samdb/samdb_privilege.c
index ad0312dd72..f05b7e2a18 100644
--- a/source4/dsdb/samdb/samdb_privilege.c
+++ b/source4/dsdb/samdb/samdb_privilege.c
@@ -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);
}