Origin: upstream, https://bugzilla.samba.org/show_bug.cgi?id=15841
Forwarded: yes, https://bugzilla.samba.org/show_bug.cgi?id=15841
Bug-Debian: https://bugs.debian.org/
1101581
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15841
source3/modules/vfs_widelinks.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Gbp-Pq: Name widelinks-nofollow.patch
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);
+ how.flags = (how.flags & ~(O_NOFOLLOW | O_PATH));
+ how.resolve = (how.resolve &
+ ~(VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS));
}
ret = SMB_VFS_NEXT_OPENAT(handle,