samba-tool dbcheck: answering 'none' actually means something else

Andriy Syrovenko andriys at gmail.com
Thu May 24 14:00:25 MDT 2012


Yes, it does.
Thanks.

2012/5/24 Matthias Dieter Wallnöfer <mdw at samba.org>:
> Hi Andriy,
>
> does this patch fix your issue?
>>
>> diff --git a/source4/scripting/python/samba/dbchecker.py
>> b/source4/scripting/pyt
>> index 587d63c..95be1ce 100644
>> --- a/source4/scripting/python/samba/dbchecker.py
>> +++ b/source4/scripting/python/samba/dbchecker.py
>> @@ -110,7 +110,7 @@ class dbcheck(object):
>>             return True
>>         if c == 'NONE':
>>             setattr(self, all_attr, 'NONE')
>> -            return True
>> +            return False
>>         return c
>>
>>     def do_modify(self, m, controls, msg, validate=True):
>>
> Matthias
>
> Andriy Syrovenko schrieb:
>
>> Hi,
>>
>> When 'samba-tool dbcheck --fix' requests for the operation
>> confirmation, answering 'none' seems to mean 'Fix the current item,
>> but do not fix any subsequent ones', which is either incorrect or
>> misleading and counter-intuitive.
>>
>> To illustrate:
>>
>> bash-4.2# samba-tool dbcheck --cross-ncs --fix
>> Checking 3763 objects
>> ERROR: missing GUID component for objectCategory in object
>> DC=pc01,DC=example.com,CN=MicrosoftDNS,DC=DomainDnsZones,DC=example,DC=com
>> - CN=Dns-Node,CN=Schema,CN=Configuration,DC=example,DC=com
>> Change DN
>> to<GUID=757b9168-339e-4f41-b0e7-cc7615f5db53>;CN=Dns-Node,CN=Schema,CN=Configuration,DC=example,DC=com?
>> [y/N/all/none] none
>> Fixed missing GUID on attribute objectCategory
>> ERROR: missing GUID component for objectCategory in object
>> DC=pc02,DC=example.com,CN=MicrosoftDNS,DC=DomainDnsZones,DC=example,DC=com
>> - CN=Dns-Node,CN=Schema,CN=Configuration,DC=example,DC=com
>> Not fixing missing GUID
>> Checked 3763 objects (2 errors)
>>
>> There were two object with missing GUID, and I answered 'none' when
>> dbcheck first asked for confirmation. However dbcheck actually fixed
>> one record, despite I asked it not doing that. Subsequent invocation
>> of 'samba-tool dbcheck --cross-ncs' (without '--fix') showed that one
>> record was indeed fixed.
>>
>> Regards,
>> Andrey.
>
>


More information about the samba-technical mailing list