mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s3/smbd: fix nested chdir into msdfs links on (widelinks = yes) share
This patch also removes known fail for existing test BUG: https://bugzilla.samba.org/show_bug.cgi?id=15435 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jun 11 19:31:40 UTC 2024 on atb-devel-224
This commit is contained in:
parent
7f1de90f72
commit
788ef8f07c
@ -1,2 +0,0 @@
|
||||
^samba.tests.blackbox.misc_dfs_widelink.samba.tests.blackbox.misc_dfs_widelink.DfsWidelinkBlockboxTestBase.test_nested_chdir\(fileserver\)
|
||||
^samba.tests.blackbox.misc_dfs_widelink.samba.tests.blackbox.misc_dfs_widelink.DfsWidelinkBlockboxTestBase.test_ci_chdir\(fileserver\)
|
@ -1307,6 +1307,24 @@ next:
|
||||
}
|
||||
|
||||
if (fd == -1) {
|
||||
/*
|
||||
* vfs_widelink widelink_openat will update stat for fsp
|
||||
* and return ELOOP for non-existing link, we can report
|
||||
* the link here and let calling code decide what to do.
|
||||
*/
|
||||
if ((errno == ELOOP) && S_ISLNK(fsp->fsp_name->st.st_ex_mode)) {
|
||||
status = read_symlink_reparse(mem_ctx,
|
||||
dirfsp,
|
||||
&rel_fname,
|
||||
&symlink_err);
|
||||
if (NT_STATUS_IS_OK(status)) {
|
||||
status = NT_STATUS_STOPPED_ON_SYMLINK;
|
||||
} else {
|
||||
DBG_ERR("read_symlink_reparse failed: %s\n",
|
||||
nt_errstr(status));
|
||||
}
|
||||
goto fail;
|
||||
}
|
||||
status = map_nt_error_from_unix(errno);
|
||||
DBG_DEBUG("SMB_VFS_OPENAT() failed: %s\n",
|
||||
strerror(errno));
|
||||
|
Loading…
Reference in New Issue
Block a user