<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/samba.git/lib, branch master</title>
<subtitle>git.samba.org: samba.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/'/>
<entry>
<title>lib:audit_logging: Fix typo in log message</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-15T22:00:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=32b49d8a56e353d4f5b8b031aea75324056ba6ad'/>
<id>32b49d8a56e353d4f5b8b031aea75324056ba6ad</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>lib:audit_logging: Add function to add a formatted time value to a JSON message</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-15T21:57:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=d7b68236ecf8692f276d63d29e475c3b1ddb290d'/>
<id>d7b68236ecf8692f276d63d29e475c3b1ddb290d</id>
<content type='text'>
json_add_timestamp() is limited to adding a ‘timestamp’ field with the
current time. The new function can add an arbitrary timestamp with an
arbitrary field name.

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>
json_add_timestamp() is limited to adding a ‘timestamp’ field with the
current time. The new function can add an arbitrary timestamp with an
arbitrary field name.

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>lib:audit_logging: Add function to add an optional boolean value to a JSON message</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-15T21:55:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=0080148483c2972393d33bf1f2c7dbb248bbb9c0'/>
<id>0080148483c2972393d33bf1f2c7dbb248bbb9c0</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>lib:audit_logging: Add function to add flags to a JSON message</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-15T21:53:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=4440f1db54b7ad54b7a4920ac67236d1d8605353'/>
<id>4440f1db54b7ad54b7a4920ac67236d1d8605353</id>
<content type='text'>
This replaces a couple of calls to snprintf() in
log_authentication_event_json() and log_successful_authz_event_json()
respectively.

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>
This replaces a couple of calls to snprintf() in
log_authentication_event_json() and log_successful_authz_event_json()
respectively.

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: Safely clear structure members</title>
<updated>2023-05-16T23:29:32+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-04-23T22:42:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=f573177c352c2df89c7d5ffd425a37b46b12166c'/>
<id>f573177c352c2df89c7d5ffd425a37b46b12166c</id>
<content type='text'>
Using Py_CLEAR() ensures that these structures are observed in a
consistent state by any Python code that may run during deconstruction.

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>
Using Py_CLEAR() ensures that these structures are observed in a
consistent state by any Python code that may run during deconstruction.

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>lib:util: prefer size_t for random data generation functions</title>
<updated>2023-05-16T23:29:32+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dantipov@cloudlinux.com</email>
</author>
<published>2023-05-03T07:32:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=cea9b25571f1956e09fc376e1127f78c6f9a4a19'/>
<id>cea9b25571f1956e09fc376e1127f78c6f9a4a19</id>
<content type='text'>
Prefer 'size_t' over 'int' in generate_random_buffer(),
generate_secret_buffer() and generate_nonce_buffer() to
match an underlying gnutls_rnd() calls.

Signed-off-by: Dmitry Antipov &lt;dantipov@cloudlinux.com&gt;
Reviewed-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>
Prefer 'size_t' over 'int' in generate_random_buffer(),
generate_secret_buffer() and generate_nonce_buffer() to
match an underlying gnutls_rnd() calls.

Signed-off-by: Dmitry Antipov &lt;dantipov@cloudlinux.com&gt;
Reviewed-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>param: Add new parameter "ad dc functional level"</title>
<updated>2023-05-16T23:29:32+00:00</updated>
<author>
<name>Andrew Bartlett</name>
<email>abartlet@samba.org</email>
</author>
<published>2023-05-09T04:37:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=e5c3e076c8f85cda11bf0be29a6f26a852c5a343'/>
<id>e5c3e076c8f85cda11bf0be29a6f26a852c5a343</id>
<content type='text'>
This allows the new unsupported functional levels to be unlocked, but with an smb.conf
option that is easily seen.

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows the new unsupported functional levels to be unlocked, but with an smb.conf
option that is easily seen.

Signed-off-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:ldb: do not offset against NULL pointer in ldb_ldif_read()</title>
<updated>2023-05-09T01:59:32+00:00</updated>
<author>
<name>Dmitry Antipov</name>
<email>dantipov@cloudlinux.com</email>
</author>
<published>2023-05-02T10:43:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=46ae5568fa7b9a96018d0eedadee6400632112ba'/>
<id>46ae5568fa7b9a96018d0eedadee6400632112ba</id>
<content type='text'>
Fix the following error observed running samba.test.registry
compiled with clang-17 and UBsan:

lib/ldb/common/ldb_ldif.c:881:9: runtime error: applying non-zero offset 137438953440 to null pointer
    #0 0x7faa0eb3932f in ldb_ldif_read lib/ldb/common/ldb_ldif.c:881
    #1 0x7faa0eb3aec6 in ldb_ldif_read_string lib/ldb/common/ldb_ldif.c:1004
    #2 0x7faa077ed759 in dsdb_set_schema_from_ldif source4/dsdb/schema/schema_set.c:1113
    #3 0x7faa068fcbbf in py_dsdb_set_schema_from_ldif source4/dsdb/pydsdb.c:929
    #4 0x7faa1d1d4507 in cfunction_call (/lib64/libpython3.11.so.1.0+0x1d4507)
    [... a lot of Python calls skipped...]

I.e. number of elements should be checked against zero
before making an attempt to access an element by index.

Signed-off-by: Dmitry Antipov &lt;dantipov@cloudlinux.com&gt;
Reviewed-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>
Fix the following error observed running samba.test.registry
compiled with clang-17 and UBsan:

lib/ldb/common/ldb_ldif.c:881:9: runtime error: applying non-zero offset 137438953440 to null pointer
    #0 0x7faa0eb3932f in ldb_ldif_read lib/ldb/common/ldb_ldif.c:881
    #1 0x7faa0eb3aec6 in ldb_ldif_read_string lib/ldb/common/ldb_ldif.c:1004
    #2 0x7faa077ed759 in dsdb_set_schema_from_ldif source4/dsdb/schema/schema_set.c:1113
    #3 0x7faa068fcbbf in py_dsdb_set_schema_from_ldif source4/dsdb/pydsdb.c:929
    #4 0x7faa1d1d4507 in cfunction_call (/lib64/libpython3.11.so.1.0+0x1d4507)
    [... a lot of Python calls skipped...]

I.e. number of elements should be checked against zero
before making an attempt to access an element by index.

Signed-off-by: Dmitry Antipov &lt;dantipov@cloudlinux.com&gt;
Reviewed-by: Joseph Sutton &lt;josephsutton@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:addns: Don’t call memcpy() with a NULL pointer</title>
<updated>2023-05-05T02:54:31+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-04-30T23:22:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=2eb458118c3de09cea42749098df1f93dc0e9eca'/>
<id>2eb458118c3de09cea42749098df1f93dc0e9eca</id>
<content type='text'>
Doing so is undefined behaviour.

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>
Doing so is undefined behaviour.

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>lib:util: Fix undefined bitshift</title>
<updated>2023-05-05T02:54:31+00:00</updated>
<author>
<name>Joseph Sutton</name>
<email>josephsutton@catalyst.net.nz</email>
</author>
<published>2023-04-19T22:44:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/samba.git/commit/?id=443d70ee58f3dec05ddede22c33fec0860f52864'/>
<id>443d70ee58f3dec05ddede22c33fec0860f52864</id>
<content type='text'>
runtime error: left shift of 65535 by 16 places cannot be represented in type 'int'

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>
runtime error: left shift of 65535 by 16 places cannot be represented in type 'int'

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>
