diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-02 01:52:18 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-01-01 19:57:01 -0600 |
commit | 9d136bc0a323171b13ec047816033ae4fac9e9d4 (patch) | |
tree | 426a7e9c243b897cf2464d84c6f4e78f711630a2 /source4 | |
parent | 7d5f0e0893d42b56145a3ffa34e3b4b9906cbd91 (diff) | |
download | samba-9d136bc0a323171b13ec047816033ae4fac9e9d4.tar.gz samba-9d136bc0a323171b13ec047816033ae4fac9e9d4.tar.xz samba-9d136bc0a323171b13ec047816033ae4fac9e9d4.zip |
r26640: Janitorial: Remove some more uses of global_loadparm.
(This used to be commit c863f4ebde8efa1a695b4469142d6719e30bc419)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/auth/kerberos/kerberos_pac.c | 5 | ||||
-rw-r--r-- | source4/cluster/ctdb/ctdb_cluster.c | 2 | ||||
-rw-r--r-- | source4/dsdb/repl/drepl_partitions.c | 4 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/password_hash.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 8 |
5 files changed, 11 insertions, 10 deletions
diff --git a/source4/auth/kerberos/kerberos_pac.c b/source4/auth/kerberos/kerberos_pac.c index d345ea969a3..c46e06bc72a 100644 --- a/source4/auth/kerberos/kerberos_pac.c +++ b/source4/auth/kerberos/kerberos_pac.c @@ -437,6 +437,7 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx, struct PAC_SIGNATURE_DATA *kdc_checksum = NULL; struct PAC_SIGNATURE_DATA *srv_checksum = NULL; int i; + struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm); /* First, just get the keytypes filled in (and lengths right, eventually) */ for (i=0; i < pac_data->num_buffers; i++) { @@ -485,7 +486,7 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx, memset(srv_checksum->signature.data, '\0', srv_checksum->signature.length); ndr_err = ndr_push_struct_blob(&tmp_blob, mem_ctx, - lp_iconv_convenience(global_loadparm), + iconv_convenience, pac_data, (ndr_push_flags_fn_t)ndr_push_PAC_DATA); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { @@ -510,7 +511,7 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx, /* And push it out again, this time to the world. This relies on determanistic pointer values */ ndr_err = ndr_push_struct_blob(&tmp_blob, mem_ctx, - lp_iconv_convenience(global_loadparm), + iconv_convenience, pac_data, (ndr_push_flags_fn_t)ndr_push_PAC_DATA); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { diff --git a/source4/cluster/ctdb/ctdb_cluster.c b/source4/cluster/ctdb/ctdb_cluster.c index 9a543ee3ee5..53df1e968e7 100644 --- a/source4/cluster/ctdb/ctdb_cluster.c +++ b/source4/cluster/ctdb/ctdb_cluster.c @@ -83,7 +83,7 @@ static struct tdb_wrap *ctdb_tdb_tmp_open(struct cluster_ops *ops, struct loadparm_context *lp_ctx, const char *dbname, int flags) { - const char *dir = lp_parm_string(global_loadparm, NULL, "ctdb", "shared data"); + const char *dir = lp_parm_string(lp_ctx, NULL, "ctdb", "shared data"); char *path; struct tdb_wrap *w; if (dir == NULL) { diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c index 1839520b34a..8a1c5aa31a8 100644 --- a/source4/dsdb/repl/drepl_partitions.c +++ b/source4/dsdb/repl/drepl_partitions.c @@ -157,7 +157,7 @@ static WERROR dreplsrv_partition_add_source_dsa(struct dreplsrv_service *s, W_ERROR_HAVE_NO_MEMORY(source); ndr_err = ndr_pull_struct_blob(val, source, - lp_iconv_convenience(global_loadparm), &source->_repsFromBlob, + lp_iconv_convenience(s->task->lp_ctx), &source->_repsFromBlob, (ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); @@ -224,7 +224,7 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s, if (ouv_value) { enum ndr_err_code ndr_err; ndr_err = ndr_pull_struct_blob(ouv_value, mem_ctx, - lp_iconv_convenience(global_loadparm), &ouv, + lp_iconv_convenience(s->task->lp_ctx), &ouv, (ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 61bd391d67b..57c053d9618 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -473,7 +473,7 @@ static int setup_primary_kerberos(struct setup_password_fields_io *io, talloc_steal(io->ac, blob.data); /* TODO: use ndr_pull_struct_blob_all(), when the ndr layer handles it correct with relative pointers */ - ndr_err = ndr_pull_struct_blob(&blob, io->ac, lp_iconv_convenience(global_loadparm), &_old_pkb, + ndr_err = ndr_pull_struct_blob(&blob, io->ac, lp_iconv_convenience(ldb_get_opaque(io->ac->module->ldb, "loadparm")), &_old_pkb, (ndr_pull_flags_fn_t)ndr_pull_package_PrimaryKerberosBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { NTSTATUS status = ndr_map_error2ntstatus(ndr_err); diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index 55b7b18d890..5a3cc4bef44 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -779,7 +779,7 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar) md->ctr.ctr1.array[i].local_usn = seq_num; } ndr_err = ndr_push_struct_blob(&md_value, msg, - lp_iconv_convenience(global_loadparm), + lp_iconv_convenience(ldb_get_opaque(ar->module->ldb, "loadparm")), md, (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { @@ -994,7 +994,7 @@ static int replmd_replicated_apply_merge(struct replmd_replicated_request *ar) /* create the meta data value */ ndr_err = ndr_push_struct_blob(&nmd_value, msg, - lp_iconv_convenience(global_loadparm), + lp_iconv_convenience(ldb_get_opaque(ar->module->ldb, "loadparm")), &nmd, (ndr_push_flags_fn_t)ndr_push_replPropertyMetaDataBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { @@ -1362,7 +1362,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a msg->dn = ar->sub.search_msg->dn; ndr_err = ndr_push_struct_blob(&nuv_value, msg, - lp_iconv_convenience(global_loadparm), + lp_iconv_convenience(ldb_get_opaque(ar->module->ldb, "loadparm")), &nuv, (ndr_push_flags_fn_t)ndr_push_replUpToDateVectorBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { @@ -1451,7 +1451,7 @@ static int replmd_replicated_uptodate_modify(struct replmd_replicated_request *a /* we now fill the value which is already attached to ldb_message */ ndr_err = ndr_push_struct_blob(nrf_value, msg, - lp_iconv_convenience(global_loadparm), + lp_iconv_convenience(ldb_get_opaque(ar->module->ldb, "loadparm")), &nrf, (ndr_push_flags_fn_t)ndr_push_repsFromToBlob); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { |