[PATCH] Fix joining specific ou (regression from #13861)
Alexander Bokovoy
ab at samba.org
Wed Sep 4 12:03:18 UTC 2019
On ke, 04 syys 2019, Günther Deschner via samba-technical wrote:
> Hi Alexander,
>
> On 04/09/2019 13:40, Alexander Bokovoy wrote:
>
> >> @@ -2122,7 +2122,7 @@ ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads,
> >>
> >> ret = ads_find_machine_acct(ads, &res, machine_escaped);
> >> ads_msgfree(ads, res);
> >> - if (ADS_ERR_OK(ret)) {
> >> + if (ADS_ERR_OK(ret) && ads_count_replies(ads, res) == 1) {
> >> DBG_DEBUG("Host account for %s already exists.\n",
> >> machine_escaped);
> > I wonder if the check has to be ads_count_replies(ads, res) > 0 ?
> > Technically, there could be a unique name but there might be names in
> > multiple OUs.
>
> The LDAP query looks for the specific samaccountname of that machine
> which will be unique in the entire domain namespace.
Ok, discussed it more on IRC and since GC search will not be done here,
'== 1' is OK.
RB+, please push.
--
/ Alexander Bokovoy
More information about the samba-technical
mailing list