summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2021-02-05 13:23:50 +0100
committerGünther Deschner <gd@samba.org>2021-07-14 16:49:30 +0000
commit9d9a11321195d6c5429eb6a773187157c816fe8b (patch)
tree7c1bcd07fd33d4948c5a526aefbf50fc2c1644a9 /source3/libnet
parentbd5dce667d82edf6d1597516e3bd1c9a1082c697 (diff)
downloadsamba-9d9a11321195d6c5429eb6a773187157c816fe8b.tar.gz
s3-libnet_join: add new provision_computer_account_only flag
Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_join.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index fb28fa44dfe..da926d26b8c 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -2371,6 +2371,13 @@ static WERROR libnet_join_post_processing(TALLOC_CTX *mem_ctx,
}
#endif /* HAVE_ADS */
+ if (r->in.provision_computer_account_only) {
+ /*
+ * When we only provision a computer account we are done here - gd.
+ */
+ return WERR_OK;
+ }
+
saf_join_store(r->out.netbios_domain_name, r->in.dc_name);
if (r->out.dns_domain_name) {
saf_join_store(r->out.dns_domain_name, r->in.dc_name);
@@ -2701,9 +2708,11 @@ static WERROR libnet_DomainJoin(TALLOC_CTX *mem_ctx,
return ntstatus_to_werror(status);
}
- werr = libnet_join_check_config(mem_ctx, r);
- if (!W_ERROR_IS_OK(werr)) {
- goto done;
+ if (!r->in.provision_computer_account_only) {
+ werr = libnet_join_check_config(mem_ctx, r);
+ if (!W_ERROR_IS_OK(werr)) {
+ goto done;
+ }
}
#ifdef HAVE_ADS
@@ -2846,6 +2855,13 @@ WERROR libnet_Join(TALLOC_CTX *mem_ctx,
goto done;
}
+ if (r->in.provision_computer_account_only) {
+ /*
+ * When we only provision a computer account we are done here - gd.
+ */
+ goto done;
+ }
+
if (r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE) {
werr = libnet_join_post_verify(mem_ctx, r);
if (!W_ERROR_IS_OK(werr)) {