[SCM] Samba Shared Repository - branch v4-15-test updated
Jule Anger
janger at samba.org
Wed Nov 10 17:06:01 UTC 2021
The branch, v4-15-test has been updated
via 962b7b0f92d s3-winexe: Fix winexe core dump (use-after-free)
via f926586544e vfs_fruit: remove a fsp check from ad_fset()
via 3a34628266f lib/dbwrap: reset deleted record to tdb_null
via 8bb5f0911a8 CI: add a test for bug 14882
via a16283466ba s3/libsmb: check for global parametric option "libsmb:client_guid"
via a549dc219cb s3: docs-xml: Clarify the "delete veto files" paramter.
via 5023dbc04bf s3: smbd: Fix logic in can_delete_directory_fsp() to cope with dangling symlinks.
via 4793c4d5307 s3: smbd: Fix logic in rmdir_internals() to cope with dangling symlinks.
via e00fe095e8c s3: smbd: Fix rmdir_internals() to do an early return if lp_delete_veto_files() is not set.
via 0dba0917fd9 s3: VFS: xattr_tdb. Allow unlinkat to cope with dangling symlinks.
via 7a4173809a8 s3: VFS: streams_depot. Allow unlinkat to cope with dangling symlinks.
via 359517877d6 s3: smbd: Add two tests showing the ability to delete a directory containing a dangling symlink over SMB2 depends on "delete veto files" setting.
via 9f76641627f s3: smbd: Fix recursive directory delete of a directory containing veto file and msdfs links.
via dab3fa1d8c2 s3: smbd: Add two tests showing recursive directory delete of a directory containing veto file and msdfs links over SMB2.
via 71792ae9886 bootstrap: Debian 11 has liburing-dev
via 6ea70022f20 bootstrap: Add Debian 11
via 651d79f109b lib:cmdline: Fix -k option which doesn't expect anything
via d700a676cad testprogs: Use new cmdline option for kerberos
via c99eecaf2fb lib: handle NTTIME_THAW in nt_time_to_full_timespec()
via 204f1488e2c torture: add a test for NTTIME_FREEZE and NTTIME_THAW
via 6e42b2a1670 lib: add a test for null_nttime(NTTIME_THAW)
via bfb893f5efc lib: update null_nttime() of -1: -1 is NTTIME_FREEZE
via 0b7c1089d12 lib: use NTTIME_FREEZE in a null_nttime() test
via 60adfb19d9d lib: fix null_nttime() tests
via 0acbd644fcd lib: add NTTIME_THAW
from bdc33fa61f8 VERSION: Bump version up to Samba 4.15.3...
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-15-test
- Log -----------------------------------------------------------------
commit 962b7b0f92d37867296b8e30c5ae659e9544a16f
Author: Günther Deschner <gd at samba.org>
Date: Thu Nov 4 22:22:44 2021 +0100
s3-winexe: Fix winexe core dump (use-after-free)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14893
Guenther
Signed-off-by: Guenther Deschner <gd at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Günther Deschner <gd at samba.org>
Autobuild-Date(master): Fri Nov 5 11:43:57 UTC 2021 on sn-devel-184
(cherry picked from commit e9495d2ed28a26899dc3dd77bdfe56e284980218)
Autobuild-User(v4-15-test): Jule Anger <janger at samba.org>
Autobuild-Date(v4-15-test): Wed Nov 10 17:05:18 UTC 2021 on sn-devel-184
commit f926586544e8c92b58ccba133992f75f8c33c5a1
Author: Ralph Boehme <slow at samba.org>
Date: Tue Nov 2 05:34:59 2021 +0100
vfs_fruit: remove a fsp check from ad_fset()
This comes from times before we had pathref fsps. Back then if you wanted to
check if fsp->fh->fd contained a valid value != -1, you'd also first check that
the passed in fsp and fsp->fh are non NULL. With pathref fsps we don't need this
anymore.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14890
RN: Crash in vfs_fruit asking for fsp_get_io_fd() for an XATTR call
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 50c550e1ad422a1220d0862a3f637e5fb774f288)
commit 3a34628266f8df1513092ec8bdf0c391b6afc7c4
Author: Ralph Boehme <slow at samba.org>
Date: Fri Oct 29 22:03:42 2021 +0200
lib/dbwrap: reset deleted record to tdb_null
This allows the calling the following sequence of dbwrap functions:
dbwrap_delete_record(rec);
data = dbwrap_record_get_value(rec);
without triggering the assert rec->value_valid inside dbwrap_record_get_value().
Note that dbwrap_record_storev() continues to invalidate the record, so this
change somewhat blurs our semantics.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14882
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Thu Nov 4 19:49:47 UTC 2021 on sn-devel-184
(cherry picked from commit 8082e2eb7e33c0993135791c03823886f5aa8496)
commit 8bb5f0911a8504bb8e4c89282c43d651b690fa78
Author: Ralph Boehme <slow at samba.org>
Date: Fri Oct 29 06:27:38 2021 +0200
CI: add a test for bug 14882
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14882
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 1fa006f1f71cce03d92e76efda3ff055aae4eb91)
commit a16283466ba0985441e7bc084e8477f47e8d2e60
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Oct 5 08:52:32 2020 +0200
s3/libsmb: check for global parametric option "libsmb:client_guid"
Useful in test.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14882
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit c1470b120bb75ea73ba90dc83ab7efcbb733b1a7)
commit a549dc219cba5bd61969e4919ae4142f52c133ea
Author: Jeremy Allison <jra at samba.org>
Date: Mon Oct 25 12:42:02 2021 -0700
s3: docs-xml: Clarify the "delete veto files" paramter.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Fri Oct 29 14:57:14 UTC 2021 on sn-devel-184
(cherry picked from commit 0b818c6b77e972626d0b071bebcf4ce55619fb84)
commit 5023dbc04bfad7cc39e8c4de96f40c82e7a0288e
Author: Jeremy Allison <jra at samba.org>
Date: Mon Oct 25 12:36:57 2021 -0700
s3: smbd: Fix logic in can_delete_directory_fsp() to cope with dangling symlinks.
Remove knownfail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit e9ef970eee5eca8ab3720279c54098e91d2dfda9)
commit 4793c4d5307472f0eb72f70f7dbf7324744e3f91
Author: Jeremy Allison <jra at samba.org>
Date: Mon Oct 25 12:32:29 2021 -0700
s3: smbd: Fix logic in rmdir_internals() to cope with dangling symlinks.
Still need to add the same logic in can_delete_directory_fsp()
before we can delete the knownfail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 26fecad2e66e91a3913d88ee2e0889f266e91d89)
commit e00fe095e8cf7ab54bc82870b913762d2fdddbad
Author: Jeremy Allison <jra at samba.org>
Date: Mon Oct 25 12:21:37 2021 -0700
s3: smbd: Fix rmdir_internals() to do an early return if lp_delete_veto_files() is not set.
Fix the comments to match what the code actually does. The
exit at the end of the scan directory loop if we find a client
visible filename is a change in behavior, but the previous
behavior (not exist on visible filename, but delete it) was
a bug and in non-tested code. Now it's testd.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit a37d16e7c55f85e3f2c9c8614755ea6307092d5f)
commit 0dba0917fd97e975d1daab5b0828644d026c2bc5
Author: Jeremy Allison <jra at samba.org>
Date: Mon Oct 25 12:02:43 2021 -0700
s3: VFS: xattr_tdb. Allow unlinkat to cope with dangling symlinks.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit f254be19d6501a4f573843af97963e350a9ee2ed)
commit 7a4173809a87350bc3580240232978042ec2ceca
Author: Jeremy Allison <jra at samba.org>
Date: Mon Oct 25 12:01:58 2021 -0700
s3: VFS: streams_depot. Allow unlinkat to cope with dangling symlinks.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 295d7d026babe3cd5123d0f53adcb16868907f05)
commit 359517877d6462ff4398401748f921c8b79357a6
Author: Jeremy Allison <jra at samba.org>
Date: Thu Oct 21 16:37:27 2021 -0700
s3: smbd: Add two tests showing the ability to delete a directory containing a dangling symlink over SMB2 depends on "delete veto files" setting.
Add knownfail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 942123b95923f35a32df4196a072a3ed3468396a)
commit 9f76641627ffb0b7fe07e2a071b958a96ec87226
Author: Jeremy Allison <jra at samba.org>
Date: Thu Oct 21 16:18:24 2021 -0700
s3: smbd: Fix recursive directory delete of a directory containing veto file and msdfs links.
Remove knownfail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14878
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 73de1194c3c429ab93d722a852aa4f54213b112a)
commit dab3fa1d8c27e696afa15e071331f646e06d9706
Author: Jeremy Allison <jra at samba.org>
Date: Thu Oct 21 15:06:20 2021 -0700
s3: smbd: Add two tests showing recursive directory delete of a directory containing veto file and msdfs links over SMB2.
Add knownfail.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14878
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit ad0082d79a681b981154747dcde5713e1933b88f)
commit 71792ae9886c5605e4207337b12f032e33ee9bc5
Author: Martin Schwenke <martin at meltin.net>
Date: Tue Oct 19 11:00:22 2021 +1100
bootstrap: Debian 11 has liburing-dev
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14872
RN: Add Debian 11 CI bootstrap support
Signed-off-by: Martin Schwenke <martin at meltin.net>
(backported from commit d8b6fbbd78690ae19d97cd88c5769c3edd358aaa)
commit 6ea70022f20b6c03b58cacf628bba1cebedbcf9f
Author: Martin Schwenke <martin at meltin.net>
Date: Thu Oct 14 14:50:41 2021 +1100
bootstrap: Add Debian 11
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14872
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Mon Oct 18 17:19:17 UTC 2021 on sn-devel-184
(backported from commit c901adaa0d4526deff550806e49976d686122674)
commit 651d79f109bb7774962f0e0db0b8206e2e0a93e5
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Wed Oct 27 13:45:15 2021 +0200
lib:cmdline: Fix -k option which doesn't expect anything
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14846
RN: Fix -k legacy option for client tools like smbclient, rpcclient, net, etc.
Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 16d43ccfddf0e67a0ae87e3f13b3114c858d64ac)
commit d700a676cad09e23d55aac294b47cd5d227b8664
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Wed Oct 27 15:30:20 2021 +0200
testprogs: Use new cmdline option for kerberos
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14846
Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 5c6640470aa845780fbf17961e67b0d9302c2fbc)
commit c99eecaf2fb0390fd071c5636cf3bc64ae287b8d
Author: Ralph Boehme <slow at samba.org>
Date: Tue Oct 5 15:10:33 2021 +0200
lib: handle NTTIME_THAW in nt_time_to_full_timespec()
Preliminary handling of NTTIME_THAW to avoid NTTIME_THAW is passed as some
mangled value down to the VFS set timestamps function.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
RN: Avoid storing NTTIME_THAW (-2) as value on disk
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 6ed71ad7e6aa98a34cfde95d7d62c46694d58469)
commit 204f1488e2c2314195d4988e625629058fe26978
Author: Ralph Boehme <slow at samba.org>
Date: Thu Oct 28 12:55:39 2021 +0200
torture: add a test for NTTIME_FREEZE and NTTIME_THAW
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 0659069f8292996be475d407b53d161aa3f35554)
commit 6e42b2a1670c83e1e6dcb695841be1699db21278
Author: Ralph Boehme <slow at samba.org>
Date: Thu Oct 28 10:18:54 2021 +0200
lib: add a test for null_nttime(NTTIME_THAW)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 194faa76161a12ae1eae2b471d6f159d97ef75a8)
commit bfb893f5efcf9db1803e8cbc2c87f3b2606f6399
Author: Ralph Boehme <slow at samba.org>
Date: Thu Oct 28 10:18:17 2021 +0200
lib: update null_nttime() of -1: -1 is NTTIME_FREEZE
NTTIME_FREEZE is not a nil sentinel value, instead it implies special, yet
unimplemented semantics. Callers must deal with those values specifically and
null_nttime() must not lie about their nature.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 5503bde93bddf3634b183e665773399c110251d4)
commit 0b7c1089d1200fa2de6f2565548e8cc795d6685d
Author: Ralph Boehme <slow at samba.org>
Date: Thu Oct 28 10:17:01 2021 +0200
lib: use NTTIME_FREEZE in a null_nttime() test
No change in behaviour.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit e2740e4868f2a49877a86a8666d26226b5657317)
commit 60adfb19d9d13df0a4127214f0a80d219d85d5f1
Author: Ralph Boehme <slow at samba.org>
Date: Wed Oct 27 17:02:48 2021 +0200
lib: fix null_nttime() tests
The test was checking -1 twice:
torture_assert(tctx, null_nttime(-1), "-1");
torture_assert(tctx, null_nttime(-1), "-1");
The first line was likely supposed to test the value "0".
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit d84779302cc54a7b84c05ccc458e04b27fd142f4)
commit 0acbd644fcd2ea48ff674f8ad031069c50706a5e
Author: Ralph Boehme <slow at samba.org>
Date: Tue Oct 5 15:10:10 2021 +0200
lib: add NTTIME_THAW
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14127
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit f73aff502cadabb7fe6b94a697f0a2256d1d4aca)
-----------------------------------------------------------------------
Summary of changes:
.gitlab-ci-main.yml | 8 +-
bootstrap/.gitlab-ci.yml | 3 +
bootstrap/config.py | 7 +
bootstrap/generated-dists/Vagrantfile | 7 +
.../{centos7 => debian11}/Dockerfile | 2 +-
.../{debian10 => debian11}/bootstrap.sh | 1 +
.../{centos7 => debian11}/locale.sh | 0
.../{debian10 => debian11}/packages.yml | 1 +
bootstrap/sha1sum.txt | 2 +-
docs-xml/smbdotconf/filename/deletevetofiles.xml | 9 +-
examples/winexe/winexe.c | 16 +-
lib/cmdline/cmdline.c | 2 +-
lib/dbwrap/dbwrap.c | 9 +-
lib/util/tests/time.c | 5 +-
lib/util/time.c | 8 +-
lib/util/time.h | 1 +
selftest/target/Samba3.pm | 20 ++
source3/lib/adouble.c | 7 -
source3/libsmb/clientgen.c | 9 +-
source3/modules/vfs_streams_depot.c | 10 +
source3/modules/vfs_xattr_tdb.c | 10 +
.../tests/test_delete_veto_files_only_rmdir.sh | 183 +++++++++++++++++
.../script/tests/test_smbXsrv_client_dead_rec.sh | 76 ++++++++
source3/script/tests/test_veto_rmdir.sh | 217 +++++++++++++++++++++
source3/selftest/tests.py | 13 ++
source3/smbd/close.c | 94 +++++++--
source3/smbd/dir.c | 55 +++++-
source4/torture/smb2/timestamps.c | 208 ++++++++++++++++++++
testprogs/blackbox/test_kpasswd_heimdal.sh | 6 +-
testprogs/blackbox/test_kpasswd_mit.sh | 2 +-
30 files changed, 930 insertions(+), 61 deletions(-)
copy bootstrap/generated-dists/{centos7 => debian11}/Dockerfile (92%)
copy bootstrap/generated-dists/{debian10 => debian11}/bootstrap.sh (98%)
copy bootstrap/generated-dists/{centos7 => debian11}/locale.sh (100%)
copy bootstrap/generated-dists/{debian10 => debian11}/packages.yml (97%)
create mode 100755 source3/script/tests/test_delete_veto_files_only_rmdir.sh
create mode 100755 source3/script/tests/test_smbXsrv_client_dead_rec.sh
create mode 100755 source3/script/tests/test_veto_rmdir.sh
Changeset truncated at 500 lines:
diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index 0cbcc17c94c..125b3901832 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -42,7 +42,7 @@ variables:
# Set this to the contents of bootstrap/sha1sum.txt
# which is generated by bootstrap/template.py --render
#
- SAMBA_CI_CONTAINER_TAG: 733f8fa83c921e5a7ec8f5470b2ca7d52548f4b0
+ SAMBA_CI_CONTAINER_TAG: dd2b9a1848eed2d200e1a525695e40f06c23d888
#
# We use the ubuntu1804 image as default as
# it matches what we have on sn-devel-184.
@@ -58,6 +58,7 @@ variables:
SAMBA_CI_CONTAINER_IMAGE_ubuntu2004: ubuntu2004
SAMBA_CI_CONTAINER_IMAGE_debian9: debian9
SAMBA_CI_CONTAINER_IMAGE_debian10: debian10
+ SAMBA_CI_CONTAINER_IMAGE_debian11: debian11
SAMBA_CI_CONTAINER_IMAGE_opensuse151: opensuse151
SAMBA_CI_CONTAINER_IMAGE_opensuse152: opensuse152
SAMBA_CI_CONTAINER_IMAGE_fedora33: fedora33
@@ -569,6 +570,11 @@ debian10-samba-o3:
variables:
SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian10}
+debian11-samba-o3:
+ extends: .samba-o3-template
+ variables:
+ SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11}
+
opensuse151-samba-o3:
extends: .samba-o3-template
variables:
diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml
index 5e5856b1e90..33534f5f1dd 100644
--- a/bootstrap/.gitlab-ci.yml
+++ b/bootstrap/.gitlab-ci.yml
@@ -103,6 +103,9 @@ ubuntu2004:
debian10:
extends: .build_image_template
+debian11:
+ extends: .build_image_template
+
fedora33:
extends: .build_image_template
diff --git a/bootstrap/config.py b/bootstrap/config.py
index ba4304bb9f8..fd75a771252 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -399,6 +399,13 @@ DEB_DISTS = {
'liburing-dev': '', # not available
}
},
+ 'debian11': {
+ 'docker_image': 'debian:11',
+ 'vagrant_box': 'debian/bullseye64',
+ 'replace': {
+ 'language-pack-en': '', # included in locales
+ }
+ },
'ubuntu1604': {
'docker_image': 'ubuntu:16.04',
'vagrant_box': 'ubuntu/xenial64',
diff --git a/bootstrap/generated-dists/Vagrantfile b/bootstrap/generated-dists/Vagrantfile
index 42da0161e40..780320ec7c8 100644
--- a/bootstrap/generated-dists/Vagrantfile
+++ b/bootstrap/generated-dists/Vagrantfile
@@ -31,6 +31,13 @@ Vagrant.configure("2") do |config|
v.vm.provision :shell, path: "debian10/locale.sh"
end
+ config.vm.define "debian11" do |v|
+ v.vm.box = "debian/bullseye64"
+ v.vm.hostname = "debian11"
+ v.vm.provision :shell, path: "debian11/bootstrap.sh"
+ v.vm.provision :shell, path: "debian11/locale.sh"
+ end
+
config.vm.define "fedora33" do |v|
v.vm.box = "fedora/33-cloud-base"
v.vm.hostname = "fedora33"
diff --git a/bootstrap/generated-dists/centos7/Dockerfile b/bootstrap/generated-dists/debian11/Dockerfile
similarity index 92%
copy from bootstrap/generated-dists/centos7/Dockerfile
copy to bootstrap/generated-dists/debian11/Dockerfile
index 2f171ad1c62..6a16324f201 100644
--- a/bootstrap/generated-dists/centos7/Dockerfile
+++ b/bootstrap/generated-dists/debian11/Dockerfile
@@ -3,7 +3,7 @@
# See also bootstrap/config.py
#
-FROM centos:7
+FROM debian:11
# pass in with --build-arg while build
ARG SHA1SUM
diff --git a/bootstrap/generated-dists/debian10/bootstrap.sh b/bootstrap/generated-dists/debian11/bootstrap.sh
similarity index 98%
copy from bootstrap/generated-dists/debian10/bootstrap.sh
copy to bootstrap/generated-dists/debian11/bootstrap.sh
index 84f5f6855b7..07d6209c072 100755
--- a/bootstrap/generated-dists/debian10/bootstrap.sh
+++ b/bootstrap/generated-dists/debian11/bootstrap.sh
@@ -70,6 +70,7 @@ apt-get -y install \
libtasn1-dev \
libtracker-sparql-2.0-dev \
libunwind-dev \
+ liburing-dev \
lmdb-utils \
locales \
lsb-release \
diff --git a/bootstrap/generated-dists/centos7/locale.sh b/bootstrap/generated-dists/debian11/locale.sh
similarity index 100%
copy from bootstrap/generated-dists/centos7/locale.sh
copy to bootstrap/generated-dists/debian11/locale.sh
diff --git a/bootstrap/generated-dists/debian10/packages.yml b/bootstrap/generated-dists/debian11/packages.yml
similarity index 97%
copy from bootstrap/generated-dists/debian10/packages.yml
copy to bootstrap/generated-dists/debian11/packages.yml
index 32f37eeb013..6d3c2385339 100644
--- a/bootstrap/generated-dists/debian10/packages.yml
+++ b/bootstrap/generated-dists/debian11/packages.yml
@@ -59,6 +59,7 @@ packages:
- libtasn1-dev
- libtracker-sparql-2.0-dev
- libunwind-dev
+ - liburing-dev
- lmdb-utils
- locales
- lsb-release
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index e433f698b68..11369ced5f7 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-733f8fa83c921e5a7ec8f5470b2ca7d52548f4b0
+dd2b9a1848eed2d200e1a525695e40f06c23d888
diff --git a/docs-xml/smbdotconf/filename/deletevetofiles.xml b/docs-xml/smbdotconf/filename/deletevetofiles.xml
index 581dc05396d..570d4ac60a0 100644
--- a/docs-xml/smbdotconf/filename/deletevetofiles.xml
+++ b/docs-xml/smbdotconf/filename/deletevetofiles.xml
@@ -4,9 +4,12 @@
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>This option is used when Samba is attempting to
- delete a directory that contains one or more vetoed directories
- (see the <smbconfoption name="veto files"/>
- option). If this option is set to <constant>no</constant> (the default) then if a vetoed
+ delete a directory that contains one or more vetoed files
+ or directories or non-visible files or directories (such
+ as dangling symlinks that point nowhere).
+ (see the <smbconfoption name="veto files"/>, <smbconfoption name="hide special files"/>,
+ <smbconfoption name="hide unreadable"/>, <smbconfoption name="hide unwriteable files"/>
+ options). If this option is set to <constant>no</constant> (the default) then if a vetoed
directory contains any non-vetoed files or directories then the
directory delete will fail. This is usually what you want.</para>
diff --git a/examples/winexe/winexe.c b/examples/winexe/winexe.c
index 3e0813a4091..59fb9dbdebb 100644
--- a/examples/winexe/winexe.c
+++ b/examples/winexe/winexe.c
@@ -220,8 +220,6 @@ static void parse_args(int argc, const char *argv[],
*port_str = '\0';
}
- poptFreeContext(pc);
-
if (options->runas == NULL && options->runas_file != NULL) {
struct cli_credentials *runas_cred;
const char *user;
@@ -253,9 +251,19 @@ static void parse_args(int argc, const char *argv[],
options->credentials = samba_cmdline_get_creds();
- options->hostname = argv_new[0] + 2;
+ options->hostname = talloc_strdup(mem_ctx, argv_new[0] + 2);
+ if (options->hostname == NULL) {
+ DBG_ERR("Out of memory\n");
+ exit(1);
+ }
options->port = port;
- options->cmd = argv_new[1];
+ options->cmd = talloc_strdup(mem_ctx, argv_new[1]);
+ if (options->cmd == NULL) {
+ DBG_ERR("Out of memory\n");
+ exit(1);
+ }
+
+ poptFreeContext(pc);
options->flags = flag_interactive;
if (flag_reinstall) {
diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c
index 40292a6a332..63e81bc0a7f 100644
--- a/lib/cmdline/cmdline.c
+++ b/lib/cmdline/cmdline.c
@@ -1251,7 +1251,7 @@ static struct poptOption popt_legacy_s3[] = {
{
.longName = "kerberos",
.shortName = 'k',
- .argInfo = POPT_ARG_STRING,
+ .argInfo = POPT_ARG_NONE,
.val = 'k',
.descrip = "DEPRECATED: Migrate to --use-kerberos",
},
diff --git a/lib/dbwrap/dbwrap.c b/lib/dbwrap/dbwrap.c
index cc685a2fa69..7555efaa3ab 100644
--- a/lib/dbwrap/dbwrap.c
+++ b/lib/dbwrap/dbwrap.c
@@ -110,16 +110,13 @@ NTSTATUS dbwrap_record_delete(struct db_record *rec)
{
NTSTATUS status;
- /*
- * Invalidate before rec->delete_rec() is called, give
- * rec->delete_rec() the chance to re-validate rec->value.
- */
- rec->value_valid = false;
-
status = rec->delete_rec(rec);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
+
+ rec->value = tdb_null;
+
return NT_STATUS_OK;
}
diff --git a/lib/util/tests/time.c b/lib/util/tests/time.c
index 039f7f4ccf8..ec27f567a71 100644
--- a/lib/util/tests/time.c
+++ b/lib/util/tests/time.c
@@ -34,8 +34,9 @@ static bool test_null_time(struct torture_context *tctx)
static bool test_null_nttime(struct torture_context *tctx)
{
- torture_assert(tctx, null_nttime(-1), "-1");
- torture_assert(tctx, null_nttime(-1), "-1");
+ torture_assert(tctx, null_nttime(0), "0");
+ torture_assert(tctx, !null_nttime(NTTIME_FREEZE), "-1");
+ torture_assert(tctx, !null_nttime(NTTIME_THAW), "-2");
torture_assert(tctx, !null_nttime(42), "42");
return true;
}
diff --git a/lib/util/time.c b/lib/util/time.c
index 53bf194fe0b..cec91c14791 100644
--- a/lib/util/time.c
+++ b/lib/util/time.c
@@ -178,7 +178,7 @@ check if it's a null NTTIME
**/
_PUBLIC_ bool null_nttime(NTTIME t)
{
- return t == 0 || t == (NTTIME)-1;
+ return t == 0;
}
/*******************************************************************
@@ -1128,10 +1128,10 @@ struct timespec nt_time_to_full_timespec(NTTIME nt)
if (nt == NTTIME_OMIT) {
return make_omit_timespec();
}
- if (nt == NTTIME_FREEZE) {
+ if (nt == NTTIME_FREEZE || nt == NTTIME_THAW) {
/*
- * This should be returned as SAMBA_UTIME_FREEZE in the
- * future.
+ * This should be returned as SAMBA_UTIME_FREEZE or
+ * SAMBA_UTIME_THAW in the future.
*/
return make_omit_timespec();
}
diff --git a/lib/util/time.h b/lib/util/time.h
index 6726f39c7cc..72347b39b99 100644
--- a/lib/util/time.h
+++ b/lib/util/time.h
@@ -63,6 +63,7 @@
* implement this yet.
*/
#define NTTIME_FREEZE UINT64_MAX
+#define NTTIME_THAW (UINT64_MAX - 1)
#define SAMBA_UTIME_NOW UTIME_NOW
#define SAMBA_UTIME_OMIT UTIME_OMIT
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 6fd8ab77650..c0ed379bf3f 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1675,6 +1675,9 @@ sub setup_fileserver
my $bad_iconv_sharedir="$share_dir/bad_iconv";
push(@dirs, $bad_iconv_sharedir);
+ my $veto_sharedir="$share_dir/veto";
+ push(@dirs,$veto_sharedir);
+
my $ip4 = Samba::get_ipv4_addr("FILESERVER");
my $fileserver_options = "
kernel change notify = yes
@@ -1783,6 +1786,23 @@ sub setup_fileserver
comment = smb username is [%U]
vfs objects =
+[veto_files_nodelete]
+ path = $veto_sharedir
+ read only = no
+ msdfs root = yes
+ veto files = /veto_name*/
+ delete veto files = no
+
+[veto_files_delete]
+ path = $veto_sharedir
+ msdfs root = yes
+ veto files = /veto_name*/
+ delete veto files = yes
+
+[delete_veto_files_only]
+ path = $veto_sharedir
+ delete veto files = yes
+
[homes]
comment = Home directories
browseable = No
diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c
index fd435b6592d..f809a445081 100644
--- a/source3/lib/adouble.c
+++ b/source3/lib/adouble.c
@@ -2591,13 +2591,6 @@ int ad_fset(struct vfs_handle_struct *handle,
DBG_DEBUG("Path [%s]\n", fsp_str_dbg(fsp));
- if ((fsp == NULL)
- || (fsp->fh == NULL)
- || (fsp_get_io_fd(fsp) == -1))
- {
- smb_panic("bad fsp");
- }
-
ok = ad_pack(handle, ad, fsp);
if (!ok) {
return -1;
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index b9b2bacaa76..6819e532349 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -79,7 +79,14 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
if (!GUID_all_zero(&cli_state_client_guid)) {
client_guid = cli_state_client_guid;
} else {
- client_guid = GUID_random();
+ const char *str = NULL;
+
+ str = lp_parm_const_string(-1, "libsmb", "client_guid", NULL);
+ if (str != NULL) {
+ GUID_from_string(str, &client_guid);
+ } else {
+ client_guid = GUID_random();
+ }
}
/* Check the effective uid - make sure we are not setuid */
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index 973edeeda24..ae73ba965a5 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -823,6 +823,16 @@ static int streams_depot_unlink_internal(vfs_handle_struct *handle,
ret = SMB_VFS_NEXT_LSTAT(handle, full_fname);
} else {
ret = SMB_VFS_NEXT_STAT(handle, full_fname);
+ if (ret == -1 && (errno == ENOENT || errno == ELOOP)) {
+ if (VALID_STAT(smb_fname->st) &&
+ S_ISLNK(smb_fname->st.st_ex_mode)) {
+ /*
+ * Original name was a link - Could be
+ * trying to remove a dangling symlink.
+ */
+ ret = SMB_VFS_NEXT_LSTAT(handle, full_fname);
+ }
+ }
}
if (ret == -1) {
TALLOC_FREE(full_fname);
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index daa99b2cc3e..42c570b54b3 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -520,6 +520,16 @@ static int xattr_tdb_unlinkat(vfs_handle_struct *handle,
ret = SMB_VFS_NEXT_LSTAT(handle, full_fname);
} else {
ret = SMB_VFS_NEXT_STAT(handle, full_fname);
+ if (ret == -1 && (errno == ENOENT || errno == ELOOP)) {
+ if (VALID_STAT(smb_fname->st) &&
+ S_ISLNK(smb_fname->st.st_ex_mode)) {
+ /*
+ * Original name was a link - Could be
+ * trying to remove a dangling symlink.
+ */
+ ret = SMB_VFS_NEXT_LSTAT(handle, full_fname);
+ }
+ }
}
if (ret == -1) {
goto out;
diff --git a/source3/script/tests/test_delete_veto_files_only_rmdir.sh b/source3/script/tests/test_delete_veto_files_only_rmdir.sh
new file mode 100755
index 00000000000..d2c3b2198f7
--- /dev/null
+++ b/source3/script/tests/test_delete_veto_files_only_rmdir.sh
@@ -0,0 +1,183 @@
+#!/bin/sh
+#
+# Check smbclient can (or cannot) delete a directory containing dangling symlinks.
+# BUG: https://bugzilla.samba.org/show_bug.cgi?id=14879
+#
+
+if [ $# -lt 6 ]; then
+cat <<EOF
+Usage: $0 SERVER SERVER_IP USERNAME PASSWORD SHAREPATH SMBCLIENT
+EOF
+exit 1;
+fi
+
+SERVER=${1}
+SERVER_IP=${2}
+USERNAME=${3}
+PASSWORD=${4}
+SHAREPATH=${5}
+SMBCLIENT=${6}
+shift 6
+SMBCLIENT="$VALGRIND ${SMBCLIENT}"
+ADDARGS="$@"
+
+incdir=$(dirname "$0")/../../../testprogs/blackbox
+. $incdir/subunit.sh
+
+failed=0
+
+rmdir_path="$SHAREPATH/dir"
+
+#
+# Using the share "[delete_veto_files_only]" we CAN delete
+# a directory containing only a dangling symlink.
+#
+test_dangle_symlink_delete_veto_rmdir()
+{
+ local dangle_symlink_path="$rmdir_path/bad_link"
+ local tmpfile=$PREFIX/smbclient.in.$$
+
+ # Create rmdir directory.
+ mkdir -p "$rmdir_path"
+ # Create dangling symlink underneath.
+ ln -s "nowhere-foo" "$dangle_symlink_path"
+
+ cat > "$tmpfile" <<EOF
+cd dir
+ls
+quit
+EOF
+
+ local cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT //$SERVER/delete_veto_files_only -U$USERNAME%$PASSWORD $ADDARGS < $tmpfile 2>&1'
+ eval echo "$cmd"
+ out=$(eval "$cmd")
+ ret=$?
+
+ # Check for smbclient error.
+ if [ $ret != 0 ] ; then
+ echo "Failed accessing share delete_veto_files_only - $ret"
+ echo "$out"
+ return 1
+ fi
+
+ # We should NOT see the dangling symlink file.
+ echo "$out" | grep bad_link
+ ret=$?
+ if [ $ret -eq 0 ] ; then
+ echo "Saw dangling symlink bad_link in share delete_veto_files_only"
+ echo "$out"
+ return 1
+ fi
+
+ # Try and remove the directory, should succeed.
+ cat > "$tmpfile" <<EOF
+rd dir
+quit
+EOF
+
+ local cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT //$SERVER/delete_veto_files_only -U$USERNAME%$PASSWORD $ADDARGS < $tmpfile 2>&1'
+ eval echo "$cmd"
+ out=$(eval "$cmd")
+ ret=$?
+
+ # Check for smbclient error.
+ if [ $ret != 0 ] ; then
+ echo "Failed accessing share delete_veto_files_only - $ret"
+ echo "$out"
+ return 1
+ fi
+
--
Samba Shared Repository
More information about the samba-cvs
mailing list