<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/dbchecker.py, branch talloc-2.1.14</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>dbchecker: Fixing up incorrect DNs wasn't working</title>
<updated>2018-07-03T03:24:13+00:00</updated>
<author>
<name>Tim Beale</name>
<email>timbeale@catalyst.net.nz</email>
</author>
<published>2018-05-25T02:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=22208f52e6096fbe9413b8ff339d9446851e0874'/>
<id>22208f52e6096fbe9413b8ff339d9446851e0874</id>
<content type='text'>
dbcheck would fail to fix up attributes where the extended DN's GUID is
correct, but the DN itself is incorrect. The code failed attempting to
remove the old/incorrect DN, e.g.

 NOTE: old (due to rename or delete) DN string component for
 objectCategory in object CN=alice,CN=Users,DC=samba,DC=example,DC=com -
 &lt;GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e&gt;;
   CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=bad,DC=com
 Change DN to &lt;GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e&gt;;
   CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com?
 [y/N/all/none] y
 Failed to fix old DN string on attribute objectCategory : (16,
 "attribute 'objectCategory': no matching attribute value while deleting
 attribute on 'CN=alice,CN=Users,DC=samba,DC=example,DC=com'")

The problem was the LDB message specified the value to delete with its
full DN, including the GUID. The LDB code then helpfully corrected this
value on the way through, so that the DN got updated to reflect the
correct DN (i.e. 'DC=example,DC=com') of the object matching that GUID,
rather than the incorrect DN (i.e. 'DC=bad,DC=com') that we were trying
to remove. Because the requested value and the existing DB value didn't
match, the operation failed.

We can avoid this problem by passing down just the DN (not the extended
DN) of the value we want to delete. Without the GUID portion of the DN,
the LDB code will no longer try to correct it on the way through, and
the dbcheck operation will succeed.

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

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Pair-programmed-with: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dbcheck would fail to fix up attributes where the extended DN's GUID is
correct, but the DN itself is incorrect. The code failed attempting to
remove the old/incorrect DN, e.g.

 NOTE: old (due to rename or delete) DN string component for
 objectCategory in object CN=alice,CN=Users,DC=samba,DC=example,DC=com -
 &lt;GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e&gt;;
   CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=bad,DC=com
 Change DN to &lt;GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e&gt;;
   CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com?
 [y/N/all/none] y
 Failed to fix old DN string on attribute objectCategory : (16,
 "attribute 'objectCategory': no matching attribute value while deleting
 attribute on 'CN=alice,CN=Users,DC=samba,DC=example,DC=com'")

The problem was the LDB message specified the value to delete with its
full DN, including the GUID. The LDB code then helpfully corrected this
value on the way through, so that the DN got updated to reflect the
correct DN (i.e. 'DC=example,DC=com') of the object matching that GUID,
rather than the incorrect DN (i.e. 'DC=bad,DC=com') that we were trying
to remove. Because the requested value and the existing DB value didn't
match, the operation failed.

We can avoid this problem by passing down just the DN (not the extended
DN) of the value we want to delete. Without the GUID portion of the DN,
the LDB code will no longer try to correct it on the way through, and
the dbcheck operation will succeed.

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

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Pair-programmed-with: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dbcheck: Use symbolic control name for DSDB_CONTROL_DBCHECK_FIX_DUPLICATE_LINKS</title>
<updated>2018-07-03T03:24:13+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2018-06-29T02:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c7fd68088d84232a2f4074ca278b5448ef624afd'/>
<id>c7fd68088d84232a2f4074ca278b5448ef624afd</id>
<content type='text'>
While we do not wish to encourage use of this control, manually typed OIDs are
even more trouble, so pass out via pydsdb.

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While we do not wish to encourage use of this control, manually typed OIDs are
even more trouble, so pass out via pydsdb.

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: Bulk conversion callers of ldb.Dn second param</title>
<updated>2018-04-30T13:43:19+00:00</updated>
<author>
<name>Noel Power</name>
<email>noel.power@suse.com</email>
</author>
<published>2018-04-25T19:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b54472f868dc491579b471db6c6660bb03ab51c3'/>
<id>b54472f868dc491579b471db6c6660bb03ab51c3</id>
<content type='text'>
Convert second param passed to ldb.Dn to be unicode so py2 &amp; py3 code
will work

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Alexander Bokovoy &lt;ab@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert second param passed to ldb.Dn to be unicode so py2 &amp; py3 code
will work

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Alexander Bokovoy &lt;ab@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python/samba: bulk conversion of caller to dsdb_Dn 2nd param.</title>
<updated>2018-04-30T13:43:19+00:00</updated>
<author>
<name>Noel Power</name>
<email>noel.power@suse.com</email>
</author>
<published>2018-04-25T17:28:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=13280d3db9fdbbd87c6ed2faa69b24bc7660674d'/>
<id>13280d3db9fdbbd87c6ed2faa69b24bc7660674d</id>
<content type='text'>
Convert second param to dsdb_Dn to be unicode so py2 &amp; py3 code
will work

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Alexander Bokovoy &lt;ab@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Convert second param to dsdb_Dn to be unicode so py2 &amp; py3 code
will work

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Alexander Bokovoy &lt;ab@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba python libs: convert print func to be py2/py3 compatible</title>
<updated>2018-03-23T06:28:23+00:00</updated>
<author>
<name>Noel Power</name>
<email>noel.power@suse.com</email>
</author>
<published>2018-03-09T13:53:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9c251740b42b04eb0c277bc7975170e0fa784ebf'/>
<id>9c251740b42b04eb0c277bc7975170e0fa784ebf</id>
<content type='text'>
Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba python libs: convert 'except X, (tuple)' to 'except X as e'</title>
<updated>2018-02-28T22:01:40+00:00</updated>
<author>
<name>Noel Power</name>
<email>noel.power@suse.com</email>
</author>
<published>2018-02-23T14:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=91a5941f173caf3959df24c7702226b0088eeb86'/>
<id>91a5941f173caf3959df24c7702226b0088eeb86</id>
<content type='text'>
In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In addition to converting the except line another line is also added
for each except to extract the tuple contents.

Signed-off-by: Noel Power &lt;noel.power@suse.com&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba python libs: convert 'except X, e' to 'except X as e'</title>
<updated>2018-02-14T23:18:30+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2018-02-13T21:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=4885937bf87e6c37c60cda890dc18d46b5868a91'/>
<id>4885937bf87e6c37c60cda890dc18d46b5868a91</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dbcheck: skip find_missing_forward_links_from_backlinks() if the db has the sortedLinks feature</title>
<updated>2018-02-05T17:32:51+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2018-01-31T08:50:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0c3348feb09f4f0ba85455b8c3ff5c5fa60d139b'/>
<id>0c3348feb09f4f0ba85455b8c3ff5c5fa60d139b</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Stefan Metzmacher &lt;metze@samba.org&gt;
Autobuild-Date(master): Mon Feb  5 18:32:51 CET 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13228

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;

Autobuild-User(master): Stefan Metzmacher &lt;metze@samba.org&gt;
Autobuild-Date(master): Mon Feb  5 18:32:51 CET 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>dbcheck: add support for restoring missing forward links</title>
<updated>2018-02-05T12:49:13+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2018-01-25T13:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5bf823d68bd33ee3160175a18a3838eff4e3cbb2'/>
<id>5bf823d68bd33ee3160175a18a3838eff4e3cbb2</id>
<content type='text'>
This recovers broken databases with duplicate and missing
forward links.

See commit a25c99c9f1fd1814c56c21848c748cd0e038eed7 for
the fix that prevents to problem from happening.

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

Pair-Programmed-With: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This recovers broken databases with duplicate and missing
forward links.

See commit a25c99c9f1fd1814c56c21848c748cd0e038eed7 for
the fix that prevents to problem from happening.

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

Pair-Programmed-With: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dbcheck: add find_missing_forward_links_from_backlinks()</title>
<updated>2018-02-05T12:49:13+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2018-01-25T13:48:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d59f201388e8a16688adda145734dab8e27b785f'/>
<id>d59f201388e8a16688adda145734dab8e27b785f</id>
<content type='text'>
find_missing_forward_links_from_backlinks() finds and returns missing forward-links by
searching all for all objects that link to the object in the backlink attribute.

This will be used in the next commit to restore forward links in a corrupted
forward link attribute by passing the missing backling objects to
err_recover_forward_links().

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

Pair-Programmed-With: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
find_missing_forward_links_from_backlinks() finds and returns missing forward-links by
searching all for all objects that link to the object in the backlink attribute.

This will be used in the next commit to restore forward links in a corrupted
forward link attribute by passing the missing backling objects to
err_recover_forward_links().

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

Pair-Programmed-With: Stefan Metzmacher &lt;metze@samba.org&gt;

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
