<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/drs_utils.py, branch talloc-2.4.2</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>python: use python3 style super statements</title>
<updated>2023-12-15T02:54:34+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2023-12-14T02:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c8ded4621d399e3561d6043bee4202ff42d50f1a'/>
<id>c8ded4621d399e3561d6043bee4202ff42d50f1a</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&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>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&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>python: pep257: docstring should use double quotes</title>
<updated>2023-12-15T02:54:34+00:00</updated>
<author>
<name>Rob van der Linde</name>
<email>rob@catalyst.net.nz</email>
</author>
<published>2023-12-14T02:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=ddba4a06bbe236dfecf6ee6fee8493e8ca0c2b14'/>
<id>ddba4a06bbe236dfecf6ee6fee8493e8ca0c2b14</id>
<content type='text'>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&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>
Signed-off-by: Rob van der Linde &lt;rob@catalyst.net.nz&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>python:samba: Fix code spelling</title>
<updated>2023-06-23T14:51:14+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2023-06-06T11:31:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c837ecf442cfb8e19abaa917ff61f323a41829fd'/>
<id>c837ecf442cfb8e19abaa917ff61f323a41829fd</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Fri Jun 23 14:51:14 UTC 2023 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Fri Jun 23 14:51:14 UTC 2023 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>CVE-2022-37966 selftest: Allow krb5 tests to run against an IP by using the target_hostname binding string</title>
<updated>2022-12-13T13:07:29+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2022-10-31T23:34:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c7cd6889177e8c705bb637172a60a5cf26734a3f'/>
<id>c7cd6889177e8c705bb637172a60a5cf26734a3f</id>
<content type='text'>
This makes it easier to test against a server that is not accessible via DNS.

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

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it easier to test against a server that is not accessible via DNS.

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

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python-drs: Add client-side debug and fallback for GET_ANC</title>
<updated>2022-10-04T02:48:37+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2022-09-15T05:10:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=bff2bc9c7d69ec2fbe9339c2353a0a846182f1ea'/>
<id>bff2bc9c7d69ec2fbe9339c2353a0a846182f1ea</id>
<content type='text'>
Samba 4.5 and earlier will fail to do GET_ANC correctly and will not
replicate non-critical parents of objects with isCriticalSystemObject=TRUE
when DRSUAPI_DRS_CRITICAL_ONLY is set.

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

Signed-off-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>
Samba 4.5 and earlier will fail to do GET_ANC correctly and will not
replicate non-critical parents of objects with isCriticalSystemObject=TRUE
when DRSUAPI_DRS_CRITICAL_ONLY is set.

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

Signed-off-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>libcli:util: Update werror table</title>
<updated>2022-06-14T07:21:29+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2022-04-28T08:33:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2c9a4ef86e5fa68091fc392740e7b04af759b698'/>
<id>2c9a4ef86e5fa68091fc392740e7b04af759b698</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>drs_utils: remove unused sendRemoveDsServer()</title>
<updated>2020-12-09T16:00:39+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2020-11-18T23:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=02c3a66cbec2c670d809b186cacc7d075c16ec54'/>
<id>02c3a66cbec2c670d809b186cacc7d075c16ec54</id>
<content type='text'>
The only caller of this was `samba-tool domain demote` which stopped
using it in 2015 with commit f121173cbf46fe64746d73adf40015c43d5c55fc.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only caller of this was `samba-tool domain demote` which stopped
using it in 2015 with commit f121173cbf46fe64746d73adf40015c43d5c55fc.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Noel Power &lt;npower@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drs_utils: Avoid invalid dereference of v8 requests</title>
<updated>2018-11-06T06:15:33+00:00</updated>
<author>
<name>Tim Beale</name>
<email>timbeale@catalyst.net.nz</email>
</author>
<published>2018-11-05T04:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2229f4620d563ce0f0ea256dd89ce248c6656b9e'/>
<id>2229f4620d563ce0f0ea256dd89ce248c6656b9e</id>
<content type='text'>
req.more_flags only exists for v10 requests, so we throw an exception if
we try to dereference that field on a v8 (or v5) request. Unfortunately,
we were checking that we support v10 *after* we had tried to access the
more_flags. This patch fixes up the order of the checks.

This may be a problem trying to replicate with an older Windows DC
(pre-2008R2), and was reported on the samba mailing-list at one point:
https://lists.samba.org/archive/samba/2018-June/216541.html

Unfortunately this patch doesn't help the overall situation at all (the
join will fail because we can't resolve the link target and we can't use
GET_TGT). But it now gives you a more meaningful error, i.e.

  ERROR(runtime): uncaught exception - (8639, "Failed to process 'chunk'
    of DRS replicated objects: DOS code 0x000021bf"
instead of:
  ERROR(&lt;type 'exceptions.AttributeError'&gt;): uncaught exception -
    'drsuapi.DsGetNCChangesRequest8' object has no attribute 'more_flags'

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Tim Beale &lt;timbeale@samba.org&gt;
Autobuild-Date(master): Tue Nov  6 07:15:33 CET 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
req.more_flags only exists for v10 requests, so we throw an exception if
we try to dereference that field on a v8 (or v5) request. Unfortunately,
we were checking that we support v10 *after* we had tried to access the
more_flags. This patch fixes up the order of the checks.

This may be a problem trying to replicate with an older Windows DC
(pre-2008R2), and was reported on the samba mailing-list at one point:
https://lists.samba.org/archive/samba/2018-June/216541.html

Unfortunately this patch doesn't help the overall situation at all (the
join will fail because we can't resolve the link target and we can't use
GET_TGT). But it now gives you a more meaningful error, i.e.

  ERROR(runtime): uncaught exception - (8639, "Failed to process 'chunk'
    of DRS replicated objects: DOS code 0x000021bf"
instead of:
  ERROR(&lt;type 'exceptions.AttributeError'&gt;): uncaught exception -
    'drsuapi.DsGetNCChangesRequest8' object has no attribute 'more_flags'

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Tim Beale &lt;timbeale@samba.org&gt;
Autobuild-Date(master): Tue Nov  6 07:15:33 CET 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>drs_utils: Fix some long lines</title>
<updated>2018-11-06T02:39:11+00:00</updated>
<author>
<name>Tim Beale</name>
<email>timbeale@catalyst.net.nz</email>
</author>
<published>2018-11-05T03:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=63bfdb3c1150eec64bf3d78e1f2b9749ef077831'/>
<id>63bfdb3c1150eec64bf3d78e1f2b9749ef077831</id>
<content type='text'>
Tweak the code slightly to avoid some 80+ character lines.

Signed-off-by: Tim Beale &lt;timbeale@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>
Tweak the code slightly to avoid some 80+ character lines.

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drs_util: Improve memory usage when joining large DB</title>
<updated>2018-10-17T06:56:42+00:00</updated>
<author>
<name>Tim Beale</name>
<email>timbeale@catalyst.net.nz</email>
</author>
<published>2018-10-12T00:54:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=fdb6b86b8e326e1d9d1ca4be780ff374b6dddde2'/>
<id>fdb6b86b8e326e1d9d1ca4be780ff374b6dddde2</id>
<content type='text'>
drs_Replicate.replicate() could consume a large amount of memory when
replicating a large DB. This is not a leak - the memory gets freed when
the function returns (i.e. once the partition is fully replicated).
However, while the partition is in the process of being replicated, it
accumulates memory for each replication chunk it receives. This can have
considerable overhead with 1000s of objects/links in the partition.

This was exhausting memory when joining a VM with 1Gb RAM to a DC with
25K users (average ~15 group memberships per user).

It seems that by storing a reference to something that's on the ctr's
talloc tree, it doesn't free up the memory for each ctr message (until
the function actually returns and req is destroyed).

With 10K users (and average 15 group memberships per user), .replicate()
consumed 211Mb of memory, according to talloc.report_full(). With this
patch, it goes down to just the current ctr message (1-2Mb).

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Wed Oct 17 08:56:42 CEST 2018 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drs_Replicate.replicate() could consume a large amount of memory when
replicating a large DB. This is not a leak - the memory gets freed when
the function returns (i.e. once the partition is fully replicated).
However, while the partition is in the process of being replicated, it
accumulates memory for each replication chunk it receives. This can have
considerable overhead with 1000s of objects/links in the partition.

This was exhausting memory when joining a VM with 1Gb RAM to a DC with
25K users (average ~15 group memberships per user).

It seems that by storing a reference to something that's on the ctr's
talloc tree, it doesn't free up the memory for each ctr message (until
the function actually returns and req is destroyed).

With 10K users (and average 15 group memberships per user), .replicate()
consumed 211Mb of memory, according to talloc.report_full(). With this
patch, it goes down to just the current ctr message (1-2Mb).

Signed-off-by: Tim Beale &lt;timbeale@catalyst.net.nz&gt;
Reviewed-by: Garming Sam &lt;garming@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Wed Oct 17 08:56:42 CEST 2018 on sn-devel-144
</pre>
</div>
</content>
</entry>
</feed>
