]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: vfs_shadow_copy2: Remove check_access_snapdir().
authorJeremy Allison <jra@samba.org>
Mon, 7 Jun 2021 16:56:19 +0000 (09:56 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_shadow_copy2.c

index 01c12fcf2afc006fdf13b25107bd33d0d07875f2..3945d661d08f0fd547fb7109e36c140b749daad1 100644 (file)
@@ -1738,45 +1738,6 @@ static char *have_snapdir(struct vfs_handle_struct *handle,
        return NULL;
 }
 
-#if 0
-static bool check_access_snapdir(struct vfs_handle_struct *handle,
-                               const char *path)
-{
-       struct smb_filename smb_fname;
-       int ret;
-       NTSTATUS status;
-
-       ZERO_STRUCT(smb_fname);
-       smb_fname.base_name = talloc_asprintf(talloc_tos(),
-                                               "%s",
-                                               path);
-       if (smb_fname.base_name == NULL) {
-               return false;
-       }
-
-       ret = SMB_VFS_NEXT_STAT(handle, &smb_fname);
-       if (ret != 0 || !S_ISDIR(smb_fname.st.st_ex_mode)) {
-               TALLOC_FREE(smb_fname.base_name);
-               return false;
-       }
-
-       status = smbd_check_access_rights(handle->conn,
-                                       handle->conn->cwd_fsp,
-                                       &smb_fname,
-                                       false,
-                                       SEC_DIR_LIST);
-       if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0,("user does not have list permission "
-                       "on snapdir %s\n",
-                       smb_fname.base_name));
-               TALLOC_FREE(smb_fname.base_name);
-               return false;
-       }
-       TALLOC_FREE(smb_fname.base_name);
-       return true;
-}
-#endif
-
 /**
  * Find the snapshot directory (if any) for the given
  * filename (which is relative to the share).