summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:17 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:58 +0100
commita2cea02584256e2cf59da5420e8e080e70c66939 (patch)
treee02e1efee04100bf7640da0dabdc8fe069aa00fe /source4/libnet
parentd891c0c74a03d797aed1c5ac0329fd9d1d78da63 (diff)
downloadsamba-a2cea02584256e2cf59da5420e8e080e70c66939.tar.gz
samba-a2cea02584256e2cf59da5420e8e080e70c66939.tar.bz2
samba-a2cea02584256e2cf59da5420e8e080e70c66939.zip
r26430: require explicit specification of loadparm context.
(This used to be commit 1b947fe0e6e16318e5a8127bb4932d6b5d20bcf6)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_samdump_keytab.c8
-rw-r--r--source4/libnet/libnet_vampire.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/source4/libnet/libnet_samdump_keytab.c b/source4/libnet/libnet_samdump_keytab.c
index c235df6d25..c25cb4d9c5 100644
--- a/source4/libnet/libnet_samdump_keytab.c
+++ b/source4/libnet/libnet_samdump_keytab.c
@@ -28,6 +28,7 @@
#include "param/param.h"
static NTSTATUS samdump_keytab_handle_user(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
const char *keytab_name,
struct netr_DELTA_ENUM *delta)
{
@@ -45,19 +46,19 @@ static NTSTATUS samdump_keytab_handle_user(TALLOC_CTX *mem_ctx,
if (!credentials) {
return NT_STATUS_NO_MEMORY;
}
- cli_credentials_set_conf(credentials, global_loadparm);
+ cli_credentials_set_conf(credentials, lp_ctx);
cli_credentials_set_username(credentials, username, CRED_SPECIFIED);
/* We really should consult ldap in the main SamSync code, and
* pass a value in here */
cli_credentials_set_kvno(credentials, 0);
cli_credentials_set_nt_hash(credentials, &user->ntpassword, CRED_SPECIFIED);
- ret = cli_credentials_set_keytab_name(credentials, keytab_name, CRED_SPECIFIED);
+ ret = cli_credentials_set_keytab_name(credentials, lp_ctx, keytab_name, CRED_SPECIFIED);
if (ret) {
return NT_STATUS_UNSUCCESSFUL;
}
- ret = cli_credentials_update_keytab(credentials);
+ ret = cli_credentials_update_keytab(credentials, lp_ctx);
if (ret) {
return NT_STATUS_UNSUCCESSFUL;
}
@@ -81,6 +82,7 @@ static NTSTATUS libnet_samdump_keytab_fn(TALLOC_CTX *mem_ctx,
/* not interested in builtin users */
if (database == SAM_DATABASE_DOMAIN) {
nt_status = samdump_keytab_handle_user(mem_ctx,
+ global_loadparm,
keytab_name,
delta);
break;
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 574b34c246..df4cb4d657 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -186,7 +186,7 @@ NTSTATUS libnet_SamSync_netlogon(struct libnet_context *ctx, TALLOC_CTX *mem_ctx
return NT_STATUS_NO_MEMORY;
}
cli_credentials_set_conf(machine_account, ctx->lp_ctx);
- nt_status = cli_credentials_set_machine_account(machine_account);
+ nt_status = cli_credentials_set_machine_account(machine_account, ctx->lp_ctx);
if (!NT_STATUS_IS_OK(nt_status)) {
r->out.error_string = talloc_strdup(mem_ctx, "Could not obtain machine account password - are we joined to the domain?");
talloc_free(samsync_ctx);