]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: We can expect the file to exist in is_visible_fsp()
authorVolker Lendecke <vl@samba.org>
Thu, 19 Sep 2024 14:09:43 +0000 (16:09 +0200)
committerMartin Schwenke <martins@samba.org>
Sun, 22 Sep 2024 09:36:35 +0000 (09:36 +0000)
Another leftover from symlinks in posix context to not open an fsp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dir.c

index 147515fe2f5c1be3e9ac162aef095eed03393d01..406db604f8e7f7edbad9a487589e153694e64012 100644 (file)
@@ -921,15 +921,6 @@ bool is_visible_fsp(struct files_struct *fsp)
        int hide_new_files_timeout = 0;
        const char *last_component = NULL;
 
-       /*
-        * If the file does not exist, there's no point checking
-        * the configuration options. We succeed, on the basis that the
-        * checks *might* have passed if the file was present.
-        */
-       if (fsp == NULL) {
-               return true;
-       }
-
        hide_unreadable = lp_hide_unreadable(SNUM(fsp->conn));
        hide_unwriteable = lp_hide_unwriteable_files(SNUM(fsp->conn));
        hide_special = lp_hide_special_files(SNUM(fsp->conn));