diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-07-16 14:32:42 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-07-16 18:24:27 +1000 |
commit | 6b266b85cf34145ac1f03d8f787b81121e4ec92b (patch) | |
tree | 9f6faebdcf58c73e0297bfdf3b905ef256f8e478 /source4/kdc | |
parent | e4c35c5a09dd66c9280caa39130b7e3b941b7e51 (diff) | |
download | samba-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/kdc')
-rw-r--r-- | source4/kdc/db-glue.c | 18 | ||||
-rw-r--r-- | source4/kdc/kdc.c | 14 | ||||
-rw-r--r-- | source4/kdc/kpasswdd.c | 4 | ||||
-rw-r--r-- | source4/kdc/mit_samba.c | 6 | ||||
-rw-r--r-- | source4/kdc/pac-glue.c | 4 |
5 files changed, 23 insertions, 23 deletions
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c index e913647511..c8bbea7531 100644 --- a/source4/kdc/db-glue.c +++ b/source4/kdc/db-glue.c @@ -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; diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c index e16e20b470..5adb0709cf 100644 --- a/source4/kdc/kdc.c +++ b/source4/kdc/kdc.c @@ -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); diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c index fb6723c77c..9c02ac3465 100644 --- a/source4/kdc/kpasswdd.c +++ b/source4/kdc/kpasswdd.c @@ -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, diff --git a/source4/kdc/mit_samba.c b/source4/kdc/mit_samba.c index cb1284cfca..58ab1673ff 100644 --- a/source4/kdc/mit_samba.c +++ b/source4/kdc/mit_samba.c @@ -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); diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c index 8c203e555d..3eeb26c98d 100644 --- a/source4/kdc/pac-glue.c +++ b/source4/kdc/pac-glue.c @@ -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), |