scabrero/samba-autobuild/.git
5 months agopython: get rid of pointless empty overridden methods
Rob van der Linde [Tue, 28 Nov 2023 02:59:41 +0000 (15:59 +1300)]
python: get rid of pointless empty overridden methods

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython: Use constants from hresult.h for python constants
Andrew Bartlett [Wed, 29 Nov 2023 21:37:13 +0000 (10:37 +1300)]
python: Use constants from hresult.h for python constants

This encourages us to keep a single source for constants.

In the future this should be a generated python file like for ntstatus.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agopython: move HRES_SEC_* constants to samba module
Rob van der Linde [Tue, 28 Nov 2023 02:13:21 +0000 (15:13 +1300)]
python: move HRES_SEC_* constants to samba module

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython: tests: make HRES_SEC_E_* constant an int
Rob van der Linde [Wed, 29 Nov 2023 03:00:13 +0000 (16:00 +1300)]
python: tests: make HRES_SEC_E_* constant an int

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython: PEP275: docstrings should always use double quotes
Rob van der Linde [Tue, 28 Nov 2023 02:11:12 +0000 (15:11 +1300)]
python: PEP275: docstrings should always use double quotes

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopython: fix missing colon around param in docstring
Rob van der Linde [Tue, 28 Nov 2023 02:02:00 +0000 (15:02 +1300)]
python: fix missing colon around param in docstring

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Add test for samba_gnutls_sp800_108_derive_key() using NIST test vectors
Joseph Sutton [Thu, 23 Nov 2023 03:54:12 +0000 (16:54 +1300)]
lib:crypto: Add test for samba_gnutls_sp800_108_derive_key() using NIST test vectors

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Nov 30 01:03:29 UTC 2023 on atb-devel-224

5 months agolib:crypto: Add ‘FixedData’ parameter to samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Wed, 29 Nov 2023 02:46:30 +0000 (15:46 +1300)]
lib:crypto: Add ‘FixedData’ parameter to samba_gnutls_sp800_108_derive_key()

Our code won’t use this, but NIST’s test vectors are based on handing a
fixed buffer to the key derivation function.

View with ‘git show -b’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Have samba_gnutls_sp800_108_derive_key() support various output key lengths
Joseph Sutton [Tue, 28 Nov 2023 23:44:10 +0000 (12:44 +1300)]
lib:crypto: Have samba_gnutls_sp800_108_derive_key() support various output key lengths

View with ‘git show -b’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Clean up HMAC handle in one place
Joseph Sutton [Tue, 28 Nov 2023 23:27:03 +0000 (12:27 +1300)]
lib:crypto: Clean up HMAC handle in one place

This is less error prone than having to ensure it’s cleaned up in every
error path.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Add missing call to gnutls_hmac_deinit()
Joseph Sutton [Tue, 28 Nov 2023 23:29:58 +0000 (12:29 +1300)]
lib:crypto: Add missing call to gnutls_hmac_deinit()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Add common out path to samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Tue, 28 Nov 2023 23:28:10 +0000 (12:28 +1300)]
lib:crypto: Add common out path to samba_gnutls_sp800_108_derive_key()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Split out core of samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Tue, 28 Nov 2023 22:49:19 +0000 (11:49 +1300)]
lib:crypto: Split out core of samba_gnutls_sp800_108_derive_key()

We are going to need to alter the structure of this function a little
bit.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Add tests for samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Wed, 29 Nov 2023 22:00:57 +0000 (11:00 +1300)]
lib:crypto: Add tests for samba_gnutls_sp800_108_derive_key()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Add samba_gnutls_sp800_108_derive_key()
Joseph Sutton [Tue, 28 Nov 2023 22:36:57 +0000 (11:36 +1300)]
lib:crypto: Add samba_gnutls_sp800_108_derive_key()

Rename smb2_key_derivation() to samba_gnutls_sp800_108_derive_key() and
move it to GNUTLS_HELPERS.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Remove unused variable
Joseph Sutton [Tue, 28 Nov 2023 21:43:16 +0000 (10:43 +1300)]
lib:crypto: Remove unused variable

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib:crypto: Remove unused imports
Joseph Sutton [Tue, 28 Nov 2023 21:43:03 +0000 (10:43 +1300)]
lib:crypto: Remove unused imports

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/smb: Add ‘algorithm’ parameter to smb2_key_derivation()
Joseph Sutton [Thu, 23 Nov 2023 06:49:23 +0000 (19:49 +1300)]
libcli/smb: Add ‘algorithm’ parameter to smb2_key_derivation()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/auth: Return more consistent status code on gnutls HMAC failure
Joseph Sutton [Thu, 23 Nov 2023 06:40:41 +0000 (19:40 +1300)]
libcli/auth: Return more consistent status code on gnutls HMAC failure

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoauth/gensec: Return more consistent status codes on gnutls hashing failure
Joseph Sutton [Thu, 23 Nov 2023 06:40:05 +0000 (19:40 +1300)]
auth/gensec: Return more consistent status codes on gnutls hashing failure

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:utils: Use correct enumeration constant
Joseph Sutton [Thu, 23 Nov 2023 06:28:16 +0000 (19:28 +1300)]
s4:utils: Use correct enumeration constant

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:utils: Remove trailing whitespace
Joseph Sutton [Thu, 23 Nov 2023 06:27:56 +0000 (19:27 +1300)]
s4:utils: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:libcli: Call correct function to get HMAC output length
Joseph Sutton [Thu, 23 Nov 2023 06:27:27 +0000 (19:27 +1300)]
s4:libcli: Call correct function to get HMAC output length

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos4:libcli: Remove trailing whitespace
Joseph Sutton [Thu, 23 Nov 2023 06:26:53 +0000 (19:26 +1300)]
s4:libcli: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/smb: Call correct function to get HMAC output length
Joseph Sutton [Thu, 23 Nov 2023 06:26:16 +0000 (19:26 +1300)]
libcli/smb: Call correct function to get HMAC output length

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/auth: Call correct function to get HMAC output length
Joseph Sutton [Thu, 23 Nov 2023 06:24:51 +0000 (19:24 +1300)]
libcli/auth: Call correct function to get HMAC output length

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/auth: Use correct enumeration constant
Joseph Sutton [Thu, 23 Nov 2023 06:24:27 +0000 (19:24 +1300)]
libcli/auth: Use correct enumeration constant

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/smb: Include missing headers
Joseph Sutton [Thu, 23 Nov 2023 03:54:15 +0000 (16:54 +1300)]
libcli/smb: Include missing headers

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoselftest: Remove knownfail entries for non‐existent tests
Joseph Sutton [Mon, 20 Nov 2023 20:43:47 +0000 (09:43 +1300)]
selftest: Remove knownfail entries for non‐existent tests

The corresponding tests were removed in commit
938afb8b28973b0065cc3509b70ebe3f6986de47.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc:ndr: Use correct libndr flags type
Joseph Sutton [Mon, 27 Nov 2023 07:25:20 +0000 (20:25 +1300)]
librpc:ndr: Use correct libndr flags type

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc:ndr: Remove trailing whitespace
Joseph Sutton [Mon, 27 Nov 2023 07:24:57 +0000 (20:24 +1300)]
librpc:ndr: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agodocs-xml: Add missing closing parenthesis
Joseph Sutton [Mon, 27 Nov 2023 01:41:25 +0000 (14:41 +1300)]
docs-xml: Add missing closing parenthesis

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopidl: Make sure to cast whole expressions
Joseph Sutton [Sun, 26 Nov 2023 23:58:05 +0000 (12:58 +1300)]
pidl: Make sure to cast whole expressions

$cvar could be an expression such as ‘1 << 10’. In such cases this cast
presumably was intended to apply to the entire expression, not just to
the ‘1’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agoconditional_ace.idl: Fix undefined shift
Joseph Sutton [Sun, 26 Nov 2023 23:55:51 +0000 (12:55 +1300)]
conditional_ace.idl: Fix undefined shift

If ‘int’ is a 32‐bit type, then 1 << 31 cannot be represented in an
‘int’, and this shift will invoke undefined behaviour.

We have got away with this so far because of a Pidl bug that changed the
expression to ‘(uint32_t)1 << 31’, which is valid. But that bug is about
to be fixed.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopidl: Fix subscripts of dereferenced arrays
Joseph Sutton [Wed, 22 Nov 2023 02:54:50 +0000 (15:54 +1300)]
pidl: Fix subscripts of dereferenced arrays

Pidl will generate code like the following:

py_out_2 = PyLong_FromLong((uint16_t)*r->out.out[out_cntr_2]);

As the array subscripting operator has a higher precedence than the
indirection (derference) operator, the argument will be evaluated as
(uint16_t)*(r->out.out[out_cntr_2]), which is wrong.

Fix Pidl to generate the following code instead:

py_out_2 = PyLong_FromLong((uint16_t)(*r->out.out)[out_cntr_2]);

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopidl: Remove unneeded casts
Joseph Sutton [Wed, 22 Nov 2023 02:24:55 +0000 (15:24 +1300)]
pidl: Remove unneeded casts

_pytalloc_get_ptr() returns ‘void *’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopidl: Fix grammar in warning message
Joseph Sutton [Sun, 19 Nov 2023 18:51:43 +0000 (07:51 +1300)]
pidl: Fix grammar in warning message

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopidl: Remove trailing whitespace
Joseph Sutton [Wed, 29 Nov 2023 22:39:36 +0000 (11:39 +1300)]
pidl: Remove trailing whitespace

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopidl: Remove unused imports
Joseph Sutton [Sun, 19 Nov 2023 18:51:25 +0000 (07:51 +1300)]
pidl: Remove unused imports

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agothird_party: Update waf to version 2.0.26
Andreas Schneider [Wed, 22 Nov 2023 12:21:38 +0000 (13:21 +0100)]
third_party: Update waf to version 2.0.26

https://gitlab.com/ita1024/waf/-/blob/waf-2.0.26/ChangeLog

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 29 10:47:00 UTC 2023 on atb-devel-224

5 months agotests: claims blackbox: add device and server silo restrictions test
Rob van der Linde [Tue, 28 Nov 2023 00:05:33 +0000 (13:05 +1300)]
tests: claims blackbox: add device and server silo restrictions test

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Nov 29 04:15:27 UTC 2023 on atb-devel-224

5 months agopython: tests: claims blackbox tests use ntstatus constants
Rob van der Linde [Tue, 28 Nov 2023 22:37:42 +0000 (11:37 +1300)]
python: tests: claims blackbox tests use ntstatus constants

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agotests: claims blackbox: use raw strings rather than escaping \
Rob van der Linde [Mon, 27 Nov 2023 23:46:53 +0000 (12:46 +1300)]
tests: claims blackbox: use raw strings rather than escaping \

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agotests: claims: blackbox device tests
Rob van der Linde [Tue, 21 Nov 2023 03:27:09 +0000 (16:27 +1300)]
tests: claims: blackbox device tests

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agoselftest: Run samba.tests.gensec in an enviroment build also with MIT Krb5
Andrew Bartlett [Tue, 28 Nov 2023 04:07:15 +0000 (17:07 +1300)]
selftest: Run samba.tests.gensec in an enviroment build also with MIT Krb5

We would like confidence that the FAST hooks work with both implementations.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agos4-auth/kerberos: Use FAST credentials for armor if specified in cli_credentials
Andrew Bartlett [Mon, 20 Nov 2023 01:12:19 +0000 (14:12 +1300)]
s4-auth/kerberos: Use FAST credentials for armor if specified in cli_credentials

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agopython/tests: Add test for creds.set_krb5_fast_credentials()
Andrew Bartlett [Sun, 19 Nov 2023 23:17:57 +0000 (12:17 +1300)]
python/tests: Add test for creds.set_krb5_fast_credentials()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agopython/tests: Lock in key-word arguments as key-word only in samba.tests.gssapi
Andrew Bartlett [Sun, 19 Nov 2023 23:42:15 +0000 (12:42 +1300)]
python/tests: Lock in key-word arguments as key-word only in samba.tests.gssapi

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agopython/tests: Import samba.gensec, not gensec
Andrew Bartlett [Mon, 20 Nov 2023 00:02:21 +0000 (13:02 +1300)]
python/tests: Import samba.gensec, not gensec

This allows this function to be used by gensec.py (a test) without collision.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agoauth/credentials: Add Python bindings for association of a connection for FAST
Andrew Bartlett [Sun, 19 Nov 2023 23:16:04 +0000 (12:16 +1300)]
auth/credentials: Add Python bindings for association of a connection for FAST

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agoauth/credentials: Add API to allow requesting a Kerberos ticket to be protected with...
Andrew Bartlett [Fri, 17 Nov 2023 04:41:53 +0000 (17:41 +1300)]
auth/credentials: Add API to allow requesting a Kerberos ticket to be protected with FAST

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agobuild: Add build time detection for the MIT FAST ccache API
Andrew Bartlett [Tue, 28 Nov 2023 00:51:07 +0000 (13:51 +1300)]
build: Add build time detection for the MIT FAST ccache API

This will allow us to link against an older system Heimdal.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 months agothird_party/heimdal: Provide krb5_init_creds_opt_set_fast_ccache() and krb5_init_cred...
Andrew Bartlett [Wed, 29 Nov 2023 01:16:16 +0000 (14:16 +1300)]
third_party/heimdal: Provide krb5_init_creds_opt_set_fast_ccache() and krb5_init_creds_opt_set_fast_flags() (import lorikeet-heimdal-202311290114 (commit 4c8517e161396330c76240bf09609a0dd5f9ea20))

It is easier for external callers to manipulate the krb5_get_init_creds_opt
(via the helpers) as this is passed down from higher up than the krb5_init_creds_context.

And just as importantly, alignment with MIT makes end-user callers happier.

Finally, this resolves the ambiguity as to which layer owns the
krb5_ccache, because now we match the MIT behaviour the init_creds code
re-opens a private copy inside libkrb5, meaning the caller closes the
cache it opened, rather than handing it over to the library.

(The unrelated changes are fixes to the test_pac test, also included in this import,
but in distinct lorikeet-heimdal commits, to allow it to compile)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
5 months agolibcli/security: note suboptimality of conditional ACE Contains operators
Douglas Bagnall [Fri, 24 Nov 2023 23:55:09 +0000 (12:55 +1300)]
libcli/security: note suboptimality of conditional ACE Contains operators

The Contains and Any_of operators could use a sorted comparison like
compare_composites_via_sort(), rather than O(n²) nested loops. But
that would involve amount of quite fiddly work that I am not starting
on now.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov 27 23:38:13 UTC 2023 on atb-devel-224

5 months agolibcli/security: comparability check: claim members are of one type
Douglas Bagnall [Thu, 23 Nov 2023 00:03:15 +0000 (13:03 +1300)]
libcli/security: comparability check: claim members are of one type

We know from the way claims are defined, and from the code that checks
sortedness and sets the flag.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: shift comparability check to shortcut exits
Douglas Bagnall [Thu, 23 Nov 2023 00:01:49 +0000 (13:01 +1300)]
libcli/security: shift comparability check to shortcut exits

The ordinary comparison path, using the sorted arrays, already implicitly
checks for comparability. We only need this when we're leaving early.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: add shortcuts for conditional ACE compare
Douglas Bagnall [Wed, 22 Nov 2023 23:47:45 +0000 (12:47 +1300)]
libcli/security: add shortcuts for conditional ACE compare

If the number of members does not match in certain ways we can
say the sets are not equal without comparing the members.

We first need to check for comparability, though, so that we can return
an error if things aren't comparable.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: improve conditional ACE composite comparison
Douglas Bagnall [Fri, 10 Nov 2023 03:27:45 +0000 (16:27 +1300)]
libcli/security: improve conditional ACE composite comparison

We had the comparison method wrong. Composites are compared as sets or
flabby sets, depending on their origin. Until now we compared them as
something a bit like sets, but not quite, in a maximally inefficient way.

Claims are always sets, and the left hand side is always a claim, but
literal composites on the right hand side can be multi-sets
(containing duplicate values). When it comes to comparison, composites
are reduced down to sets. To do the comparison we sort each side and
compare in order.

The fact that either side might ask for case-sensitive comparison (if
it is a claim) is an interesting complication.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: separate out claim_v1_to_ace_composite_unchecked()
Douglas Bagnall [Fri, 17 Nov 2023 00:58:12 +0000 (13:58 +1300)]
libcli/security: separate out claim_v1_to_ace_composite_unchecked()

For SDDL Resource ACE conversions we don't want to check too much
claim validity so that a semi-invalid ACE can round-trip through
deserialisation and serialisation. This is because Windows allows it,
but also because if the check puts the values in a sorted order that
makes the round-trip less round (that is, the return string is
semantically the same but possibly different in byte order).

The validity we're talking about is mostly uniqueness. For example
`S:(RA;;;;;WD;("foo",TU,0,7,5,7))` has two 7s, and that would be
invalid as a claim, but this is not checked while in ACE form.

On the other hand `S:(RA;;;;;WD;("foo",TU,0,3,2))` is valid, but the
return string will have 3 and 2 reversed when the check is made. We
prefer the ACE to stay the same while it is just being an ACE.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: avoid leak on SDDL encode failure
Douglas Bagnall [Thu, 16 Nov 2023 23:01:15 +0000 (12:01 +1300)]
libcli/security: avoid leak on SDDL encode failure

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: claim_v1_to_ace_token(): avoid unnecessary re-sort
Douglas Bagnall [Wed, 22 Nov 2023 03:40:12 +0000 (16:40 +1300)]
libcli/security: claim_v1_to_ace_token(): avoid unnecessary re-sort

If it is a wire claim (which is probably most common), the checking
and sorting has already happened. We don't need to make a copy to
sort and check.

In either case, there is still a copy step to make the conditional ACE
token.

This shuffles around some knownfails because the claim_v1_copy()
function we were using is checking for duplicates, which we don't
always want. That will be fixed soon.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: add_claim_to_token() re-sorts/checks claims
Douglas Bagnall [Wed, 22 Nov 2023 03:38:13 +0000 (16:38 +1300)]
libcli/security: add_claim_to_token() re-sorts/checks claims

This function is used in tests and fuzzing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: resource attribute claims use claim_v1_check_and_sort()
Douglas Bagnall [Wed, 15 Nov 2023 03:51:19 +0000 (16:51 +1300)]
libcli/security: resource attribute claims use claim_v1_check_and_sort()

Because RA ACEs live a double life, sometimes being ACEs and sometimes
being claims, we make a copy of the claim strucutre for sorting and
further use in conditional ACEs.

We don't need to do that for wire claims, because they are not
persistent or forwarded on to somewhere else.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: wire claim conversion uses claim_v1_check_and_sort()
Douglas Bagnall [Thu, 2 Nov 2023 05:13:13 +0000 (18:13 +1300)]
libcli/security: wire claim conversion uses claim_v1_check_and_sort()

This roughly returns things to where they were a few commits ago, with
the claims being checked for uniqueness.

The difference is the claims will be sorted afterwards, and the
uniqueness check will be far more efficient on large claims.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: claim_v1_check_and_sort(): add all types
Douglas Bagnall [Wed, 22 Nov 2023 03:14:25 +0000 (16:14 +1300)]
libcli/security: claim_v1_check_and_sort(): add all types

To manage this sort we need a qsort_r-like sort context which holds:

a) the value type,
b) a case sensitive flag for the string compare, and
c) a return flag indicating a failure. Failures are not picked up until
   after the sort finishes.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: begin claim_v1_check_and_sort with Boolean checks
Douglas Bagnall [Tue, 21 Nov 2023 22:07:29 +0000 (11:07 +1300)]
libcli/security: begin claim_v1_check_and_sort with Boolean checks

claim_v1_check_and_sort() is meant to sort the claim values and check
that there are no duplicates, as well as making some value checks.

In order to ease into the idea, we look first at the case where the claim
has Boolean values. There are only two values allowed, which limits the
length of a valid claim set and means we only really need to "sort" in
the {1, 0} case, which we rewrite in place as {0, 1}.

That's what will happen with other types: we'll sort in-place, make
some checks on values, set flags, and return an error if there are
duplicates or value errors.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: don't allow two NULL string claims
Douglas Bagnall [Fri, 24 Nov 2023 04:59:24 +0000 (17:59 +1300)]
libcli/security: don't allow two NULL string claims

This restores the behaviour with regard to duplicate NULL strings that
existed before the last commit. I'm putting it separately, because it
seems so strange, and I not entirely certain the behaviour is
intentional.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: wire claims conversion: remove strings uniqueness check
Douglas Bagnall [Wed, 22 Nov 2023 01:57:09 +0000 (14:57 +1300)]
libcli/security: wire claims conversion: remove strings uniqueness check

This changes the behaviour when one of the strings is NULL. Previously
a single NULL string would be ignored, and two would cause an error.
That will be restored in the next commit.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: int wire claims drop uniqueness check
Douglas Bagnall [Wed, 22 Nov 2023 01:54:25 +0000 (14:54 +1300)]
libcli/security: int wire claims drop uniqueness check

And we allocate all the values together as an array, because
we might as well.

This and the next couple of commits might look like steps backwards,
and they are, but they allow us to get a run-up to leap over a big
fence.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: simplify wire claim conversion mem, 3/3: rm tmp_ctx
Douglas Bagnall [Wed, 22 Nov 2023 01:48:31 +0000 (14:48 +1300)]
libcli/security: simplify wire claim conversion mem, 3/3: rm tmp_ctx

The interstitial tmp_ctx now does nothing but be interstitial, so
let's get rid of it.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: simplify wire claim conversion mem, 2/3: one tree
Douglas Bagnall [Wed, 22 Nov 2023 01:44:30 +0000 (14:44 +1300)]
libcli/security: simplify wire claim conversion mem, 2/3: one tree

These values would have leaked in the event of failure (but only onto
the caller mem_ctx, which might be fleeting -- especially as its
security token is now failing).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: simplify wire claim conversion mem, 1/3: avoid NULL parent
Douglas Bagnall [Wed, 22 Nov 2023 01:39:49 +0000 (14:39 +1300)]
libcli/security: simplify wire claim conversion mem, 1/3: avoid NULL parent

The reason for this, apart from weighing up possible over-allocations
vs realloc costs, is in the first iteration of the loop,

       claim_values = talloc_array(claims,

would allocate onto NULL, which leaks.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopytest: conditional_ace_claims tests large composite comparisons
Douglas Bagnall [Mon, 13 Nov 2023 23:53:24 +0000 (12:53 +1300)]
pytest: conditional_ace_claims tests large composite comparisons

Our composite comparisons are currently all wrong.

Soon they will be fixed, but we are going to have an inflection point
where we switch from the naive compare-everything approach to a sort
based comparison, and we want to test both sides. Also, we use these
tests for a little bit of timing, which reveals it is all fast enough.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security/sddl: improve some SDDL error messages
Douglas Bagnall [Sun, 12 Nov 2023 23:56:13 +0000 (12:56 +1300)]
libcli/security/sddl: improve some SDDL error messages

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopytest: conditional_ace_claims: write_c_test_on_failure() copes with claims
Douglas Bagnall [Mon, 13 Nov 2023 00:34:57 +0000 (13:34 +1300)]
pytest: conditional_ace_claims: write_c_test_on_failure() copes with claims

*copes badly, but better than crashing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopytest: token_factory note that a flag is not set
Douglas Bagnall [Mon, 13 Nov 2023 23:46:21 +0000 (12:46 +1300)]
pytest: token_factory note that a flag is not set

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopytest: token_factory copes with empty claims
Douglas Bagnall [Mon, 13 Nov 2023 00:36:00 +0000 (13:36 +1300)]
pytest: token_factory copes with empty claims

We don't have a good story yet with regard to empty claims, but we at
least want to be able to create them in tests.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopytest: token_factory claims can have case_sensitive flag
Douglas Bagnall [Mon, 13 Nov 2023 23:51:10 +0000 (12:51 +1300)]
pytest: token_factory claims can have case_sensitive flag

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agopytest: token_factory separate out list_to_claim() helper
Douglas Bagnall [Sun, 12 Nov 2023 23:57:13 +0000 (12:57 +1300)]
pytest: token_factory separate out list_to_claim() helper

This is so conditional_ace_claims test can create claim objects which
can e.g. have the case sensitive flag set.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: sddl_conditional_ace: check a talloc_new()
Douglas Bagnall [Fri, 10 Nov 2023 03:19:40 +0000 (16:19 +1300)]
libcli/security: sddl_conditional_ace: check a talloc_new()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: conditional ACE sddl writers take const tokens
Douglas Bagnall [Fri, 10 Nov 2023 03:18:32 +0000 (16:18 +1300)]
libcli/security: conditional ACE sddl writers take const tokens

We don't change these when writing the SDDL.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolib/security:CA: tokens_are_comparable() accepts NULL operator
Douglas Bagnall [Fri, 10 Nov 2023 03:15:25 +0000 (16:15 +1300)]
lib/security:CA: tokens_are_comparable() accepts NULL operator

In some circumstances we are going to know general comparability
without having an operator around to use.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: CA: tokens_are_comparable() considers the obvious
Douglas Bagnall [Fri, 10 Nov 2023 03:13:40 +0000 (16:13 +1300)]
libcli/security: CA: tokens_are_comparable() considers the obvious

Existing callers already make this check, but we are soon going to use
it in contexts that don't.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: add test_claims_conversion
Douglas Bagnall [Fri, 24 Nov 2023 00:37:42 +0000 (13:37 +1300)]
libcli/security: add test_claims_conversion

These are unit tests for converting wire claims into sorted claims v1
structures.

These are based from packets derived from the krb5.conditional_ace
tests, and currently don't test more than they do, but they work about
a hundred thousand times quicker.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: test_run_conditional_ace tests more comparisons
Douglas Bagnall [Thu, 16 Nov 2023 22:30:03 +0000 (11:30 +1300)]
libcli/security: test_run_conditional_ace tests more comparisons

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: test_run_conditional_ace can set debug levels
Douglas Bagnall [Thu, 16 Nov 2023 22:29:06 +0000 (11:29 +1300)]
libcli/security: test_run_conditional_ace can set debug levels

No -d, just `bin/test_run_conditional_ace 3`.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc/idl:security: add claims flag indicating orderly and unique members
Douglas Bagnall [Fri, 10 Nov 2023 03:56:04 +0000 (16:56 +1300)]
librpc/idl:security: add claims flag indicating orderly and unique members

The same flag will be used in conditional ACE composites, and on
CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 structures derived from wire
claims and resource attribute ACEs, when we know we have checked the
claim has no duplicate values.

Resource Attribute ACEs contain CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1
at rest, but we are not going to set the flag there on the off chance
that the ACE could fly off to another application and have another
application specific meaning there. We will only check for uniqueness
and set the flag on ephemeral copies of resource claims during access
check operations.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc/idl:security: add a couple of claims flags
Douglas Bagnall [Fri, 10 Nov 2023 01:53:44 +0000 (14:53 +1300)]
librpc/idl:security: add a couple of claims flags

We don't use these.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc/idl:condtional_ace: shift CONDITIONAL_ACE_FLAG_TOKEN_FROM_ATTR to last bit
Douglas Bagnall [Fri, 10 Nov 2023 01:31:59 +0000 (14:31 +1300)]
librpc/idl:condtional_ace: shift CONDITIONAL_ACE_FLAG_TOKEN_FROM_ATTR to last bit

This region is "available for application-specific data" in the
CLAIM_SECURITY_ATTRIBUTE_ space, according to [MS-DTYP] 2.4.10.1,
so it nicer to use that, even though we are not actually setting the
flag on the V1 claims.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibrpc/idl:conditional_ace: make a flags field 32 bit
Douglas Bagnall [Fri, 10 Nov 2023 01:24:48 +0000 (14:24 +1300)]
librpc/idl:conditional_ace: make a flags field 32 bit

This allows it to align with
CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1.flags, with which it shares
values and will soon share more.

It was 16 bit because we needed few flags, and at one point .type was
8 bit, so 16 bits packed nicely into a smaller struct.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: remove redundant claim SID size check
Douglas Bagnall [Mon, 27 Nov 2023 21:46:40 +0000 (10:46 +1300)]
libcli/security: remove redundant claim SID size check

blob_string_sid_to_sid() immediately checks the size is within 5-191, so the 1-10000
just gives you a different message in chircumstances you'll never see.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agolibcli/security: avoid leak when converting SID claims
Douglas Bagnall [Mon, 27 Nov 2023 21:35:43 +0000 (10:35 +1300)]
libcli/security: avoid leak when converting SID claims

Apart from the leak fix, this is faster and stricter, not accepting
SID string buffers with trailing garbage ("S-1-2-3qwerty" would have
been accepted, but not now).

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 months agos3: smbd: Allow fchmod from the NFS-style mode ACL in set_nt_acl() for a SMB2 POSIX...
Jeremy Allison [Thu, 1 Mar 2018 22:37:52 +0000 (14:37 -0800)]
s3: smbd: Allow fchmod from the NFS-style mode ACL in set_nt_acl() for a SMB2 POSIX handle.

To set a mode, send a one-element ACL.

Pair-Programmed-With: Ralph Boehme <slow@samba.org>

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 27 19:31:01 UTC 2023 on atb-devel-224

5 months agosmbd: bring back "smb3 unix extensions" option
Ralph Boehme [Wed, 8 Nov 2023 16:49:19 +0000 (17:49 +0100)]
smbd: bring back "smb3 unix extensions" option

This basically reverts commit b3cae8dcf192f65031f143e5bb9135c895611d98
with a few important differences:

* SMB3 UNIX extensions are always built, but disabled by default at runtime.

* They are globally enabled in the fileserver test environment.

* It's now a per-share option, so admins can selectively disable them
  on a per-share basis. This allows clients to detect early that a share
  doesn't support user mount requested POSIX and fail appropiately, passing
  the failure to the requesting application (mount command).

Signed-off-by: Ralph Boehme <slow@samba.org>
5 months agosmbd: factor out smb2_negotiate_context_process_posix()
Ralph Boehme [Wed, 22 Nov 2023 11:53:36 +0000 (12:53 +0100)]
smbd: factor out smb2_negotiate_context_process_posix()

No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agosmbd: tweak POSIX check in smbd_do_qfilepathinfo()
Ralph Boehme [Mon, 13 Nov 2023 09:36:14 +0000 (10:36 +0100)]
smbd: tweak POSIX check in smbd_do_qfilepathinfo()

This check is only needed for SMB2, so check for that, and in the SMB2 codepath
we'll always have a valid fsp, so we can drop that check.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agosmbd: check is POSIX is enabled on the fsp in fsinfo_unix_valid_level()
Ralph Boehme [Mon, 13 Nov 2023 09:35:30 +0000 (10:35 +0100)]
smbd: check is POSIX is enabled on the fsp in fsinfo_unix_valid_level()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agosmbd: pass fsp to fsinfo_unix_valid_level()
Ralph Boehme [Mon, 13 Nov 2023 07:04:33 +0000 (08:04 +0100)]
smbd: pass fsp to fsinfo_unix_valid_level()

We need the fsp down in fsinfo_unix_valid_level(), pass it down.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agosmbd: pass fsp to smbd_do_qfsinfo()
Ralph Boehme [Mon, 13 Nov 2023 06:43:11 +0000 (07:43 +0100)]
smbd: pass fsp to smbd_do_qfsinfo()

We need the fsp down in fsinfo_unix_valid_level(), start passing it down.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 months agosmbd: leave comment on broken SMB1 POSIX open handling of SMB_O_DIRECT
Ralph Boehme [Fri, 24 Nov 2023 15:29:57 +0000 (16:29 +0100)]
smbd: leave comment on broken SMB1 POSIX open handling of SMB_O_DIRECT

Since e0814dc5082dd4ecca8a155e0ce24b073158fd92 the passed in attributes get
replaced by the mode in create_file_default().

As FILE_FLAG_NO_BUFFERING is never checked when doing the final IO, it doesn't
really matter.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>