1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

smbd: Don't hide directories with "hide new files timeout"

The intention of this option was to hide *files*. Before this patch we
also hide directories where new files are dropped.

This is a change in behaviour, but I think this option is niche enough
to justify not adding another parameter that we then need to test. If
workflows break with this change and people depend on directories also
to be hidden, we can still add the additional option value required.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov  7 22:58:33 UTC 2022 on sn-devel-184
This commit is contained in:
Volker Lendecke 2022-11-07 15:08:51 +01:00 committed by Jeremy Allison
parent e8848a3eab
commit be1431a893
2 changed files with 4 additions and 3 deletions

View File

@ -1 +0,0 @@
^samba3.smbtorture_s3.hidenewfiles_showdirs

View File

@ -1404,7 +1404,8 @@ bool is_visible_fsp(struct files_struct *fsp)
* only thing we can check is the
* hide_new_files_timeout.
*/
if (hide_new_files_timeout != 0) {
if ((hide_new_files_timeout != 0) &&
!S_ISDIR(fsp->fsp_name->st.st_ex_mode)) {
double age = timespec_elapsed(
&fsp->fsp_name->st.st_ex_mtime);
@ -1443,7 +1444,8 @@ bool is_visible_fsp(struct files_struct *fsp)
return false;
}
if (hide_new_files_timeout != 0) {
if ((hide_new_files_timeout != 0) &&
!S_ISDIR(fsp->fsp_name->st.st_ex_mode)) {
double age = timespec_elapsed(
&fsp->fsp_name->st.st_ex_mtime);