]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Now all callers of is_visible_fsp() pass 'false' for the use_veto parameter...
authorJeremy Allison <jra@samba.org>
Fri, 4 Jun 2021 20:32:40 +0000 (13:32 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/close.c
source3/smbd/dir.c
source3/smbd/proto.h
source3/smbd/reply.c

index 439308294af586613f6e05d149dabb43ae19e49b..191626557dc22db8c4a19b984bc3a9006b90e547 100644 (file)
@@ -922,7 +922,7 @@ bool recursive_rmdir(TALLOC_CTX *ctx,
                        goto err_break;
                }
 
-               if (!is_visible_fsp(atname->fsp, false)) {
+               if (!is_visible_fsp(atname->fsp)) {
                        TALLOC_FREE(smb_dname_full);
                        TALLOC_FREE(fullname);
                        TALLOC_FREE(talloced);
@@ -1125,7 +1125,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, struct files_struct *fsp)
                        goto err;
                }
 
-               if (!is_visible_fsp(direntry_fname->fsp, false)) {
+               if (!is_visible_fsp(direntry_fname->fsp)) {
                        TALLOC_FREE(talloced);
                        TALLOC_FREE(fullname);
                        TALLOC_FREE(smb_dname_full);
@@ -1224,7 +1224,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, struct files_struct *fsp)
                                goto err_break;
                        }
 
-                       if (!is_visible_fsp(direntry_fname->fsp, false)) {
+                       if (!is_visible_fsp(direntry_fname->fsp)) {
                                TALLOC_FREE(fullname);
                                TALLOC_FREE(smb_dname_full);
                                TALLOC_FREE(talloced);
index 6dfb9d93d90ae90e4fb1aad4e4289bef1482a6ec..655755a16a24644a28f142c5481c94fddcaab437 100644 (file)
@@ -969,7 +969,7 @@ bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
                        continue;
                }
 
-               if (!is_visible_fsp(smb_fname->fsp, false)) {
+               if (!is_visible_fsp(smb_fname->fsp)) {
                        TALLOC_FREE(smb_fname);
                        TALLOC_FREE(dname);
                        TALLOC_FREE(fname);
@@ -1566,7 +1566,7 @@ static bool is_visible_file(connection_struct *conn,
  Should the file be seen by the client?
 ********************************************************************/
 
-bool is_visible_fsp(struct files_struct *fsp, bool use_veto)
+bool is_visible_fsp(struct files_struct *fsp)
 {
        bool hide_unreadable = false;
        bool hide_unwriteable = false;
@@ -1605,12 +1605,6 @@ bool is_visible_fsp(struct files_struct *fsp, bool use_veto)
                return true; /* . and .. are always visible. */
        }
 
-       /* If it's a vetoed file, pretend it doesn't even exist */
-       if (use_veto && IS_VETO_PATH(fsp->conn, last_component)) {
-               DBG_ERR("file %s is vetoed.\n", fsp_str_dbg(fsp));
-               return false;
-       }
-
        if (fsp_get_pathref_fd(fsp) == -1) {
                /*
                 * Symlink in POSIX mode or MS-DFS.
@@ -2189,7 +2183,7 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp)
                        break;
                }
 
-               if (!is_visible_fsp(direntry_fname->fsp, false)) {
+               if (!is_visible_fsp(direntry_fname->fsp)) {
                        TALLOC_FREE(talloced);
                        TALLOC_FREE(fullname);
                        TALLOC_FREE(smb_dname_full);
index 788bb48ea7ceeb5cf626addcccf7ea61bf9a9084..321bd20932623114edacbf5371b2768ab56b591e 100644 (file)
@@ -228,7 +228,7 @@ bool get_dir_entry(TALLOC_CTX *ctx,
                bool check_descend,
                bool ask_sharemode);
 struct smb_Dir;
-bool is_visible_fsp(files_struct *fsp, bool use_veto);
+bool is_visible_fsp(files_struct *fsp);
 struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx,
                        connection_struct *conn,
                        const struct smb_filename *smb_fname,
index c8349667818ace7b4fe774e1e6d85ab5fa991ce0..f3a262a79bb362d197d7506af2d7d259e22ef07a 100644 (file)
@@ -3481,7 +3481,7 @@ NTSTATUS unlink_internals(connection_struct *conn,
                                goto out;
                        }
 
-                       if (!is_visible_fsp(f->fsp, false)) {
+                       if (!is_visible_fsp(f->fsp)) {
                                TALLOC_FREE(frame);
                                TALLOC_FREE(talloced);
                                continue;
@@ -8239,7 +8239,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
                        break;
                }
 
-               if (!is_visible_fsp(smb_fname_src->fsp, false)) {
+               if (!is_visible_fsp(smb_fname_src->fsp)) {
                        TALLOC_FREE(talloced);
                        continue;
                }
@@ -9033,7 +9033,7 @@ void reply_copy(struct smb_request *req)
                                break;
                        }
 
-                       if (!is_visible_fsp(smb_fname_src->fsp, false)) {
+                       if (!is_visible_fsp(smb_fname_src->fsp)) {
                                TALLOC_FREE(talloced);
                                continue;
                        }