<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source3/locking, 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>s3/brlock: map nt-error from correct errno-value</title>
<updated>2026-04-21T02:05:57+00:00</updated>
<author>
<name>Shachar Sharon</name>
<email>ssharon@redhat.com</email>
</author>
<published>2026-04-19T13:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=33ca333e015067ff7b376ecb038e7490fa19e052'/>
<id>33ca333e015067ff7b376ecb038e7490fa19e052</id>
<content type='text'>
The functions 'brl_lock_windows_default' and 'brl_lock_posix' uses
explicit 'errno_ret' value to avoid possible errno overwrite. Use in
failure case.

Signed-off-by: Shachar Sharon &lt;ssharon@redhat.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
Reviewed-by: Shwetha Acharya &lt;Shwetha.K.Acharya@ibm.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;

Autobuild-User(master): Martin Schwenke &lt;martins@samba.org&gt;
Autobuild-Date(master): Tue Apr 21 02:05:57 UTC 2026 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The functions 'brl_lock_windows_default' and 'brl_lock_posix' uses
explicit 'errno_ret' value to avoid possible errno overwrite. Use in
failure case.

Signed-off-by: Shachar Sharon &lt;ssharon@redhat.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
Reviewed-by: Shwetha Acharya &lt;Shwetha.K.Acharya@ibm.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;

Autobuild-User(master): Martin Schwenke &lt;martins@samba.org&gt;
Autobuild-Date(master): Tue Apr 21 02:05:57 UTC 2026 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:locking: make leases.tdb none readable for others</title>
<updated>2026-04-07T15:09:38+00:00</updated>
<author>
<name>Ralph Wuerthner</name>
<email>ralph.wuerthner@de.ibm.com</email>
</author>
<published>2020-01-21T08:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=df6eeb5a54f32578010d1d61df71e83cb9f1b068'/>
<id>df6eeb5a54f32578010d1d61df71e83cb9f1b068</id>
<content type='text'>
Signed-off-by: Ralph Wuerthner &lt;ralph.wuerthner@de.ibm.com&gt;
Reviewed-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ralph Wuerthner &lt;ralph.wuerthner@de.ibm.com&gt;
Reviewed-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3:locking: make locking.tdb none readable for others</title>
<updated>2026-04-07T15:09:38+00:00</updated>
<author>
<name>Ralph Wuerthner</name>
<email>ralph.wuerthner@de.ibm.com</email>
</author>
<published>2020-01-21T08:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=41d345f8b08eedf4d953c6b3764cabab67049843'/>
<id>41d345f8b08eedf4d953c6b3764cabab67049843</id>
<content type='text'>
Signed-off-by: Ralph Wuerthner &lt;ralph.wuerthner@de.ibm.com&gt;
Reviewed-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ralph Wuerthner &lt;ralph.wuerthner@de.ibm.com&gt;
Reviewed-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3/locking: simplify reset_share_mode_entry()</title>
<updated>2025-12-08T10:20:36+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2025-10-27T14:53:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=dccff4b290ac05a74e79a13a1117a33f7d06110f'/>
<id>dccff4b290ac05a74e79a13a1117a33f7d06110f</id>
<content type='text'>
Since 3df388b8f148c00a3ef331d393cea976fb9340b3 we're using the open global_id as
share_file_id in the share_mode_entry and we're also not changing it in
mark_share_mode_disconnected().

Iow, old_share_file_id is equal to new_share_file_id which and both are equal to
open_global_id.

Hence replace the two old_share_file_id and new_share_file_id arguments with the
single open_global_id argument.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since 3df388b8f148c00a3ef331d393cea976fb9340b3 we're using the open global_id as
share_file_id in the share_mode_entry and we're also not changing it in
mark_share_mode_disconnected().

Iow, old_share_file_id is equal to new_share_file_id which and both are equal to
open_global_id.

Hence replace the two old_share_file_id and new_share_file_id arguments with the
single open_global_id argument.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3: talloc_destroy() -&gt; TALLOC_FREE()</title>
<updated>2025-11-10T13:29:30+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2025-10-17T12:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=38b76366888ab366c6ea13382f93b443cbee1e8e'/>
<id>38b76366888ab366c6ea13382f93b443cbee1e8e</id>
<content type='text'>
Sweeping change, I know. Should not change compiled code in most
cases, the compiler should be smart enough to elide the assignment
right before a return. In the cases where this is not right before the
return, TALLOC_FREE() is safer as it makes use-after-free crash.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sweeping change, I know. Should not change compiled code in most
cases, the compiler should be smart enough to elide the assignment
right before a return. In the cases where this is not right before the
return, TALLOC_FREE() is safer as it makes use-after-free crash.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: move lp_locking() check inside file_has_brlocks()</title>
<updated>2025-10-10T15:59:35+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2025-09-22T15:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=d31c8ff25cd55106ac43aa3a041b96a956e53f9e'/>
<id>d31c8ff25cd55106ac43aa3a041b96a956e53f9e</id>
<content type='text'>
Avoids doing the check at every caller.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoids doing the check at every caller.

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: use op-&gt;global-&gt;open_global_id for the share_mode_entry.share_file_id</title>
<updated>2025-10-10T11:43:16+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2025-10-09T13:27:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3df388b8f148c00a3ef331d393cea976fb9340b3'/>
<id>3df388b8f148c00a3ef331d393cea976fb9340b3</id>
<content type='text'>
open_global_id is an uint32_t, share_file_id is an uint64_t.

For internal opens that don't have an smbXsrv_open_global.tdb entry, continue to
use a generation counter starting at UINT32_MAX + 1.

We don't expose internal opens via srvsrc, which imposes the requirement for
using an uint32_t, so we can use larger ids for the internal opens as srvsvc
never sees them (as they're not in smbXsrv_open_global.tdb and srvsvc as any
other component listing open files like smbstatus lists smbXsrv_open_global.tdb).

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Fri Oct 10 11:43:16 UTC 2025 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
open_global_id is an uint32_t, share_file_id is an uint64_t.

For internal opens that don't have an smbXsrv_open_global.tdb entry, continue to
use a generation counter starting at UINT32_MAX + 1.

We don't expose internal opens via srvsrc, which imposes the requirement for
using an uint32_t, so we can use larger ids for the internal opens as srvsvc
never sees them (as they're not in smbXsrv_open_global.tdb and srvsvc as any
other component listing open files like smbstatus lists smbXsrv_open_global.tdb).

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Volker Lendecke &lt;vl@samba.org&gt;
Autobuild-Date(master): Fri Oct 10 11:43:16 UTC 2025 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>s3/locking: fix checking for byterange locks when granting RH lease</title>
<updated>2025-08-15T15:46:35+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2025-08-07T16:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=debcd77ae7818ec953058e7524642ef76e0e6c7b'/>
<id>debcd77ae7818ec953058e7524642ef76e0e6c7b</id>
<content type='text'>
From MS-FSA 2.1.5.18 "Server Requests an Oplock":

...

* Else If Type is LEVEL_GRANULAR:
    * If RequestedOplockLevel is READ_CACHING or (READ_CACHING|HANDLE_CACHING):
        * The operation MUST be failed with STATUS_OPLOCK_NOT_GRANTED under either of the
          following conditions:
            * Open.Stream.ByteRangeLockList is not empty and Open.Stream.AllocationSize
              is greater than any ByteRangeLock.LockOffset in
              Open.Stream.ByteRangeLockList.

...

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

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From MS-FSA 2.1.5.18 "Server Requests an Oplock":

...

* Else If Type is LEVEL_GRANULAR:
    * If RequestedOplockLevel is READ_CACHING or (READ_CACHING|HANDLE_CACHING):
        * The operation MUST be failed with STATUS_OPLOCK_NOT_GRANTED under either of the
          following conditions:
            * Open.Stream.ByteRangeLockList is not empty and Open.Stream.AllocationSize
              is greater than any ByteRangeLock.LockOffset in
              Open.Stream.ByteRangeLockList.

...

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

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s3/locking: modernize file_has_brlocks()</title>
<updated>2025-08-15T15:46:35+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2025-08-09T09:41:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0fdd231f80eb9afe783e065c50b0f93c813d0857'/>
<id>0fdd231f80eb9afe783e065c50b0f93c813d0857</id>
<content type='text'>
No change in behaviour. Minimizes diff in the next commit that introduce a
behaviour change.

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

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No change in behaviour. Minimizes diff in the next commit that introduce a
behaviour change.

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

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: make file_has_brlocks() public</title>
<updated>2025-08-15T15:46:35+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2025-08-09T09:39:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f26ae02a1bf739f25975143d1e1706d30ff98b2f'/>
<id>f26ae02a1bf739f25975143d1e1706d30ff98b2f</id>
<content type='text'>
Prepares for a change to file_has_brlocks() in the next commit. No change in
behaviour.

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

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepares for a change to file_has_brlocks() in the next commit. No change in
behaviour.

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

Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
