summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-05-17 10:29:59 +0200
committerStefan Metzmacher <metze@samba.org>2017-06-27 16:57:46 +0200
commitc3ad8be5d5192070c599350d6ab28c064206b6cf (patch)
tree98adc3aebe0bb98b2dd9a4b9cffb2f30c6f3db85 /source3/libnet
parentc7c17d9f503d6037aa8ed0bd7ab7cf52f5f28382 (diff)
downloadsamba-c3ad8be5d5192070c599350d6ab28c064206b6cf.tar.gz
s3:libnet: make use of secrets_store_JoinCtx()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_join.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 99bba2ae349..591c177b44b 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -987,31 +987,15 @@ static ADS_STATUS libnet_join_post_processing_ads_sync(TALLOC_CTX *mem_ctx,
static bool libnet_join_joindomain_store_secrets(TALLOC_CTX *mem_ctx,
struct libnet_JoinCtx *r)
{
- if (!secrets_store_domain_sid(r->out.netbios_domain_name,
- r->out.domain_sid))
- {
- DEBUG(1,("Failed to save domain sid\n"));
- return false;
- }
+ NTSTATUS status;
- if (!secrets_store_machine_password(r->in.machine_password,
- r->out.netbios_domain_name,
- r->in.secure_channel_type))
- {
- DEBUG(1,("Failed to save machine password\n"));
+ status = secrets_store_JoinCtx(r);
+ if (!NT_STATUS_IS_OK(status)) {
+ DBG_ERR("secrets_store_JoinCtx() failed %s\n",
+ nt_errstr(status));
return false;
}
- if (r->out.krb5_salt != NULL) {
- bool ok;
-
- ok = kerberos_secrets_store_des_salt(r->out.krb5_salt);
- if (!ok) {
- DEBUG(1,("Failed to save krb5 salt\n"));
- return false;
- }
- }
-
return true;
}