[PATCH] Fix joining specific ou (regression from #13861)

Stefan Metzmacher metze at samba.org
Wed Sep 4 12:54:12 UTC 2019


Am 04.09.19 um 14:03 schrieb Alexander Bokovoy via samba-technical:
> 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.

Please add

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14007

As that's the already existing bug for the regression.
And I think is has a similar patch attached.

Thanks!
metze


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190904/430a558d/signature.sig>


More information about the samba-technical mailing list