[PATCH] samba-tool dbcheck: handle missing objectClass

Andrew Bartlett abartlet at samba.org
Wed Feb 26 20:22:55 MST 2014


On Tue, 2014-02-25 at 12:25 +0100, Felix Botner wrote:
> Am Dienstag, 25. Februar 2014, 10:22:30 schrieb Felix Botner: 
> > I am not sure and we cannot reproduce this on a regular basis but it happens
> > in multiserver environments (after the replication) and all objects lacking
> > the objectClass have been "\0ADEL:" objects.
> 
> unfortunately, that is not completely true. This also affects normal (non-
> deleted) objects.
> 
> dn: CN=WIN-PC,CN=Computers,DC=abc,DC=ucs
> instanceType: 4
> whenChanged: 20140211141300.0Z
> uSNCreated: 182964
> uSNChanged: 182964
> objectGUID: 98c7d79d-bf52-4b4c-b461-51ee0a907593
> operatingSystem: Windows 7 Professional
> operatingSystemVersion: 6.1 (7601)
> operatingSystemServicePack: Service Pack 1
> msDS-SupportedEncryptionTypes: 28
> distinguishedName: CN=WIN-PC,CN=Computers,DC=abc,DC=ucs

Can you get me the replPropertyMetaData for this and for
CN=2c4fcffe-f0c2-4e0f-b852-c9fe2805732f\0ADEL:60f25113-97be-4070-
b8e1-61289f8469df,CN=Deleted Objects,CN=Configuration,DC=sec,DC=lan

I've decoded the replPropertyMetaData from
cn=supergroup\0ADEL:84d4159b-4b1c-4b08-ba30-ded58028a0bd,CN=Deleted 
Objects,DC=autotest093,DC=local
and it looks like this:

abartlet at ruth:/data/samba/git/samba$ bin/ndrdump drsblobs decode_replPropertyMetaData in /tmp/replPropertyMetaData.bin 

pull returned NT_STATUS_OK
    decode_replPropertyMetaData: struct decode_replPropertyMetaData
        in: struct decode_replPropertyMetaData
            blob: struct replPropertyMetaDataBlob
                version                  : 0x00000001 (1)
                reserved                 : 0x00000000 (0)
                ctr                      : union replPropertyMetaDataCtr(case 1)
                ctr1: struct replPropertyMetaDataCtr1
                    count                    : 0x00000008 (8)
                    reserved                 : 0x00000000 (0)
                    array: ARRAY(8)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_instanceType (0x20001)
                            version                  : 0x00000001 (1)
                            originating_change_time  : Sun Jan 12 00:50:20 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cb (5067)
                            local_usn                : 0x0000000000001201 (4609)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_isDeleted (0x20030)
                            version                  : 0x00000001 (1)
                            originating_change_time  : Sun Jan 12 00:50:21 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cd (5069)
                            local_usn                : 0x0000000000001201 (4609)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_name (0x90001)
                            version                  : 0x00000002 (2)
                            originating_change_time  : Sun Jan 12 00:50:21 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cd (5069)
                            local_usn                : 0x0000000000001201 (4609)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_sAMAccountType (0x9012E)
                            version                  : 0x00000003 (3)
                            originating_change_time  : Sun Jan 12 00:50:21 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cd (5069)
                            local_usn                : 0x0000000000001201 (4609)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_lastKnownParent (0x9030D)
                            version                  : 0x00000001 (1)
                            originating_change_time  : Sun Jan 12 00:50:21 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cd (5069)
                            local_usn                : 0x0000000000001201 (4609)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_objectCategory (0x9030E)
                            version                  : 0x00000002 (2)
                            originating_change_time  : Sun Jan 12 00:50:21 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cd (5069)
                            local_usn                : 0x0000000000001201 (4609)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_isRecycled (0x9080A)
                            version                  : 0x00000001 (1)
                            originating_change_time  : Sun Jan 12 00:50:21 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cd (5069)
                            local_usn                : 0x0000000000001201 (4609)
                        array: struct replPropertyMetaData1
                            attid                    : DRSUAPI_ATTID_cn (0x3)
                            version                  : 0x00000002 (2)
                            originating_change_time  : Sun Jan 12 00:50:21 2014 NZDT
                            originating_invocation_id: e58e4aef-a930-44d2-b0a2-883b6bd93953
                            originating_usn          : 0x00000000000013cd (5069)
                            local_usn                : 0x0000000000001201 (4609)
dump OK

This is very interesting, as it clearly indicates that the
objectCategory went away at the same time as the isDeleted as set (ie at
deletion time).  Oddly, I can't see an entry for objectClass here at
all.

Do you have any data on which Samba versions this happens with?  I
strongly suspect that our deletion code is still broken. 

Andrew Bartlett
-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list