]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbtorture: fix locking offset in test_fruit_locking_conflict()
authorRalph Boehme <slow@samba.org>
Wed, 13 Aug 2025 15:02:16 +0000 (17:02 +0200)
committerJule Anger <janger@samba.org>
Wed, 15 Oct 2025 15:07:13 +0000 (15:07 +0000)
AD_FILELOCK_RSRC_DENY_WR = AD_FILELOCK_BASE + 6
 = (0x7FFFFFFFFFFFFFFF - 9) + 6
 = 0x7FFFFFFFFFFFFFFC

No change in behaviour though, just stumpled across it.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 3052839636f185307edb8832de9bdba4b2e2c83c)

source4/torture/vfs/fruit.c

index 6bad4e409c6e7f4c2911a7ecb2fdea6aef1f5f6b..e9ff4a57e66c8ef79cb7d72f8cf0aedd01ee69cd 100644 (file)
@@ -8002,7 +8002,7 @@ static bool test_fruit_locking_conflict(struct torture_context *tctx,
 
        /* Add AD_FILELOCK_RSRC_DENY_WR lock. */
        el = (struct smb2_lock_element) {
-               .offset = 0xfffffffffffffffc,
+               .offset = 0x7ffffffffffffffc,
                .length = 1,
                .flags = SMB2_LOCK_FLAG_EXCLUSIVE,
        };