<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/tests, branch talloc-2.4.0</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>tests/krb5: Use Python bindings for LZ77+Huffman compression</title>
<updated>2023-01-10T21:18:01+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2022-12-19T20:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d7bab36ad11eb4d67dcb6b12fc18d421074b9c5e'/>
<id>d7bab36ad11eb4d67dcb6b12fc18d421074b9c5e</id>
<content type='text'>
We can now remove our existing decompression implementation in Python.

Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Tue Jan 10 21:18:01 UTC 2023 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can now remove our existing decompression implementation in Python.

Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;

Autobuild-User(master): Jeremy Allison &lt;jra@samba.org&gt;
Autobuild-Date(master): Tue Jan 10 21:18:01 UTC 2023 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Use system ldbsearch if we built against system libldb</title>
<updated>2022-12-23T14:35:31+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-12-22T14:29:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6b4cc4ccbca5a02a339d15b8b3557b5d38d70910'/>
<id>6b4cc4ccbca5a02a339d15b8b3557b5d38d70910</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@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>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Use system ldbdump if we build with system ldb</title>
<updated>2022-12-23T14:35:31+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-12-22T14:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9ac8dac6dbbdb470f0fa0878c1fa1aeca172b73a'/>
<id>9ac8dac6dbbdb470f0fa0878c1fa1aeca172b73a</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@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>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Use system ldbsearch if we build with system libldb</title>
<updated>2022-12-23T14:35:31+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2022-12-22T13:47:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=11be7d802d33d0376ec5c36ddd8d30d32b088a1e'/>
<id>11be7d802d33d0376ec5c36ddd8d30d32b088a1e</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@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>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>lib/compression: add simple python bindings</title>
<updated>2022-12-22T19:50:33+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2022-11-25T03:43:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=41249302a389e4e9c2c79a679d033d2331782f5b'/>
<id>41249302a389e4e9c2c79a679d033d2331782f5b</id>
<content type='text'>
There are four functions, allowing compression and decompression in
the two formats we support so far. The functions will accept bytes or
unicode strings which are treated as utf-8.

The LZ77+Huffman decompression algorithm requires an exact target
length to decompress, so this is mandatory.

The plain decompression algorithm does not need an exact length, but
you can provide one to help it know how much space to allocate. As
currently written, you can provide a short length and it will often
succeed in decompressing to a different shorter string.

These bindings are intended to make ad-hoc investigation easier, not
for production use. This is reflected in the guesses about output size
that plain_decompress() makes if you don't supply one -- either they
are stupidly wasteful or ridiculously insufficient, depending on
whether or not you were trying to decompress a 20MB string.

&gt;&gt;&gt; a = '12345678'
&gt;&gt;&gt; import compression
&gt;&gt;&gt; b = compression.huffman_compress(a)
&gt;&gt;&gt; b
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00  #....
&gt;&gt;&gt; len(b)
262
&gt;&gt;&gt; c = compression.huffman_decompress(b, len(a))
&gt;&gt;&gt; c
b'12345678'                                   # note, c is bytes, a is str
&gt;&gt;&gt; a
'12345678'
&gt;&gt;&gt; d = compression.plain_compress(a)
&gt;&gt;&gt; d
b'\xff\xff\xff\x0012345678'
&gt;&gt;&gt; compression.plain_decompress(d)           # no size specified, guesses
b'12345678'
&gt;&gt;&gt; compression.plain_decompress(d,5)
b'12345'
&gt;&gt;&gt; compression.plain_decompress(d,0)         # 0 for auto
b'12345678'
&gt;&gt;&gt; compression.plain_decompress(d,1)
b'1'
&gt;&gt;&gt; compression.plain_decompress(a,444)
Traceback (most recent call last):
   compression.CompressionError: unable to decompress data into a buffer of 444 bytes.
&gt;&gt;&gt; compression.plain_decompress(b,444)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 #...

That last one decompresses the Huffman compressed file with the plain
compressor; pretty much any string is valid for plain decompression.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are four functions, allowing compression and decompression in
the two formats we support so far. The functions will accept bytes or
unicode strings which are treated as utf-8.

The LZ77+Huffman decompression algorithm requires an exact target
length to decompress, so this is mandatory.

The plain decompression algorithm does not need an exact length, but
you can provide one to help it know how much space to allocate. As
currently written, you can provide a short length and it will often
succeed in decompressing to a different shorter string.

These bindings are intended to make ad-hoc investigation easier, not
for production use. This is reflected in the guesses about output size
that plain_decompress() makes if you don't supply one -- either they
are stupidly wasteful or ridiculously insufficient, depending on
whether or not you were trying to decompress a 20MB string.

&gt;&gt;&gt; a = '12345678'
&gt;&gt;&gt; import compression
&gt;&gt;&gt; b = compression.huffman_compress(a)
&gt;&gt;&gt; b
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00  #....
&gt;&gt;&gt; len(b)
262
&gt;&gt;&gt; c = compression.huffman_decompress(b, len(a))
&gt;&gt;&gt; c
b'12345678'                                   # note, c is bytes, a is str
&gt;&gt;&gt; a
'12345678'
&gt;&gt;&gt; d = compression.plain_compress(a)
&gt;&gt;&gt; d
b'\xff\xff\xff\x0012345678'
&gt;&gt;&gt; compression.plain_decompress(d)           # no size specified, guesses
b'12345678'
&gt;&gt;&gt; compression.plain_decompress(d,5)
b'12345'
&gt;&gt;&gt; compression.plain_decompress(d,0)         # 0 for auto
b'12345678'
&gt;&gt;&gt; compression.plain_decompress(d,1)
b'1'
&gt;&gt;&gt; compression.plain_decompress(a,444)
Traceback (most recent call last):
   compression.CompressionError: unable to decompress data into a buffer of 444 bytes.
&gt;&gt;&gt; compression.plain_decompress(b,444)
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 #...

That last one decompresses the Huffman compressed file with the plain
compressor; pretty much any string is valid for plain decompression.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gp: Ensure rsop is tested for every CSE</title>
<updated>2022-12-21T02:04:37+00:00</updated>
<author>
<name>David Mulder</name>
<email>dmulder@samba.org</email>
</author>
<published>2022-12-09T17:31:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0a1778cde011fecb000f5b7e6f43920f5ab59da0'/>
<id>0a1778cde011fecb000f5b7e6f43920f5ab59da0</id>
<content type='text'>
A bug cropped up in the rsop that was causing a
crash because this wasn't being tested.

Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A bug cropped up in the rsop that was causing a
crash because this wasn't being tested.

Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gp: Enable gpupdate output when testing</title>
<updated>2022-12-21T02:04:37+00:00</updated>
<author>
<name>David Mulder</name>
<email>dmulder@samba.org</email>
</author>
<published>2022-12-08T22:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=74598eeef72e6b260393df7451c957d7fde1f59a'/>
<id>74598eeef72e6b260393df7451c957d7fde1f59a</id>
<content type='text'>
Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gp: Ensure policy changes don't leave files behind</title>
<updated>2022-12-21T02:04:37+00:00</updated>
<author>
<name>David Mulder</name>
<email>dmulder@samba.org</email>
</author>
<published>2022-12-07T17:17:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6710c50f54025d8174aacd17515d58ff50e6d28a'/>
<id>6710c50f54025d8174aacd17515d58ff50e6d28a</id>
<content type='text'>
This test exercises the gp_file_applier and
ensures that when a policy is modified, no old
policy is left behind.

Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test exercises the gp_file_applier and
ensures that when a policy is modified, no old
policy is left behind.

Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gp: Test that files are re-created if manually removed</title>
<updated>2022-12-21T02:04:37+00:00</updated>
<author>
<name>David Mulder</name>
<email>dmulder@samba.org</email>
</author>
<published>2022-12-07T16:49:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d170d8cfbb4571af8b66f1dcd7355a598b0abd1f'/>
<id>d170d8cfbb4571af8b66f1dcd7355a598b0abd1f</id>
<content type='text'>
Currently applied files which are manually
removed do not get re-applied.

Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently applied files which are manually
removed do not get re-applied.

Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gp: Modify Chromium CSE to use new files applier</title>
<updated>2022-12-21T02:04:37+00:00</updated>
<author>
<name>David Mulder</name>
<email>dmulder@samba.org</email>
</author>
<published>2022-12-06T18:12:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=5037d402a54a0010382cc7825e6fba4322ba18b4'/>
<id>5037d402a54a0010382cc7825e6fba4322ba18b4</id>
<content type='text'>
Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Jeremy Allison &lt;jra@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
