[SCM] Samba Shared Repository - branch v4-21-test updated
Jule Anger
janger at samba.org
Thu Apr 17 15:01:01 UTC 2025
The branch, v4-21-test has been updated
via 1da707f1093 vfs: Fix "wide links = yes"
from 2216a439605 python:gp_cert_auto_enrol: fix GUID stringification
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-21-test
- Log -----------------------------------------------------------------
commit 1da707f1093abdcd0ee63c976a03fa4fff1f6423
Author: Volker Lendecke <vl at samba.org>
Date: Thu Apr 3 10:04:42 2025 +0200
vfs: Fix "wide links = yes"
vfs_wide_links hides symlinks from the rest of smbd, and it implicitly
follows symlinks. Also, O_PATH will expose symlinks to the rest of
smbd, remove that.
We also need to do this for posix paths, as deep inside
rename_internals we want to avoid case-insensitive lookups by setting
SMB_FILENAME_POSIX_PATH.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15841
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Apr 16 20:56:33 UTC 2025 on atb-devel-224
(cherry picked from commit 9e637a28bd0b5adc2d90df9ca4a1c864a648b0f4)
Autobuild-User(v4-21-test): Jule Anger <janger at samba.org>
Autobuild-Date(v4-21-test): Thu Apr 17 15:00:12 UTC 2025 on atb-devel-224
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_widelinks.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_widelinks.c b/source3/modules/vfs_widelinks.c
index 4339f6de9e0..df00d72707d 100644
--- a/source3/modules/vfs_widelinks.c
+++ b/source3/modules/vfs_widelinks.c
@@ -354,15 +354,17 @@ static int widelinks_openat(vfs_handle_struct *handle,
struct widelinks_config,
return -1);
- if (config->active &&
- (config->cwd != NULL) &&
- !(smb_fname->flags & SMB_FILENAME_POSIX_PATH))
- {
+ if (config->active && (config->cwd != NULL)) {
/*
* Module active, openat after chdir (see note 1b above) and not
* a POSIX open (POSIX sees symlinks), so remove O_NOFOLLOW.
*/
how.flags = (how.flags & ~O_NOFOLLOW);
+#ifdef O_PATH
+ how.flags = (how.flags & ~O_PATH);
+#endif
+ how.resolve = (how.resolve &
+ ~(VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS));
}
ret = SMB_VFS_NEXT_OPENAT(handle,
--
Samba Shared Repository
More information about the samba-cvs
mailing list