mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
s3: smbd: Tweak openat_pathref_dirfsp_nosymlink() to NULL out fsp->fsp_name after calling fd_close() on intermediate directories, rather than before.
vfs_virusfilter expects a non-NULL fsp->fsp_name to use for printing debugs (it always indirects fsp->fsp_name). vfs_fruit also does the same, so would also crash in fruit_close() with 'debug level = 10' and vfs_default:VFS_OPEN_HOW_RESOLVE_NO_SYMLINKS = no set (we don't test with that which is why we haven't noticed this before). Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15283 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Jan 13 08:33:47 UTC 2023 on sn-devel-184
This commit is contained in:
parent
c844bff3ec
commit
3d3d01cda8
@ -1 +0,0 @@
|
|||||||
^samba3.blackbox.virus_scanner.check_infected_read\(fileserver:local\)
|
|
@ -1058,9 +1058,9 @@ next:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dirfsp != conn->cwd_fsp) {
|
if (dirfsp != conn->cwd_fsp) {
|
||||||
dirfsp->fsp_name = NULL;
|
|
||||||
SMB_ASSERT(fsp_get_pathref_fd(dirfsp) != -1);
|
SMB_ASSERT(fsp_get_pathref_fd(dirfsp) != -1);
|
||||||
fd_close(dirfsp);
|
fd_close(dirfsp);
|
||||||
|
dirfsp->fsp_name = NULL;
|
||||||
file_free(NULL, dirfsp);
|
file_free(NULL, dirfsp);
|
||||||
dirfsp = NULL;
|
dirfsp = NULL;
|
||||||
}
|
}
|
||||||
@ -1122,9 +1122,9 @@ fail:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((dirfsp != NULL) && (dirfsp != conn->cwd_fsp)) {
|
if ((dirfsp != NULL) && (dirfsp != conn->cwd_fsp)) {
|
||||||
dirfsp->fsp_name = NULL;
|
|
||||||
SMB_ASSERT(fsp_get_pathref_fd(dirfsp) != -1);
|
SMB_ASSERT(fsp_get_pathref_fd(dirfsp) != -1);
|
||||||
fd_close(dirfsp);
|
fd_close(dirfsp);
|
||||||
|
dirfsp->fsp_name = NULL;
|
||||||
file_free(NULL, dirfsp);
|
file_free(NULL, dirfsp);
|
||||||
dirfsp = NULL;
|
dirfsp = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user