diff options
-rw-r--r-- | source3/libnet/libnet_join.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index f55d558c01..90e1b5941e 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -207,6 +207,11 @@ static ADS_STATUS libnet_join_precreate_machine_acct(TALLOC_CTX *mem_ctx, const char *attrs[] = { "dn", NULL }; bool moved = false; + status = ads_check_ou_dn(mem_ctx, r->in.ads, r->in.account_ou); + if (!ADS_ERR_OK(status)) { + return status; + } + status = ads_search_dn(r->in.ads, &res, r->in.account_ou, attrs); if (!ADS_ERR_OK(status)) { return status; |