]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
4 years agos3:tests: Reformat test_smbclient_iconv.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smbclient_iconv.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smbclient_encryption_off.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smbclient_encryption_off.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smbclient_encryption.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smbclient_encryption.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smbclient_basic.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smbclient_basic.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smbclient_auth.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smbclient_auth.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smbXsrv_client_dead_rec.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smbXsrv_client_dead_rec.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smb2_not_casesensitive.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smb2_not_casesensitive.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smb1_system_security.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smb1_system_security.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_smb1_shadow_copy_torture.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_smb1_shadow_copy_torture.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_sharesec.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_sharesec.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_shareenum.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_shareenum.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_shadow_copy_torture.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_shadow_copy_torture.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_sacl_set_get.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_sacl_set_get.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agogitlab-ci: Add jq
Ralph Boehme [Fri, 18 Mar 2022 10:47:37 +0000 (11:47 +0100)] 
gitlab-ci: Add jq

Pair-Programmed-With: Jule Anger <janger@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Jule Anger <janger@samba.org>
[abartlet@samba.org Regenerated sha1sum after rebase

This commit in aid of future tests for smbstatus JSON output]

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun 10 07:51:02 UTC 2022 on sn-devel-184

4 years agobootstrap: Fix [gm]old linker existence check
Joseph Sutton [Fri, 27 May 2022 08:54:25 +0000 (20:54 +1200)] 
bootstrap: Fix [gm]old linker existence check

We used 'test -x $LD_GOLD' to test whether the alternate linker was
available and executable. However, if $LD_GOLD expanded to an empty
string, the 'test' command would be run in single argument mode, see
that '-x' was a non-empty string, and duly return a successful status
code. The result would be a meaningless symlink created, and a
misleading message.

Because 'which' already tests that its argument is executable, the
solution is simply to remove the 'test' command.

We also invert the return code of the 'which' command so that if the
alternate linker is not found, the overall code returned to Docker is
still successful.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agobootstrap: Remove duplicate dict key
Joseph Sutton [Thu, 5 May 2022 09:04:02 +0000 (21:04 +1200)] 
bootstrap: Remove duplicate dict key

Commit 86d4836919e29c0bdf927658df641811247534c6 added python36-gpg, but
the duplicate key lower down in the same dict meant it never had any
effect. Now it does.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agogitlab-ci: Allow --xz compression on our samba-testbase.tar
Andrew Bartlett [Wed, 13 Oct 2021 23:01:16 +0000 (12:01 +1300)] 
gitlab-ci: Allow --xz compression on our samba-testbase.tar

This may make this faster to upload to our private gitlab server
which is not as close to our runners.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agoci-images: install diffutils prior to building images
Uri Simchoni [Wed, 8 Jun 2022 19:20:03 +0000 (22:20 +0300)] 
ci-images: install diffutils prior to building images

Ensure the podman image used for generating Samba CI images includes
'diff' utility

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun  9 23:48:42 UTC 2022 on sn-devel-184

4 years agolib/util: Delegate constant time memcmp to gnutls_memcmp()
Joseph Sutton [Wed, 8 Jun 2022 03:19:58 +0000 (15:19 +1200)] 
lib/util: Delegate constant time memcmp to gnutls_memcmp()

gnutls_memcmp() is mostly identical to our own implementation, except
that ours will not break if supplied with 4 GiB or more of data.
However, using an external function permits us to disclaim
responsibility if some CPU/compiler combination happens to invalidate
our constant-time guarantee.

For reference, gnutls_memcmp() implementation:
https://gitlab.com/gnutls/gnutls/-/blob/78d9820de0d2eb2f8088e359779ee7342f5f089e/lib/safe-memfuncs.c#L41-67

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/util: Add test of mem_equal_const_time()
Joseph Sutton [Wed, 11 May 2022 02:06:22 +0000 (14:06 +1200)] 
lib/util: Add test of mem_equal_const_time()

Ensure that it gives the correct results for comparing two memory
regions.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/util: Add test of data_blob_equal_const_time()
Joseph Sutton [Wed, 11 May 2022 02:05:34 +0000 (14:05 +1200)] 
lib/util: Add test of data_blob_equal_const_time()

Ensure that it gives the correct results for comparing two data blobs.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/util: Reduce sum variable to uint8_t
Joseph Sutton [Wed, 11 May 2022 02:04:25 +0000 (14:04 +1200)] 
lib/util: Reduce sum variable to uint8_t

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/util: Change function to mem_equal_const_time()
Joseph Sutton [Wed, 11 May 2022 00:07:43 +0000 (12:07 +1200)] 
lib/util: Change function to mem_equal_const_time()

Since memcmp_const_time() doesn't act as an exact replacement for
memcmp(), and its return value is only ever compared with zero, simplify
it and emphasize the intention of checking equality by returning a bool
instead.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/util: Change function to data_blob_equal_const_time()
Joseph Sutton [Tue, 10 May 2022 23:39:14 +0000 (11:39 +1200)] 
lib/util: Change function to data_blob_equal_const_time()

Since data_blob_cmp_const_time() doesn't act as an exact replacement for
data_blob_cmp(), and its return value is only ever compared with zero,
simplify it and emphasize the intention of checking equality by
returning a bool instead.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agoauth: Use constant-time memcmp when comparing sensitive buffers
Joseph Sutton [Thu, 17 Feb 2022 02:35:42 +0000 (15:35 +1300)] 
auth: Use constant-time memcmp when comparing sensitive buffers

This helps to avoid timing attacks.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/util: Move memcmp_const_time() to util.c
Joseph Sutton [Tue, 10 May 2022 03:57:40 +0000 (15:57 +1200)] 
lib/util: Move memcmp_const_time() to util.c

This allows it to be used in more places without needing to introduce
more dependencies.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agotests/krb5/test_ldap.py: Increase maximum threshold for LDAP timeout
Joseph Sutton [Sat, 30 Apr 2022 06:03:14 +0000 (18:03 +1200)] 
tests/krb5/test_ldap.py: Increase maximum threshold for LDAP timeout

This test often fails because the server takes too long to time out.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agolib/util: Prefer backtrace_symbols() for internal backtraces
Andrew Bartlett [Tue, 7 Jun 2022 03:07:59 +0000 (15:07 +1200)] 
lib/util: Prefer backtrace_symbols() for internal backtraces

Backtraces when Samba is in PANIC state are better with
backtrace_symbols() than with libunwind on Ubuntu 20.04 x86_64
so move libunwind to a off-by-default option, prompted for
if backtrace_symbols() is not available.

Based on a request by Fco Javier Felix <ffelix@inode64.com>

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
4 years agobuild: Possibly link against libexecinfo for backtrace_symbols()
Andrew Bartlett [Tue, 7 Jun 2022 03:05:26 +0000 (15:05 +1200)] 
build: Possibly link against libexecinfo for backtrace_symbols()

We look for backtrace_symbols() in this library, so we should link against
it if we find it.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
4 years agobuild: Make build with --disable-fault-hanlding work under --enable-developer
Andrew Bartlett [Tue, 7 Jun 2022 03:03:54 +0000 (15:03 +1200)] 
build: Make build with --disable-fault-hanlding work under --enable-developer

Previously this would leave static functions unused, which the compiler will
not allow for a developer build.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
4 years agos3:smbd: Free allocated strings before leaving user_in_netgroup() function
Samuel Cabrero [Tue, 7 Jun 2022 09:06:04 +0000 (11:06 +0200)] 
s3:smbd: Free allocated strings before leaving user_in_netgroup() function

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun  9 22:40:43 UTC 2022 on sn-devel-184

4 years agoRevert "lib:util: Remove NIS support from string_match()"
Samuel Cabrero [Fri, 3 Jun 2022 15:48:21 +0000 (17:48 +0200)] 
Revert "lib:util: Remove NIS support from string_match()"

This partly reverts commit 620de975f147ac9427b51ea0e1e3eabda443d4b6.

Drop chunk including system/nis.h, drop wscript_build modifications,
use getdomainname() from glibc instead of yp_get_default_domain() from
libnsl.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoRevert "s3:smbd: Remove NIS support"
Samuel Cabrero [Fri, 3 Jun 2022 13:07:18 +0000 (15:07 +0200)] 
Revert "s3:smbd: Remove NIS support"

This partly reverts commit edda7a329e5bed442418de9782cec9f567092aae.

Revert the chunks related to netgroups and skip NIS support related ones.
Use getdomainname() from glibc instead of yp_get_default_domain() from
libnsl to get the NIS domain name.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoRevert "docs-xml: Update documentation for removal of NIS support"
Samuel Cabrero [Fri, 3 Jun 2022 12:12:01 +0000 (14:12 +0200)] 
Revert "docs-xml: Update documentation for removal of NIS support"

This partly reverts commit a72bc3e15d3ed62e9ad2c0a97ce5d6d653abb048.

Revert only the chunks related to netgroups and skip NIS related ones.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoRevert "s3:auth: Fix user_in_list() for UNIX groups"
Samuel Cabrero [Fri, 3 Jun 2022 12:01:36 +0000 (14:01 +0200)] 
Revert "s3:auth: Fix user_in_list() for UNIX groups"

This partly reverts commit 6dc463d3e2eb229df1c4f620cfcaf22ac71738d4.

Reverted to allow next revert commits to apply cleanly. Do not recreate
selftest/knownfail.d/usernamemap file.

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

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:smbd: Out-by-4 error in smbd read reply max_send clamp
Robert Sprowson [Sun, 19 Jul 2020 11:59:00 +0000 (12:59 +0100)] 
s3:smbd: Out-by-4 error in smbd read reply max_send clamp

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

Signed-off-by: Robert Sprowson <webpages@sprow.co.uk>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun  8 19:50:08 UTC 2022 on sn-devel-184

4 years agotdb: version 1.4.7 tdb-1.4.7
Stefan Metzmacher [Wed, 8 Jun 2022 13:02:53 +0000 (15:02 +0200)] 
tdb: version 1.4.7

* Fix build problems

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun  8 17:57:53 UTC 2022 on sn-devel-184

4 years agotevent: version 0.12.1 tevent-0.12.1
Stefan Metzmacher [Wed, 8 Jun 2022 13:04:08 +0000 (15:04 +0200)] 
tevent: version 0.12.1

* Fix build problems

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agotalloc: version 2.3.4 talloc-2.3.4
Stefan Metzmacher [Wed, 8 Jun 2022 13:01:55 +0000 (15:01 +0200)] 
talloc: version 2.3.4

* Fix build problems

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
4 years agos3:tests: Reformat test_rpcclientsrvsvc.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_rpcclientsrvsvc.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jun  8 14:13:35 UTC 2022 on sn-devel-184

4 years agos3:tests: Reformat test_rpcclient_samlogon.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_rpcclient_samlogon.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_rpcclient_pw_nt_hash.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_rpcclient_pw_nt_hash.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_rpcclient_netsessenum.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_rpcclient_netsessenum.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_rpcclient_lookup.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_rpcclient_lookup.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_rpcclient_dfs.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_rpcclient_dfs.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_rpcclient.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_rpcclient.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_resolvconf.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_resolvconf.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_registry_upgrade.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_registry_upgrade.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_pthreadpool.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_pthreadpool.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_printing_var_exp.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_printing_var_exp.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_preserve_case.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_preserve_case.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_open_eintr.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_open_eintr.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_offline.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_offline.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agos3:tests: Reformat test_netfileenum.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:10 +0000 (15:34 +0200)] 
s3:tests: Reformat test_netfileenum.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
4 years agolib/smbconf: expose smbconf error codes to python wrapper
John Mulligan [Mon, 6 Jun 2022 19:55:22 +0000 (15:55 -0400)] 
lib/smbconf: expose smbconf error codes to python wrapper

The smbconf library defines an enum of error codes that can be returned
from the C calls. The error codes were getting stored in the python
SMBConfError type but it was not easy to access or obvious what the
integer code represented.

This change makes it easier to get the returned error code: via a
`error_code` attribute on the exception value. It also exposes the
integer constants to the module. Simple tests for a few of the more
obvious error codes check that this new error handling correctly
exposes the error code values.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Jun  8 13:13:10 UTC 2022 on sn-devel-184

4 years agos3:tests: Reformat test_net_usershare.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_usershare.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

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 Jun  8 07:28:08 UTC 2022 on sn-devel-184

4 years agos3:tests: Reformat test_net_tdb.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_tdb.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_rpc_share_allowedusers.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_rpc_share_allowedusers.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_rpc_oldjoin.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_rpc_oldjoin.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_rpc_join_creds.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_rpc_join_creds.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_rpc_join.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_rpc_join.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_registry_roundtrip.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_registry_roundtrip.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_registry_import.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_registry_import.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_registry_check.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_registry_check.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_registry.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_registry.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_misc.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_misc.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_machine_account.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_machine_account.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_lookup.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_lookup.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_dom_join_fail_dc.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_dom_join_fail_dc.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_cred_change.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_cred_change.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
4 years agos3:tests: Reformat test_net_conf.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_conf.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jun  7 09:19:43 UTC 2022 on sn-devel-184

4 years agos3:tests: Reformat test_net_cache_samlogon.sh
Andreas Schneider [Fri, 22 Apr 2022 13:34:09 +0000 (15:34 +0200)] 
s3:tests: Reformat test_net_cache_samlogon.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
4 years agowinbindd: Remove a "wrong" error message
Volker Lendecke [Sun, 5 Jun 2022 15:28:04 +0000 (17:28 +0200)] 
winbindd: Remove a "wrong" error message

Before 9bacf7529dd child_process_request() returned right after the
callback function without going through the DEBUG message. Restore
that behaviour.

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): Mon Jun  6 20:17:06 UTC 2022 on sn-devel-184

4 years agolib: Slightly simplify is_ntfs_stream_smb_fname()
Volker Lendecke [Sun, 5 Jun 2022 12:39:48 +0000 (14:39 +0200)] 
lib: Slightly simplify is_ntfs_stream_smb_fname()

YMMV, but for me the direct return is easier to read

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agovfs: Remove a typedef
Volker Lendecke [Fri, 3 Jun 2022 12:47:30 +0000 (14:47 +0200)] 
vfs: Remove a typedef

We want to get rid of struct typedefs, and this was quick

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Fix a typo
Volker Lendecke [Thu, 2 Jun 2022 13:48:37 +0000 (15:48 +0200)] 
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Fix CID 1504457 Resource leak
Volker Lendecke [Fri, 20 May 2022 08:18:59 +0000 (10:18 +0200)] 
smbd: Fix CID 1504457 Resource leak

Highly likely that's a false positive because Coverity does not
understand that srv_encrypt_buffer() only allocates when
NT_STATUS_OK(status), but it does not hurt to make it happy this way.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Remove NTCREATEX_FLAG_DELETE_ON_CLOSE
Volker Lendecke [Thu, 19 May 2022 18:05:52 +0000 (20:05 +0200)] 
smbd: Remove NTCREATEX_FLAG_DELETE_ON_CLOSE

This is only used for print files. Storing it in the fd_handle seems
overkill to me, this can easily be stored directly in the fsp itself,
we have a flag for this.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolsa_server4: Simplify get_tdo() with talloc_asprintf_addbuf()
Volker Lendecke [Fri, 27 May 2022 18:57:53 +0000 (20:57 +0200)] 
lsa_server4: Simplify get_tdo() with talloc_asprintf_addbuf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agolsa_server4: Simplify get_tdo() with dom_sid_str_buf()
Volker Lendecke [Fri, 27 May 2022 16:38:34 +0000 (18:38 +0200)] 
lsa_server4: Simplify get_tdo() with dom_sid_str_buf()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Move message_push_string() to smb1_utils.c
Volker Lendecke [Sun, 5 Jun 2022 14:44:28 +0000 (16:44 +0200)] 
smbd: Move message_push_string() to smb1_utils.c

Only used in SMB1 code

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agosmbd: Remove unused smb_bufrem() macro
Volker Lendecke [Sun, 5 Jun 2022 14:37:13 +0000 (16:37 +0200)] 
smbd: Remove unused smb_bufrem() macro

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:smbd implement volume serial number parameter
Christian Ambach [Tue, 31 May 2022 19:13:25 +0000 (21:13 +0200)] 
s3:smbd implement volume serial number parameter

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14765
RN: add new smb.conf parameter "volume serial number" to allow overriding
the generated default value

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed=by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jun  6 17:42:37 UTC 2022 on sn-devel-184

4 years agodocs-xml: add new parameter volume serial number
Christian Ambach [Wed, 18 May 2022 20:07:17 +0000 (22:07 +0200)] 
docs-xml: add new parameter volume serial number

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14765
RN: add new smb.conf parameter "volume serial number" to allow overriding
the generated default value

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:smbd factor out volume serial number generation
Christian Ambach [Wed, 27 Apr 2022 17:27:15 +0000 (19:27 +0200)] 
s3:smbd factor out volume serial number generation

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14765
RN: add new smb.conf parameter "volume serial number" to allow overriding the
generated default value

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:smbd add missing VolumeCreationTime to FileFsVolumeInformation
Christian Ambach [Sat, 7 May 2022 18:37:34 +0000 (20:37 +0200)] 
s3:smbd add missing VolumeCreationTime to FileFsVolumeInformation

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agos3:include fix typo
Christian Ambach [Sat, 7 May 2022 18:35:43 +0000 (20:35 +0200)] 
s3:include fix typo

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
4 years agoselftests: Convert "net ads dns async" test to python
Samuel Cabrero [Thu, 2 Jun 2022 16:39:57 +0000 (18:39 +0200)] 
selftests: Convert "net ads dns async" test to python

The current test uses the dig tool from bind9 but this tool has been
rewritten in 9.17.7 to use bind's netmgr functions instead of isc_socket
(commit 94b7988efb0f9b96415dd2966e6070450d960263).

The problem is that these 'netmgr' functions use libuv internally, and, on
systems supporting it, they end up using the sendmmsg() syscall which is not
catched by socket wrapper so the test fails.

This commit converts the test to python and uses the dnspython module
instead of the dig tool. Backtraces follow as reference.

Backtrace from dig v9.16.28 (working):

 #0  0x00007ffff778edee in sendmsg () from /lib64/libc.so.6
 #1  0x00000000005e5dee in cmsgsend (s=s@entry=12, level=level@entry=0, type=type@entry=1, res=<optimized out>) at net.c:515
 #2  0x00000000005e616c in try_dscp_v4 () at net.c:623
 #3  try_dscp () at net.c:696
 #4  0x00007ffff7708ad7 in __pthread_once_slow () from /lib64/libc.so.6
 #5  0x00000000005e66d7 in initialize_dscp () at net.c:702
 #6  isc_net_probedscp () at net.c:707
 #7  0x00000000005e8460 in socket_create (manager=0x6b49c0, pf=2, type=<optimized out>, socketp=0x7ffff0012b00, dup_socket=0x0) at socket.c:2454
 #8  0x000000000043cfcd in send_udp (query=0x7ffff00129a8) at dighost.c:2897
 #9  0x000000000043f9c7 in onrun_callback (task=<optimized out>, event=<optimized out>) at dighost.c:4271
 #10 0x00000000005dfefe in task_run (task=0x6b5c70) at task.c:851
 #11 isc_task_run (task=0x6b5c70) at task.c:944
 #12 0x00000000005ca0ce in isc__nm_async_task (worker=0x6b8970, ev0=0x716250) at netmgr.c:873
 #13 process_netievent (worker=worker@entry=0x6b8970, ievent=0x716250) at netmgr.c:952
 #14 0x00000000005ca2ba in process_queue (worker=worker@entry=0x6b8970, type=type@entry=NETIEVENT_TASK) at netmgr.c:1021
 #15 0x00000000005caa43 in process_all_queues (worker=0x6b8970) at netmgr.c:792
 #16 async_cb (handle=0x6b8cd0) at netmgr.c:821
 #17 0x00007ffff7898a4d in ?? () from /lib64/libuv.so.1
 #18 0x00007ffff78b4217 in ?? () from /lib64/libuv.so.1
 #19 0x00007ffff789e40a in uv_run () from /lib64/libuv.so.1
 #20 0x00000000005ca31e in nm_thread (worker0=0x6b8970) at netmgr.c:727
 #21 0x00000000005e2315 in isc__trampoline_run (arg=0x6b7c40) at trampoline.c:198
 #22 0x00007ffff7703767 in start_thread () from /lib64/libc.so.6
 #23 0x00007ffff778dc10 in clone3 () from /lib64/libc.so.6

Backtrace from dig v9.17.7 (not working):

 #0  0x00007ffff7684480 in syscall () from /lib64/libc.so.6
 #1  0x00007ffff754aed0 in uv__sendmmsg (vlen=0, mmsg=0x0, fd=10) at src/unix/linux-syscalls.c:163
 #2  uv__udp_mmsg_init () at src/unix/udp.c:74
 #3  0x00007ffff7606ad7 in __pthread_once_slow () from /lib64/libc.so.6
 #4  0x00007ffff7541bd9 in uv_once (guard=<optimized out>, callback=<optimized out>) at src/unix/thread.c:440
 #5  0x00007ffff7539e9b in uv__udp_sendmsg (handle=0x7ffff50535b8) at src/unix/udp.c:415
 #6  uv__udp_send (send_cb=0x7ffff7a41db0 <udp_send_cb>, addrlen=<optimized out>, addr=<optimized out>, nbufs=1, bufs=0x7ffff506c720, handle=0x7ffff50535b8, req=0x7ffff506c878) at src/unix/udp.c:773
 #7  uv_udp_send (req=req@entry=0x7ffff506c878, handle=handle@entry=0x7ffff50535b8, bufs=bufs@entry=0x7ffff506c720, nbufs=nbufs@entry=1, addr=<optimized out>, send_cb=send_cb@entry=0x7ffff7a41db0 <udp_send_cb>) at src/uv-common.c:464
 #8  0x00007ffff7a42308 in udp_send_direct (peer=0x7ffff5dfa988, req=0x7ffff506c700, sock=0x7ffff5053000) at netmgr/udp.c:839
 #9  isc__nm_async_udpsend (worker=<optimized out>, ev0=0x7ffff5dfa950) at netmgr/udp.c:780
 #10 0x00007ffff7a47de7 in isc__nm_udp_send (handle=<optimized out>, region=0x7ffff5dfaa90, cb=0x555555566250 <send_done>, cbarg=<optimized out>) at netmgr/udp.c:749
 #11 0x0000555555562ac2 in send_udp (query=0x7ffff502a000) at /usr/src/debug/bind-9.18.2-1.1.x86_64/bin/dig/dighost.c:2899
 #12 udp_ready (handle=0x7ffff5026180, eresult=ISC_R_SUCCESS, arg=<optimized out>) at /usr/src/debug/bind-9.18.2-1.1.x86_64/bin/dig/dighost.c:2974
 #13 0x00007ffff7a37d34 in isc__nm_async_connectcb (worker=worker@entry=0x7ffff622f000, ev0=ev0@entry=0x7ffff5026480) at netmgr/netmgr.c:2704
 #14 0x00007ffff7a3ca20 in process_netievent (worker=worker@entry=0x7ffff622f000, ievent=0x7ffff5026480) at netmgr/netmgr.c:940
 #15 0x00007ffff7a3d027 in process_queue (worker=worker@entry=0x7ffff622f000, type=type@entry=NETIEVENT_NORMAL) at netmgr/netmgr.c:977
 #16 0x00007ffff7a3d203 in process_all_queues (worker=0x7ffff622f000) at netmgr/netmgr.c:733
 #17 async_cb (handle=0x7ffff622f360) at netmgr/netmgr.c:762
 #18 0x00007ffff7531a4d in uv__async_io (loop=0x7ffff622f010, w=<optimized out>, events=<optimized out>) at src/unix/async.c:163
 #19 0x00007ffff754d217 in uv__io_poll (loop=0x7ffff622f010, timeout=<optimized out>) at src/unix/epoll.c:374
 #20 0x00007ffff753740a in uv__io_poll (timeout=<optimized out>, loop=0x7ffff622f010) at src/unix/udp.c:122
 #21 uv_run (loop=loop@entry=0x7ffff622f010, mode=mode@entry=UV_RUN_DEFAULT) at src/unix/core.c:391
 #22 0x00007ffff7a3d624 in nm_thread (worker0=0x7ffff622f000) at netmgr/netmgr.c:664
 #23 0x00007ffff7a6c915 in isc__trampoline_run (arg=0x555555599210) at /usr/src/debug/bind-9.18.2-1.1.x86_64/lib/isc/trampoline.c:187
 #24 0x00007ffff7601767 in start_thread () from /lib64/libc.so.6
 #25 0x00007ffff768bc10 in clone3 () from /lib64/libc.so.6

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun  4 00:27:29 UTC 2022 on sn-devel-184

4 years agolib/util/gpfswrap: remove unused gpfswrap_get_winattrs_path()
Ralph Boehme [Tue, 17 May 2022 14:52:21 +0000 (16:52 +0200)] 
lib/util/gpfswrap: remove unused gpfswrap_get_winattrs_path()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun  3 21:53:31 UTC 2022 on sn-devel-184

4 years agovfs_gpfs: use handle based gpfswrap_get_winattrs()
Ralph Boehme [Tue, 17 May 2022 14:32:23 +0000 (16:32 +0200)] 
vfs_gpfs: use handle based gpfswrap_get_winattrs()

Fixes detecting offline flag for files in snapshot – no idea if this is
actually expected.

Replaces path based gpfswrap_get_winattrs_path() with handle based version
gpfswrap_get_winattrs(). When dealing with files in snapshots fsp->fsp_name
points to the active dataset, which will cause ENOENT failures if files are
deleted there any only present in the snapshot.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agolib/util/gpfswrap: remove unused gpfswrap_getacl()
Ralph Boehme [Tue, 17 May 2022 14:27:58 +0000 (16:27 +0200)] 
lib/util/gpfswrap: remove unused gpfswrap_getacl()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: finally: use gpfswrap_fgetacl() instead of gpfswrap_getacl()
Ralph Boehme [Tue, 17 May 2022 14:02:10 +0000 (16:02 +0200)] 
vfs_gpfs: finally: use gpfswrap_fgetacl() instead of gpfswrap_getacl()

Replaces path based gpfswrap_getacl() with handle based version
gpfswrap_fgetacl(). When dealing with files in snapshots fsp->fsp_name points to
the active dataset, which will cause ENOENT failures if files are deleted there
any only present in the snapshot:

[2022/05/06 11:32:55.233435,  4, pid=12962, effective(1460548, 273710), real(1460548, 0)]
   calling open_file with flags=0x0 flags2=0x800 mode=0644, access_mask = 0x80, open_access_mask = 0x80
[2022/05/06 11:32:55.233460, 10, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs]
   gpfs_get_nfs4_acl invoked for dir/subdir/file.txt
[2022/05/06 11:32:55.233495,  5, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs]
   smbd_gpfs_getacl failed with No such file or directory
[2022/05/06 11:32:55.233521,  9, pid=12962, effective(1460548, 273710), real(1460548, 0), class=vfs]
   gpfs_getacl failed for dir/subdir/file.txt with No such file or directory
[2022/05/06 11:32:55.233546, 10, pid=12962, effective(1460548, 273710), real(1460548, 0)]
   smbd_check_access_rights_fsp: Could not get acl on dir/subdir/file.txt {@GMT-2022.05.04-11.58.53}: NT_STATUS_OBJECT_NAME_NOT_FOUND

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agolib/util/gpfswrap: add gpfswrap_fgetacl()
Ralph Boehme [Tue, 17 May 2022 13:43:39 +0000 (15:43 +0200)] 
lib/util/gpfswrap: add gpfswrap_fgetacl()

Adds handle based version of gpfswrap_getacl().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: pass fsp to gpfs_getacl_with_capability()
Ralph Boehme [Tue, 17 May 2022 14:01:48 +0000 (16:01 +0200)] 
vfs_gpfs: pass fsp to gpfs_getacl_with_capability()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: pass fsp to vfs_gpfs_getacl()
Ralph Boehme [Tue, 17 May 2022 13:35:26 +0000 (15:35 +0200)] 
vfs_gpfs: pass fsp to vfs_gpfs_getacl()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: use fsp in gpfsacl_get_posix_acl()
Ralph Boehme [Tue, 17 May 2022 13:34:35 +0000 (15:34 +0200)] 
vfs_gpfs: use fsp in gpfsacl_get_posix_acl()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: pass fsp to gpfsacl_get_posix_acl()
Ralph Boehme [Tue, 17 May 2022 13:32:24 +0000 (15:32 +0200)] 
vfs_gpfs: pass fsp to gpfsacl_get_posix_acl()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: pass fsp to gpfs_get_nfs4_acl()
Ralph Boehme [Tue, 17 May 2022 13:25:35 +0000 (15:25 +0200)] 
vfs_gpfs: pass fsp to gpfs_get_nfs4_acl()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: pass fsp to gpfsacl_emu_chmod()
Ralph Boehme [Tue, 17 May 2022 13:17:34 +0000 (15:17 +0200)] 
vfs_gpfs: pass fsp to gpfsacl_emu_chmod()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
4 years agovfs_gpfs: indentation and README.Coding fixes
Ralph Boehme [Tue, 17 May 2022 12:47:03 +0000 (14:47 +0200)] 
vfs_gpfs: indentation and README.Coding fixes

Best viewed with git show -w.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>