[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Wed Apr 16 20:57:01 UTC 2025
The branch, master has been updated
via 9e637a28bd0 vfs: Fix "wide links = yes"
from 9dc165e80fb lib:cmdline: POPT_CALLBACK_REASON_POST should handle if we skip the password callback
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 9e637a28bd0b5adc2d90df9ca4a1c864a648b0f4
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
-----------------------------------------------------------------------
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