metze/samba-autobuild-v4-18-test/.git
16 months agotevent: version 0.14.0 tevent-0.14.0
Stefan Metzmacher [Wed, 9 Nov 2022 12:32:04 +0000 (13:32 +0100)]
tevent: version 0.14.0

- Support python 3.12
- remove solaris port backend (it's not maintainable)
- make tevent_find_ops_byname() available for callers.
- allow the "standard" backend to be overloaded
- add interface for request/subrequest call depth tracking:
  - tevent_thread_call_depth_activate
  - tevent_thread_call_depth_deactivate
  - tevent_thread_call_depth_start
  - tevent_thread_call_depth_stop
  - tevent_thread_call_depth_reset_from_req

Note the changes to ABI/tevent-0.13.0.sigs only
revert the temporary changes made there...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: Call depth tracking
Pavel Filipenský [Thu, 16 Jun 2022 14:23:22 +0000 (16:23 +0200)]
tevent: Call depth tracking

The change to lib/tevent/ABI/tevent-0.13.0.sigs will be reverted
in the commit for the 0.14.0 release...

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: expose tevent_find_ops_byname() to callers
Stefan Metzmacher [Fri, 28 Oct 2022 12:10:15 +0000 (14:10 +0200)]
tevent: expose tevent_find_ops_byname() to callers

This makes it more flexible and allow a caller to overload
a tevent backend. Which will be used by Samba in order to
glue in io_uring support.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: allow the "standard" backend to be overloaded
Stefan Metzmacher [Sat, 12 Nov 2022 15:27:30 +0000 (15:27 +0000)]
tevent: allow the "standard" backend to be overloaded

We'll export tevent_find_ops_byname() soon and will allow
the context_init() function of backends to find that standard ops
and hand over to standard_ops->context_init().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: remove solaris port backend
Stefan Metzmacher [Wed, 9 Nov 2022 11:26:38 +0000 (12:26 +0100)]
tevent: remove solaris port backend

There's no way to verify changes we would have to do tevent_port.c,
as we don't have access to a solaris build machine.

So better use the poll backend instead. In performance critical code
we typically don't deal with a lot of file descriptors so the impact
should be fairly minimal.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: remove unused register_backend() from python bindings
Stefan Metzmacher [Tue, 23 Aug 2022 06:27:37 +0000 (08:27 +0200)]
tevent: remove unused register_backend() from python bindings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: remove unused tevent_liboop.c
Stefan Metzmacher [Tue, 23 Aug 2022 06:24:33 +0000 (08:24 +0200)]
tevent: remove unused tevent_liboop.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: Fix trailing whitespaces in tevent.c
Pavel Filipenský [Thu, 16 Jun 2022 17:09:03 +0000 (19:09 +0200)]
tevent: Fix trailing whitespaces in tevent.c

Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotevent: use samba_tevent_set_debug() in testsuite.c
Stefan Metzmacher [Tue, 10 Jan 2023 11:57:58 +0000 (12:57 +0100)]
tevent: use samba_tevent_set_debug() in testsuite.c

Note testsuite.c is only used in Samba's smbtorture as
'smbtorture //a/b local.event'

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agolib/util: install a tevent_abort callback using smb_panic()
Stefan Metzmacher [Wed, 9 Nov 2022 13:05:59 +0000 (14:05 +0100)]
lib/util: install a tevent_abort callback using smb_panic()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agos4:lib/events: let s4_event_context_init() use samba_tevent_context_init()
Stefan Metzmacher [Thu, 27 Oct 2022 20:17:55 +0000 (22:17 +0200)]
s4:lib/events: let s4_event_context_init() use samba_tevent_context_init()

This is no real change, but it makes sure we only have to
change samba_tevent_context_init() in future in order to
distribute the change to all places.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotdb: version 1.4.8 tdb-1.4.8
Stefan Metzmacher [Wed, 18 Jan 2023 10:53:02 +0000 (11:53 +0100)]
tdb: version 1.4.8

* Support python 3.12

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jule Anger <janger@samba.org>
16 months agotalloc: version 2.4.0 talloc-2.4.0
Stefan Metzmacher [Wed, 18 Jan 2023 10:52:33 +0000 (11:52 +0100)]
talloc: version 2.4.0

* Add talloc_asprintf_addbuf()
* Support python 3.12

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jule Anger <janger@samba.org>
16 months agobootstrap: Update to Ubuntu 22.04 as base default OS
Stefan Metzmacher [Wed, 2 Nov 2022 15:56:31 +0000 (16:56 +0100)]
bootstrap: Update to Ubuntu 22.04 as base default OS

We'll try to move autobuild to ubuntu 22.04 soon.

Note we leave ubuntu 18.04 for the coverage and 32bit builds
for now. As well as 20.04 for samba-fuzz.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan 18 14:17:23 UTC 2023 on atb-devel-224

16 months agothird_party: Update uid_wrapper to version 1.3.0
Stefan Metzmacher [Mon, 16 Jan 2023 21:14:03 +0000 (22:14 +0100)]
third_party: Update uid_wrapper to version 1.3.0

This is mainly needed in order to have some interaction
with socket_wrapper 1.4.0 regarding the implementation
of syscall().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jan 18 12:47:48 UTC 2023 on sn-devel-184

16 months agothird_party: Update socket_wrapper to version 1.4.0
Stefan Metzmacher [Mon, 16 Jan 2023 21:13:35 +0000 (22:13 +0100)]
third_party: Update socket_wrapper to version 1.4.0

The key feature is support for sendmmsg and recvmmsg,
which is required by modern libuv versions, e.g.
nsupdate -g makes use of libuv, so we need this for samba.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoctdb: Fix the build on FreeBSD
Volker Lendecke [Wed, 18 Jan 2023 07:59:17 +0000 (08:59 +0100)]
ctdb: Fix the build on FreeBSD

"basename" is define in libgen.h included from system/dir.h

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Modernize DBG statements in smbXsrv_open_global_store()
Volker Lendecke [Thu, 5 Jan 2023 15:06:40 +0000 (16:06 +0100)]
smbd: Modernize DBG statements in smbXsrv_open_global_store()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Make smbXsrv_open_global_id_to_key() a bit more type-safe
Volker Lendecke [Wed, 4 Jan 2023 19:09:32 +0000 (20:09 +0100)]
smbd: Make smbXsrv_open_global_id_to_key() a bit more type-safe

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Directly initialize key in smbXsrv_open_global_fetch_locked()
Volker Lendecke [Wed, 11 Jan 2023 13:07:42 +0000 (14:07 +0100)]
smbd: Directly initialize key in smbXsrv_open_global_fetch_locked()

Don't leave the key.dptr pointer uninitialized

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Remove unused smbXsrv_open_global_key_to_id()
Volker Lendecke [Wed, 4 Jan 2023 15:50:01 +0000 (16:50 +0100)]
smbd: Remove unused smbXsrv_open_global_key_to_id()

This isn't exactly rocket science we would need to keep around

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Slightly simplify smbXsrv_open_create()
Volker Lendecke [Wed, 4 Jan 2023 13:30:28 +0000 (14:30 +0100)]
smbd: Slightly simplify smbXsrv_open_create()

Move allocation of smbXsrv_open_global0 out of
smbXsrv_open_global_allocate()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Remove smbXsrv_open_global_destructor()
Volker Lendecke [Wed, 11 Jan 2023 13:01:29 +0000 (14:01 +0100)]
smbd: Remove smbXsrv_open_global_destructor()

This did not do much.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Slightly simplify smb2srv_open_recreate()
Volker Lendecke [Wed, 4 Jan 2023 13:05:55 +0000 (14:05 +0100)]
smbd: Slightly simplify smb2srv_open_recreate()

This moves the bit-fiddling right next to the check we do,
"global_zeros" was only used for this one purpose and its assignment
was a few lines away.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agolib/tsocket: fix a typo in the tsocket guide doc
Björn Baumbach [Tue, 17 Jan 2023 11:28:36 +0000 (12:28 +0100)]
lib/tsocket: fix a typo in the tsocket guide doc

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Tue Jan 17 18:23:18 UTC 2023 on sn-devel-184

16 months agos3/libsmb: fix a typo in parameter description
Björn Baumbach [Tue, 17 Jan 2023 11:29:28 +0000 (12:29 +0100)]
s3/libsmb: fix a typo in parameter description

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosamba-tool domain: fix a typo in samba-tool passwordsettings option description
Björn Baumbach [Tue, 17 Jan 2023 11:27:01 +0000 (12:27 +0100)]
samba-tool domain: fix a typo in samba-tool passwordsettings option description

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agoauth/creds: fix a typo in a comment
Björn Baumbach [Tue, 17 Jan 2023 11:26:10 +0000 (12:26 +0100)]
auth/creds: fix a typo in a comment

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agos3: smbd: Tweak openat_pathref_dirfsp_nosymlink() to NULL out fsp->fsp_name after...
Jeremy Allison [Thu, 12 Jan 2023 19:20:08 +0000 (11:20 -0800)]
s3: smbd: Tweak openat_pathref_dirfsp_nosymlink() to NULL out fsp->fsp_name after calling fd_close() on intermediate directories, rather than before.

vfs_virusfilter expects a non-NULL fsp->fsp_name to use for printing debugs
(it always indirects fsp->fsp_name). vfs_fruit also does the same, so would
also crash in fruit_close() with 'debug level = 10' and vfs_default:VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS = no
set (we don't test with that which is why we haven't noticed
this before).

Remove knownfail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 13 08:33:47 UTC 2023 on sn-devel-184

16 months agoselftest: Show vfs_virusscanner crashes when traversing a 2-level directory tree.
Jeremy Allison [Thu, 12 Jan 2023 18:22:09 +0000 (10:22 -0800)]
selftest: Show vfs_virusscanner crashes when traversing a 2-level directory tree.

Modify check_infected_read() test to use a 2-level deep
directory.

We must have vfs_default:VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS = no
set on the virusscanner share as otherwise the openat flag
shortcut defeats the test.

Add knownfail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agoCI: add a test for @GMT mask in SMB1 find
Ralph Boehme [Thu, 24 Nov 2022 15:59:49 +0000 (16:59 +0100)]
CI: add a test for @GMT mask in SMB1 find

Without FLAGS2_REPARSE_PATH a path containing an @GMT token can be used to
create a file including the @GMT token in the name and a directory list will
also return the file as result. Verified against Windows. Samba behaves exactly
the same.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 13 01:13:01 UTC 2023 on sn-devel-184

16 months agolib: Fix a use-after-free in "net vfs getntacl"
Volker Lendecke [Thu, 12 Jan 2023 11:00:26 +0000 (12:00 +0100)]
lib: Fix a use-after-free in "net vfs getntacl"

Don't hang "sd" off "fsp", which is free'ed before printing

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jan 12 16:41:07 UTC 2023 on sn-devel-184

16 months agolib: Fix out-of-bounds access in print_ace_flags()
Volker Lendecke [Thu, 12 Jan 2023 10:55:04 +0000 (11:55 +0100)]
lib: Fix out-of-bounds access in print_ace_flags()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agolib: Use talloc_asprintf_addbuf() in print_ace_flags()
Volker Lendecke [Thu, 12 Jan 2023 10:51:50 +0000 (11:51 +0100)]
lib: Use talloc_asprintf_addbuf() in print_ace_flags()

Simplifies code.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agobuild: Don't compile source3/lib/util_sd.c four times
Volker Lendecke [Thu, 12 Jan 2023 11:11:49 +0000 (12:11 +0100)]
build: Don't compile source3/lib/util_sd.c four times

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agos3:utils:mdsearch go to cmdline_messaging_context_free
Jones Syue [Thu, 12 Jan 2023 07:47:20 +0000 (15:47 +0800)]
s3:utils:mdsearch go to cmdline_messaging_context_free

mdsearch utility would exit earlier with failure in several cases like:
a. samba server is not running yet,
[~] # mdsearch -Uuser%password1 ${server} Public '*=="Samba"'
main: Cannot connect to server: NT_STATUS_CONNECTION_REFUSED

b. spotlight backend service is not ready yet,
[~] # mdsearch -Uuser%password1 ${server} Public '*=="Samba"'
Failed to connect mdssvc

c. mdsearch utility paramters is not as expecred,
[~] # mdsearch -Uuser%password1 ${server} share_not_exist '*=="Samba"'
mdscli_search failed

And in the mean while once mdsearch utility exit earlier with failure,
the lock files are left behind in the directory 'msg.sock' and 'msg.lock'.
If a script to run mdsearch utility in a loop,
this might result in used space slowly growing-up on underlying filesystem.

Supposed to add a new label 'fail_free_messaging',
make it go through the cmdline_messaging_context_free() which deletes the
lock files in the directory msg.sock and msg.lock before mdsearch utility
is exiting with failure.

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

Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan 12 11:40:19 UTC 2023 on sn-devel-184

16 months agos3:smbstatus: go to cmdline_messaging_context_free
Jones Syue [Wed, 11 Jan 2023 08:59:42 +0000 (16:59 +0800)]
s3:smbstatus: go to cmdline_messaging_context_free

If the locking.tdb is not found,
(for example, fresh new installed samba server is not running yet)
smbstatus utility would exit earlier,
and lock files are left behind in the directory 'msg.sock' and 'msg.lock'.
Consider that a script to run smbstatus utility in a loop,
this might result in used space slowly growing-up on the underlying filesystem.
Since the samba server is not running yet,
there is no cleanupd daemon could delete these files to reclaim space.

Supposed to use 'ret = 0; goto done;' instead of exit(0),
this would go through the cmdline_messaging_context_free() which deletes
the lock files in the directory msg.sock and msg.lock before smbstatus
utility is exiting.

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

Signed-off-by: Jones Syue <jonessyue@qnap.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 11 17:08:10 UTC 2023 on sn-devel-184

16 months agos3: smbd: Move check_fsp_open() and check_fsp() to smb1_reply.c
Jeremy Allison [Tue, 10 Jan 2023 01:33:14 +0000 (17:33 -0800)]
s3: smbd: Move check_fsp_open() and check_fsp() to smb1_reply.c

As these functions can implicitly call reply_nterror(..., NT_STATUS_INVALID_HANDLE)
they should never be available to SMB2 code paths.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 11 08:17:04 UTC 2023 on sn-devel-184

16 months agos3: smbd: Ensure check_fsp_ntquota_handle() doesn't send SMB1 error packets.
Jeremy Allison [Tue, 10 Jan 2023 01:22:12 +0000 (17:22 -0800)]
s3: smbd: Ensure check_fsp_ntquota_handle() doesn't send SMB1 error packets.

check_fsp_ntquota_handle() is called from SMB2 codepaths as
well as from SMB1. Even in the SMB1 cases the callers of
check_fsp_ntquota_handle() handle sendng the error packet when
check_fsp_ntquota_handle returns false so on a 'return false'
we'd end up sending an error packet twice.

The SMB2 callers of check_fsp_ntquota_handle()
already check that fsp is valid, so there's
no danger of us sending an SMB1 error packet
over the SMB2 stream (so I'm not classing
this as a bug to be back-ported).

Fix check_fsp_ntquota_handle() by inlineing
the check_fsp_open() functionality without
the reply_nterror() calls.

This will allow the next commit to move check_fsp_open()
with the implicit reply_nterror() and also check_fsp()
(which calls check_fsp_open()) into the SMB1 smb1_reply.c
file as SMB1-only code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agos3: smbd: SMB1 check_fsp_open() implicitly calls reply_nterror(.., NT_STATUS_INVALID_...
Jeremy Allison [Tue, 10 Jan 2023 01:28:06 +0000 (17:28 -0800)]
s3: smbd: SMB1 check_fsp_open() implicitly calls reply_nterror(.., NT_STATUS_INVALID_HANDLE) on error so don't duplicate in reply_close().

We'd end up sending 2 SMB1 error packets in this case.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
16 months agotests/krb5: Use Python bindings for LZ77+Huffman compression
Joseph Sutton [Mon, 19 Dec 2022 20:19:47 +0000 (09:19 +1300)]
tests/krb5: Use Python bindings for LZ77+Huffman compression

We can now remove our existing decompression implementation in Python.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 10 21:18:01 UTC 2023 on sn-devel-184

16 months agolib/compression: Fix length check
Joseph Sutton [Mon, 9 Jan 2023 02:00:14 +0000 (15:00 +1300)]
lib/compression: Fix length check

Put the division on the correct side of the inequality.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agos4:rpc_server/dnsserver: Zero-initialise pointers
Joseph Sutton [Tue, 10 Jan 2023 00:06:31 +0000 (13:06 +1300)]
s4:rpc_server/dnsserver: Zero-initialise pointers

Ensuring pointers are always initialised simplifies the code and avoids
compilation errors with FORTIFY_SOURCE=2.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib/tfork: Don't overwrite 'ret' in cleanup phase
Joseph Sutton [Tue, 10 Jan 2023 00:06:25 +0000 (13:06 +1300)]
lib/tfork: Don't overwrite 'ret' in cleanup phase

The cleanup phase of tfork_create() saves errno prior to calling
functions that might modify it, with the intention of restoring it
afterwards. However, the value of 'ret' is accidentally overwritten. It
will always be equal to 0, and hence errno will not be restored.

Fix this by introducing a new variable, ret2, for calling functions in
the cleanup phase.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib/talloc: Zero-initialise chunk pointers
Joseph Sutton [Tue, 10 Jan 2023 00:06:16 +0000 (13:06 +1300)]
lib/talloc: Zero-initialise chunk pointers

Ensuring pointers are always initialised avoids compilation errors with
FORTIFY_SOURCE=2.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Use an idtree for local IDs
Volker Lendecke [Wed, 4 Jan 2023 11:18:44 +0000 (12:18 +0100)]
smbd: Use an idtree for local IDs

Volatile file handle IDs are purely per-process, in fact we used a
dbwrap_rbt for this. To get a unique ID we however have the
specialized idtree data structure, we don't need to repeat the
allocation algorithm that already exists there.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 10 01:23:38 UTC 2023 on sn-devel-184

16 months agolib: Remove idtree from samba_util.h
Volker Lendecke [Thu, 5 Jan 2023 09:04:23 +0000 (10:04 +0100)]
lib: Remove idtree from samba_util.h

No need to recompile the world when only a few files need this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Simplify smbXsrv_open_set_replay_cache() with dbwrap_store_bystring()
Volker Lendecke [Wed, 4 Jan 2023 11:34:43 +0000 (12:34 +0100)]
smbd: Simplify smbXsrv_open_set_replay_cache() with dbwrap_store_bystring()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Simplify smbXsrv_open_set_replay_cache() with a struct assignment
Volker Lendecke [Wed, 4 Jan 2023 11:31:26 +0000 (12:31 +0100)]
smbd: Simplify smbXsrv_open_set_replay_cache() with a struct assignment

Use a direct struct assignment instead of a function call

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib: Add "starting_id" to idr_get_new_random()
Volker Lendecke [Wed, 4 Jan 2023 10:43:59 +0000 (11:43 +0100)]
lib: Add "starting_id" to idr_get_new_random()

To be used in smbXsrv_open.c, for this we need a lower bound.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Remove smbXsrv_open->db_rec
Volker Lendecke [Wed, 4 Jan 2023 10:29:51 +0000 (11:29 +0100)]
smbd: Remove smbXsrv_open->db_rec

This was only referenced in smbXsrv_open_close, but it was never
assigned anything but NULL.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Remove a "can't happen" NULL check
Volker Lendecke [Wed, 4 Jan 2023 09:13:31 +0000 (10:13 +0100)]
smbd: Remove a "can't happen" NULL check

This should really not happen, crashing would be the right response.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Use talloc_tos() for pushing smbXsrv_open_globalB
Volker Lendecke [Wed, 4 Jan 2023 09:12:22 +0000 (10:12 +0100)]
smbd: Use talloc_tos() for pushing smbXsrv_open_globalB

Use the toplevel talloc pool

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib: Use tdb_data_dbg() where appropriate
Volker Lendecke [Wed, 4 Jan 2023 08:52:50 +0000 (09:52 +0100)]
lib: Use tdb_data_dbg() where appropriate

This changes the talloc hierarchy for a few callers, but as
talloc_tos() was initially designed exactly for this purpose (printing
SIDs in DEBUG), it should be okay.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib: Add tdb_data_dbg()
Volker Lendecke [Wed, 4 Jan 2023 08:40:06 +0000 (09:40 +0100)]
lib: Add tdb_data_dbg()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Avoid explicit ZERO_STRUCT()
Volker Lendecke [Wed, 4 Jan 2023 07:50:28 +0000 (08:50 +0100)]
smbd: Avoid explicit ZERO_STRUCT()

Saves a few bytes of .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Move bytes from r/w data to r/o text section
Volker Lendecke [Wed, 4 Jan 2023 05:22:55 +0000 (06:22 +0100)]
smbd: Move bytes from r/w data to r/o text section

Even const arrays of const strings need to be relocated at startup time.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib: Move 16 bytes to readonly .text segment
Volker Lendecke [Tue, 3 Jan 2023 18:32:41 +0000 (19:32 +0100)]
lib: Move 16 bytes to readonly .text segment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib: Remove unused smb_mkstemp prototype
Volker Lendecke [Tue, 3 Jan 2023 18:27:50 +0000 (19:27 +0100)]
lib: Remove unused smb_mkstemp prototype

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib: Move tab_depth() to reg_parse_prs.c
Volker Lendecke [Tue, 3 Jan 2023 18:14:24 +0000 (19:14 +0100)]
lib: Move tab_depth() to reg_parse_prs.c

Wow, I did not know we still use prs_struct...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agolib: Make map_share_mode_to_deny_mode() static to smbstatus
Volker Lendecke [Tue, 3 Jan 2023 17:45:14 +0000 (18:45 +0100)]
lib: Make map_share_mode_to_deny_mode() static to smbstatus

At some point in the future this might disappear, we should really not
show DOS share modes in smbstatus. Maybe this can't be changed though.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agosmbd: Make get_safe_[[SI]VAL|ptr] static to smb1_lanman.c
Volker Lendecke [Tue, 3 Jan 2023 17:41:04 +0000 (18:41 +0100)]
smbd: Make get_safe_[[SI]VAL|ptr] static to smb1_lanman.c

SMB1-specific, only used there.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 months agoCVE-2022-38023 s3:rpc_server/netlogon: Avoid unnecessary loadparm_context allocations
Samuel Cabrero [Thu, 22 Dec 2022 15:32:40 +0000 (16:32 +0100)]
CVE-2022-38023 s3:rpc_server/netlogon: Avoid unnecessary loadparm_context allocations

After s3 and s4 rpc servers merge the loadparm_context is available in
the dcesrv_context structure.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan  9 15:17:14 UTC 2023 on sn-devel-184

16 months agoCVE-2022-38023 docs-xml/smbdotconf: The "server schannel require seal[:COMPUTERACCOUN...
Samuel Cabrero [Mon, 9 Jan 2023 11:17:48 +0000 (12:17 +0100)]
CVE-2022-38023 docs-xml/smbdotconf: The "server schannel require seal[:COMPUTERACCOUNT]" options are also honoured by s3 netlogon server.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoCVE-2022-38023 s3:rpc_server/netlogon: Check for global "server schannel require...
Samuel Cabrero [Thu, 22 Dec 2022 10:05:33 +0000 (11:05 +0100)]
CVE-2022-38023 s3:rpc_server/netlogon: Check for global "server schannel require seal"

By default we'll now require schannel connections with privacy/sealing/encryption.

But we allow exceptions for specific computer/trust accounts.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoCVE-2022-38023 s3:rpc_server/netlogon: make sure all _netr_LogonSamLogon*() calls...
Samuel Cabrero [Thu, 22 Dec 2022 08:29:04 +0000 (09:29 +0100)]
CVE-2022-38023 s3:rpc_server/netlogon: make sure all _netr_LogonSamLogon*() calls go through dcesrv_netr_check_schannel()

Some checks are also required for _netr_LogonSamLogonEx().

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoCVE-2022-38023 s3:rpc_server/netlogon: Use dcesrv_netr_creds_server_step_check()
Samuel Cabrero [Thu, 22 Dec 2022 15:30:26 +0000 (16:30 +0100)]
CVE-2022-38023 s3:rpc_server/netlogon: Use dcesrv_netr_creds_server_step_check()

After s3 and s4 rpc servers merge we can avoid duplicated code.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoCVE-2022-38023 s4:rpc_server/netlogon: Move schannel and credentials check functions...
Samuel Cabrero [Thu, 22 Dec 2022 13:03:23 +0000 (14:03 +0100)]
CVE-2022-38023 s4:rpc_server/netlogon: Move schannel and credentials check functions to librpc

Will be used later by s3 netlogon server.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoCVE-2022-38023 s4:rpc_server:wscript: Reformat following pycodestyle
Samuel Cabrero [Thu, 5 Jan 2023 17:13:09 +0000 (18:13 +0100)]
CVE-2022-38023 s4:rpc_server:wscript: Reformat following pycodestyle

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoCVE-2022-38023 selftest:Samba3: avoid global 'server schannel = auto'
Samuel Cabrero [Thu, 22 Dec 2022 15:46:15 +0000 (16:46 +0100)]
CVE-2022-38023 selftest:Samba3: avoid global 'server schannel = auto'

Instead of using the generic deprecated option use the specific
server require schannel:COMPUTERACCOUNT = no in order to allow
legacy tests for pass.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agoCVE-2022-38023 s3:rpc_server/netlogon: 'server schannel != yes' warning to dcesrv_int...
Samuel Cabrero [Wed, 21 Dec 2022 14:53:04 +0000 (15:53 +0100)]
CVE-2022-38023 s3:rpc_server/netlogon: 'server schannel != yes' warning to dcesrv_interface_netlogon_bind

Follow s4 netlogon server changes and move the checks to the RPC bind
hook. Next commits will remove the s3 netr_creds_server_step_check()
function.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
16 months agosource3/wscript: Remove implicit int and implicit function declarations
Florian Weimer [Mon, 21 Nov 2022 13:12:43 +0000 (14:12 +0100)]
source3/wscript: Remove implicit int and implicit function declarations

This should fix the remaining C89isms in these configure checks.

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

Signed-off-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan  9 11:46:35 UTC 2023 on sn-devel-184

16 months agosource3/wscript: Fix detection of major/minor macros
Florian Weimer [Mon, 21 Nov 2022 12:53:17 +0000 (13:53 +0100)]
source3/wscript: Fix detection of major/minor macros

These macros are only available via <sys/sysmacros.h> as of glibc
commit e16deca62e16f645213dffd4ecd1153c37765f17 ("[BZ #19239] Don't
include sys/sysmacros.h from sys/types.h."), which went into
glibc 2.28.

This is different from the usual C99 cleanups because it changes
the configure check result with existing compilers that usually
accept implicit function declarations.

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

Signed-off-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
16 months agobuildtools/wafsamba: Avoid calling lib_func without a prototype
Florian Weimer [Mon, 21 Nov 2022 12:37:41 +0000 (13:37 +0100)]
buildtools/wafsamba: Avoid calling lib_func without a prototype

This is a backport of commit f4c0a750d4adebcf2342a44e85f04526c34
("WAF: Fix detection of linker features")
to buildtools/wafsamba/samba_conftests.py.  It fixes the check for
rpath support with compilers in strict C99 mode.

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

Signed-off-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
16 months agonsswitch: avoid calling pthread_getspecific() on an uninitialized key
Ralph Boehme [Thu, 5 Jan 2023 15:25:11 +0000 (16:25 +0100)]
nsswitch: avoid calling pthread_getspecific() on an uninitialized key

Found by ASAN:

$ bin/stress-nss-libwbclient
...
==1639426==ERROR: AddressSanitizer: unknown-crash on address 0x7f3907d85000 at pc 0x7f3907d649fb bp 0x7ffc6545f5b0 sp 0x7ffc6545f5a8
READ of size 4 at 0x7f3907d85000 thread T0
    #0 0x7f3907d649fa in winbind_close_sock ../../nsswitch/wb_common.c:220
    #1 0x7f3907d65866 in winbind_destructor ../../nsswitch/wb_common.c:246
    #2 0x7f3907da5d3d in _dl_fini /usr/src/debug/glibc-2.35-20.fc36.x86_64/elf/dl-fini.c:142
    #3 0x7f3907241044 in __run_exit_handlers (/lib64/libc.so.6+0x41044)
    #4 0x7f39072411bf in exit (/lib64/libc.so.6+0x411bf)
    #5 0x7f3907229516 in __libc_start_call_main (/lib64/libc.so.6+0x29516)
    #6 0x7f39072295c8 in __libc_start_main_impl (/lib64/libc.so.6+0x295c8)
    #7 0x56236a2042b4 in _start (/data/git/samba/scratch3/bin/default/nsswitch/stress-nss-libwbclient+0x22b4)

Address 0x7f3907d85000 is a wild pointer inside of access range of size 0x000000000004.
SUMMARY: AddressSanitizer: unknown-crash ../../nsswitch/wb_common.c:220 in winbind_close_sock

The pthread key in wb_global_ctx.key is only initialized if
wb_thread_ctx_initialize() is called via get_wb_global_ctx() -> get_wb_thread_ctx().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan  6 15:04:46 UTC 2023 on sn-devel-184

16 months agos4:lib/messaging: fix interaction between imessaging_context_destructor and irpc_dest...
Stefan Metzmacher [Sat, 31 Dec 2022 00:24:57 +0000 (01:24 +0100)]
s4:lib/messaging: fix interaction between imessaging_context_destructor and irpc_destructor

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agothird_party: Update waf to version 2.0.25
Andreas Schneider [Wed, 4 Jan 2023 08:39:45 +0000 (09:39 +0100)]
third_party: Update waf to version 2.0.25

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Fix indentation
Volker Lendecke [Thu, 5 Jan 2023 14:17:44 +0000 (15:17 +0100)]
smbd: Fix indentation

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jan  5 18:00:17 UTC 2023 on sn-devel-184

16 months agosmbd: Fix CID 1518901 Logically dead code
Volker Lendecke [Thu, 5 Jan 2023 14:17:14 +0000 (15:17 +0100)]
smbd: Fix CID 1518901 Logically dead code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Fix CID 1518902 Use after free
Volker Lendecke [Thu, 5 Jan 2023 14:11:10 +0000 (15:11 +0100)]
smbd: Fix CID 1518902 Use after free

The SMB_REALLOC macro properly deals with failure to realloc, so
overwriting the target variable is correct here.

Signed-off-by: Volker Lendecke <vl@samba.org>
16 months agonsswitch: remove winbind_nss_mutex
Ralph Boehme [Wed, 21 Dec 2022 13:48:06 +0000 (14:48 +0100)]
nsswitch: remove winbind_nss_mutex

We're now thread-safe by using TLS, so the global lock isn't needed anymore.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jan  5 12:34:35 UTC 2023 on sn-devel-184

16 months agonsswitch: leverage TLS if available in favour over global locking
Ralph Boehme [Sun, 6 Nov 2022 15:57:27 +0000 (16:57 +0100)]
nsswitch: leverage TLS if available in favour over global locking

The global locking can lead to deadlocks when using nscd: when processing the
first request in winbind, when we know we call into code that will recurse into
winbind we call winbind_off() which sets an environment variable which is later
checked here in the nsswitch module.

But with nscd in the stack, we don't see the env variable in nsswitch, so when
we try to acquire the global lock again, it is already locked and we deadlock.

By using a thread specific winbindd_context, plus a few other thread local global
variables, we don't need a global lock anymore.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agonsswitch: prepare for removing global locking by using TLS
Ralph Boehme [Sun, 6 Nov 2022 15:57:27 +0000 (16:57 +0100)]
nsswitch: prepare for removing global locking by using TLS

Switch to using TLS for all global variables. No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agonsswitch/stress-nss-libwbclient: also test after fork
Ralph Boehme [Mon, 31 Oct 2022 15:19:21 +0000 (16:19 +0100)]
nsswitch/stress-nss-libwbclient: also test after fork

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agolibreplace: require TLS support if pthread support is available
Ralph Boehme [Tue, 15 Nov 2022 10:30:28 +0000 (11:30 +0100)]
libreplace: require TLS support if pthread support is available

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agolibreplace: update comment on __thread support
Ralph Boehme [Thu, 27 Oct 2022 05:51:49 +0000 (07:51 +0200)]
libreplace: update comment on __thread support

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
16 months agosmbd: Use get_dirent_ea_size() also for BOTH_DIRECTORY_INFO
Volker Lendecke [Mon, 2 Jan 2023 15:21:50 +0000 (16:21 +0100)]
smbd: Use get_dirent_ea_size() also for BOTH_DIRECTORY_INFO

This is a bit more involved as readdir_attr_data needs to be looked
at. The meaning of this if-statements should be the same though,
readdir_attr_data can only be non-NULL if we don't have a reparse
point around. See the beginning of smbd_marshall_dir_entry().

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Jan  4 09:48:37 UTC 2023 on sn-devel-184

16 months agosmbd: Factor out get_dirent_ea_size()
Volker Lendecke [Mon, 2 Jan 2023 15:19:12 +0000 (16:19 +0100)]
smbd: Factor out get_dirent_ea_size()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agopylibsmb: Add reparse tag definitions
Volker Lendecke [Mon, 2 Jan 2023 15:01:10 +0000 (16:01 +0100)]
pylibsmb: Add reparse tag definitions

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agopylibsmb: Get reparse tag when listing directories
Volker Lendecke [Mon, 2 Jan 2023 13:29:12 +0000 (14:29 +0100)]
pylibsmb: Get reparse tag when listing directories

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Modernize a DBG statement
Volker Lendecke [Wed, 28 Dec 2022 22:18:20 +0000 (23:18 +0100)]
smbd: Modernize a DBG statement

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Shorten a few lines
Volker Lendecke [Wed, 28 Dec 2022 22:14:25 +0000 (23:14 +0100)]
smbd: Shorten a few lines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Remove duplicate/unused #defines
Volker Lendecke [Fri, 23 Dec 2022 08:21:25 +0000 (09:21 +0100)]
smbd: Remove duplicate/unused #defines

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agotorture: Fix whitespace
Volker Lendecke [Sat, 24 Dec 2022 13:08:40 +0000 (14:08 +0100)]
torture: Fix whitespace

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Move SMB_QUERY_FILE_UNIX_LINK to smb1_trans2.c
Volker Lendecke [Mon, 2 Jan 2023 08:47:05 +0000 (09:47 +0100)]
smbd: Move SMB_QUERY_FILE_UNIX_LINK to smb1_trans2.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Move get_posix_fsp() to smb1_trans2.c
Volker Lendecke [Sat, 31 Dec 2022 16:41:16 +0000 (17:41 +0100)]
smbd: Move get_posix_fsp() to smb1_trans2.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Move SMB_QUERY_POSIX_ACL to smb1_trans2.c
Volker Lendecke [Sat, 31 Dec 2022 16:39:09 +0000 (17:39 +0100)]
smbd: Move SMB_QUERY_POSIX_ACL to smb1_trans2.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Move SMB_QUERY_FILE_UNIX_[BASIC|INFO2] to smb1_trans2.c
Volker Lendecke [Fri, 30 Dec 2022 15:26:38 +0000 (16:26 +0100)]
smbd: Move SMB_QUERY_FILE_UNIX_[BASIC|INFO2] to smb1_trans2.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Remove an unnecessary if-statement
Volker Lendecke [Fri, 30 Dec 2022 21:22:31 +0000 (22:22 +0100)]
smbd: Remove an unnecessary if-statement

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
16 months agosmbd: Remove an unnecessary if-statement
Volker Lendecke [Fri, 30 Dec 2022 21:21:48 +0000 (22:21 +0100)]
smbd: Remove an unnecessary if-statement

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>