<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/tests/usage.py, branch master</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>CVE-2025-10230: s4/tests: check that wins hook sanitizes names</title>
<updated>2025-10-21T18:40:37+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2025-09-09T01:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=90b01ac9029169f0a185e74233a71b19a1b4acf0'/>
<id>90b01ac9029169f0a185e74233a71b19a1b4acf0</id>
<content type='text'>
An smb.conf can contain a 'wins hook' parameter, which names a script
to run when a WINS name is changed. The man page says

    The second argument is the NetBIOS name. If the name is not a
    legal name then the wins hook is not called. Legal names contain
    only letters, digits, hyphens, underscores and periods.

but it turns out the legality check is not performed if the WINS
server in question is the source4 nbt one. It is not expected that
people will run this server, but they can. This is bad because the
name is passed unescaped into a shell command line, allowing command
injection.

For this test we don't care whether the WINS server is returning an
error code, just whether it is running the wins hook. The tests show
it often runs the hook it shouldn't, though some characters are
incidentally blocked because the name has to fit in a DN before it
gets to the hook, and DNs have a few syntactic restrictions (e.g.,
blocking '&lt;', '&gt;', and ';').

The source3 WINS server that is used by Samba when not run as a DC is
not affected and not here tested.

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

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An smb.conf can contain a 'wins hook' parameter, which names a script
to run when a WINS name is changed. The man page says

    The second argument is the NetBIOS name. If the name is not a
    legal name then the wins hook is not called. Legal names contain
    only letters, digits, hyphens, underscores and periods.

but it turns out the legality check is not performed if the WINS
server in question is the source4 nbt one. It is not expected that
people will run this server, but they can. This is bad because the
name is passed unescaped into a shell command line, allowing command
injection.

For this test we don't care whether the WINS server is returning an
error code, just whether it is running the wins hook. The tests show
it often runs the hook it shouldn't, though some characters are
incidentally blocked because the name has to fit in a DN before it
gets to the hook, and DNs have a few syntactic restrictions (e.g.,
blocking '&lt;', '&gt;', and ';').

The source3 WINS server that is used by Samba when not run as a DC is
not affected and not here tested.

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

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix usage test broken by rust vendor sources</title>
<updated>2024-10-23T14:21:34+00:00</updated>
<author>
<name>David Mulder</name>
<email>dmulder@samba.org</email>
</author>
<published>2024-08-29T20:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a18c6ff20bc9eaacc1c5caa3923ce0b38b96ad0c'/>
<id>a18c6ff20bc9eaacc1c5caa3923ce0b38b96ad0c</id>
<content type='text'>
Signed-off-by: David Mulder &lt;dmulder@samba.org&gt;
Reviewed-by: Alexander Bokovoy &lt;ab@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: Alexander Bokovoy &lt;ab@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python/blackbox: add rpcd_witness_samba_only.py test</title>
<updated>2024-01-26T17:00:33+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2024-01-10T14:11:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b17e090e7c1b864eb6e8a9663c6145fb97d91e0f'/>
<id>b17e090e7c1b864eb6e8a9663c6145fb97d91e0f</id>
<content type='text'>
This tests the witness service and its interaction with
ctdb.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Günther Deschner &lt;gd@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This tests the witness service and its interaction with
ctdb.

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Günther Deschner &lt;gd@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Move NDR tests to their own directory</title>
<updated>2023-11-20T21:50:32+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-11-20T02:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=21a3f60cfc783d07994b29696c7a75e2372dd114'/>
<id>21a3f60cfc783d07994b29696c7a75e2372dd114</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@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: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Ensure that we don’t overwrite tests</title>
<updated>2023-05-29T22:32:28+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-05-25T05:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=fb759809f89d8277542b1106d39939f32a04778e'/>
<id>fb759809f89d8277542b1106d39939f32a04778e</id>
<content type='text'>
If the file iterator returns two entries with the same name, one may
overwrite the other.

script_iterator() currently ensures this won’t happen, but it pays to be
safe.

Signed-off-by: Joseph Sutton &lt;josephsutton@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>
If the file iterator returns two entries with the same name, one may
overwrite the other.

script_iterator() currently ensures this won’t happen, but it pays to be
safe.

Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Remove unused imports</title>
<updated>2023-05-29T22:32:28+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-05-25T04:57:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2009166efd40f39cc29a7cf0a3cf97d73df6678d'/>
<id>2009166efd40f39cc29a7cf0a3cf97d73df6678d</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@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: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python:tests: Exclude Python test directories</title>
<updated>2023-05-29T22:32:28+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-05-25T04:58:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c51bffa8fdcac6f0d49fb4cc7656ab789ab50bc2'/>
<id>c51bffa8fdcac6f0d49fb4cc7656ab789ab50bc2</id>
<content type='text'>
Practically all of our Kerberos tests are excluded already. Many of our
tests aren’t marked as executable, and so aren’t being checked anyway.
Rather than having a large list of exclusions which one may easily
forget to update, just exclude the test directories.

Signed-off-by: Joseph Sutton &lt;josephsutton@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>
Practically all of our Kerberos tests are excluded already. Many of our
tests aren’t marked as executable, and so aren’t being checked anyway.
Rather than having a large list of exclusions which one may easily
forget to update, just exclude the test directories.

Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/krb5: Add tests for authentication policies</title>
<updated>2023-05-18T01:03:37+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-05-04T01:53:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=84a7ae8e0c7730e03161d69b5ca55436cfc5b066'/>
<id>84a7ae8e0c7730e03161d69b5ca55436cfc5b066</id>
<content type='text'>
Signed-off-by: Joseph Sutton &lt;josephsutton@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: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selftest: Add python test that verifies that we can parse a PAC</title>
<updated>2023-03-31T01:48:30+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2023-03-27T01:19:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2cba54ba30e96dafb5a49f11defdb08efcc19590'/>
<id>2cba54ba30e96dafb5a49f11defdb08efcc19590</id>
<content type='text'>
This give us a building block to test the PAC claims format

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>
This give us a building block to test the PAC claims format

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>tests/krb5: Add tests for device info</title>
<updated>2023-03-08T04:39:32+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-03-02T22:48:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0ac800d0081fb893effaa555d3117102556a7b75'/>
<id>0ac800d0081fb893effaa555d3117102556a7b75</id>
<content type='text'>
These tests verify that the groups in the device info structure in the
PAC are exactly as expected under various scenarios.

Signed-off-by: Joseph Sutton &lt;josephsutton@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>
These tests verify that the groups in the device info structure in the
PAC are exactly as expected under various scenarios.

Signed-off-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
