vfs: RIP SMB_VFS_GET_DOS_ATTRIBUTES()
authorRalph Boehme <slow@samba.org>
Mon, 19 Oct 2020 19:48:32 +0000 (21:48 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:32 +0000 (09:08 +0000)
                (\  _  /)
                ( \ O / )
                 (// \\)
                    X
                   / \
                  /___\
           _____/      \\_____
          |         +         ||
          |                   ||
          |   SMB_VFS_GET_    ||
          | DOS_ATTRIBUTES()  ||
          |                   ||
          |                   ||
          |                   ||
          |  _     ___   _    ||
          | | \     |   | \   ||
          | |  |    |   |  |  ||
          | |_/     |   |_/   ||
          | | \     |   |     ||
          | |  \    |   |     ||
          | |   \. _|_. | .   ||
          |                   ||
  *     * | *   **    * **    |**     **
   \)),.,\(/.,(//,,..,,\||(,,.,\\,.((//

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
13 files changed:
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_catia.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_not_implemented.c
source3/modules/vfs_offline.c
source3/modules/vfs_time_audit.c
source3/modules/vfs_tsmsm.c
source3/smbd/vfs.c

index b74f7360dde661e6ecef88f6cba2b4934375a140..fd7da962ceb06dda94098995a6f615dcb202437b 100644 (file)
@@ -715,13 +715,6 @@ static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static NTSTATUS skel_get_dos_attributes(struct vfs_handle_struct *handle,
-                               struct smb_filename *smb_fname,
-                               uint32_t *dosmode)
-{
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
-
 struct skel_get_dos_attributes_state {
        struct vfs_aio_state aio_state;
        uint32_t dosmode;
@@ -1128,7 +1121,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .audit_file_fn = skel_audit_file,
 
        /* DOS attributes. */
-       .get_dos_attributes_fn = skel_get_dos_attributes,
        .get_dos_attributes_send_fn = skel_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = skel_get_dos_attributes_recv,
        .fget_dos_attributes_fn = skel_fget_dos_attributes,
index 969f0572cf5c52d93fa249e97a370162886d0c24..b83a67f3a7fbb237f625d4ee7c59e6e0c70e729e 100644 (file)
@@ -935,15 +935,6 @@ static NTSTATUS skel_readdir_attr(struct vfs_handle_struct *handle,
        return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
 }
 
-static NTSTATUS skel_get_dos_attributes(struct vfs_handle_struct *handle,
-                               struct smb_filename *smb_fname,
-                               uint32_t *dosmode)
-{
-       return SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle,
-                               smb_fname,
-                               dosmode);
-}
-
 struct skel_get_dos_attributes_state {
        struct vfs_aio_state aio_state;
        uint32_t dosmode;
@@ -1435,7 +1426,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
        .audit_file_fn = skel_audit_file,
 
        /* DOS attributes. */
-       .get_dos_attributes_fn = skel_get_dos_attributes,
        .get_dos_attributes_send_fn = skel_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = skel_get_dos_attributes_recv,
        .fget_dos_attributes_fn = skel_fget_dos_attributes,
index 3110cbd9fe8dfcd061fd988ef6b0cc80bdb72d3c..7e06705e04b21ad5bd317953bba0d281205bbe33 100644 (file)
  * Version 44 - Add 'have_proc_fds' flag to struct connection_struct.
  * Version 44 - Add 'have_proc_fds' flag to struct files_struct.
  * Version 44 - Add dirfsp arg to SMB_VFS_READDIR()
+ * Version 44 - Remove SMB_VFS_GET_DOS_ATTRIBUTES()
  */
 
 #define SMB_VFS_INTERFACE_VERSION 44
@@ -1149,10 +1150,6 @@ struct vfs_fn_pointers {
                             uint32_t max_out_len,
                             uint32_t *out_len); 
 
-       NTSTATUS (*get_dos_attributes_fn)(struct vfs_handle_struct *handle,
-                                         struct smb_filename *smb_fname,
-                                         uint32_t *dosmode);
-
        NTSTATUS (*fget_dos_attributes_fn)(struct vfs_handle_struct *handle,
                                           struct files_struct *fsp,
                                           uint32_t *dosmode);
@@ -1637,9 +1634,6 @@ NTSTATUS smb_vfs_call_fsctl(struct vfs_handle_struct *handle,
                            uint8_t **_out_data,
                            uint32_t max_out_len,
                            uint32_t *out_len);
-NTSTATUS smb_vfs_call_get_dos_attributes(struct vfs_handle_struct *handle,
-                                        struct smb_filename *smb_fname,
-                                        uint32_t *dosmode);
 NTSTATUS smb_vfs_call_fget_dos_attributes(struct vfs_handle_struct *handle,
                                          struct files_struct *fsp,
                                          uint32_t *dosmode);
@@ -2122,9 +2116,6 @@ NTSTATUS vfs_not_implemented_readdir_attr(struct vfs_handle_struct *handle,
                                          const struct smb_filename *fname,
                                          TALLOC_CTX *mem_ctx,
                                          struct readdir_attr_data **pattr_data);
-NTSTATUS vfs_not_implemented_get_dos_attributes(struct vfs_handle_struct *handle,
-                                               struct smb_filename *smb_fname,
-                                               uint32_t *dosmode);
 struct tevent_req *vfs_not_implemented_get_dos_attributes_send(
                        TALLOC_CTX *mem_ctx,
                        struct tevent_context *ev,
index f3ffe8566c793dded3d7ae665acf9c823945d50a..058a678f6d9925611f7707184d9e147dd829df86 100644 (file)
 #define SMB_VFS_NEXT_FSCTL(handle, fsp, ctx, function, req_flags, in_data, in_len, out_data, max_out_len, out_len) \
        smb_vfs_call_fsctl((handle)->next, (fsp), (ctx), (function), (req_flags), (in_data), (in_len), (out_data), (max_out_len), (out_len))
 
-#define SMB_VFS_GET_DOS_ATTRIBUTES(conn, smb_fname, attributes) \
-       smb_vfs_call_get_dos_attributes((conn)->vfs_handles, (smb_fname), (attributes))
-#define SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle, smb_fname, attributes) \
-       smb_vfs_call_get_dos_attributes((handle)->next, (smb_fname), (attributes))
 #define SMB_VFS_FGET_DOS_ATTRIBUTES(conn, fsp, attributes) \
        smb_vfs_call_fget_dos_attributes((conn)->vfs_handles, (fsp), (attributes))
 #define SMB_VFS_NEXT_FGET_DOS_ATTRIBUTES(handle, fsp, attributes) \
index 85ef5cfb0d409d81e26bc86acf9c13d732bba161..51beb6b424d8fcf62e1a70ae553373c9019e6a8f 100644 (file)
@@ -2300,45 +2300,6 @@ static NTSTATUS catia_readdir_attr(struct vfs_handle_struct *handle,
        return status;
 }
 
-static NTSTATUS catia_get_dos_attributes(struct vfs_handle_struct *handle,
-                                        struct smb_filename *smb_fname,
-                                        uint32_t *dosmode)
-{
-       char *mapped_name = NULL;
-       const char *path = smb_fname->base_name;
-       struct smb_filename *mapped_smb_fname = NULL;
-       NTSTATUS status;
-
-       status = catia_string_replace_allocate(handle->conn,
-                               path, &mapped_name, vfs_translate_to_unix);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
-               return status;
-       }
-       mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       mapped_name,
-                                       NULL,
-                                       &smb_fname->st,
-                                       smb_fname->twrp,
-                                       smb_fname->flags);
-       if (mapped_smb_fname == NULL) {
-               TALLOC_FREE(mapped_name);
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       status = SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle,
-                                                mapped_smb_fname,
-                                                dosmode);
-       if (NT_STATUS_IS_OK(status)) {
-               smb_fname->st = mapped_smb_fname->st;
-       }
-
-       TALLOC_FREE(mapped_name);
-       TALLOC_FREE(mapped_smb_fname);
-
-       return status;
-}
-
 static NTSTATUS catia_set_dos_attributes(struct vfs_handle_struct *handle,
                                         const struct smb_filename *smb_fname,
                                         uint32_t dosmode)
@@ -2502,7 +2463,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
        .strict_lock_check_fn = catia_strict_lock_check,
        .translate_name_fn = catia_translate_name,
        .fsctl_fn = catia_fsctl,
-       .get_dos_attributes_fn = catia_get_dos_attributes,
        .get_dos_attributes_send_fn = vfs_not_implemented_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = vfs_not_implemented_get_dos_attributes_recv,
        .set_dos_attributes_fn = catia_set_dos_attributes,
index a9eb7798f0d898c7071c1b99c05efa49638215ee..7ea0868d88b283acff96540c55f16a1166914529 100644 (file)
@@ -1703,20 +1703,6 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
 static bool vfswrap_is_offline(struct connection_struct *conn,
                               const struct smb_filename *fname);
 
-static NTSTATUS vfswrap_get_dos_attributes(struct vfs_handle_struct *handle,
-                                          struct smb_filename *smb_fname,
-                                          uint32_t *dosmode)
-{
-       bool offline;
-
-       offline = vfswrap_is_offline(handle->conn, smb_fname);
-       if (offline) {
-               *dosmode |= FILE_ATTRIBUTE_OFFLINE;
-       }
-
-       return get_ea_dos_attribute(handle->conn, smb_fname, dosmode);
-}
-
 struct vfswrap_get_dos_attributes_state {
        struct vfs_aio_state aio_state;
        connection_struct *conn;
@@ -3870,7 +3856,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .fsctl_fn = vfswrap_fsctl,
        .set_dos_attributes_fn = vfswrap_set_dos_attributes,
        .fset_dos_attributes_fn = vfswrap_fset_dos_attributes,
-       .get_dos_attributes_fn = vfswrap_get_dos_attributes,
        .get_dos_attributes_send_fn = vfswrap_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = vfswrap_get_dos_attributes_recv,
        .fget_dos_attributes_fn = vfswrap_fget_dos_attributes,
index 5a73562a09a1bf0c14156c1f04645563a9b05582..2988b9aed4703c8d1f0e80ad542fde33c8d250f6 100644 (file)
@@ -182,7 +182,6 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_SNAP_DELETE,
 
        /* DOS attribute operations. */
-       SMB_VFS_OP_GET_DOS_ATTRIBUTES,
        SMB_VFS_OP_GET_DOS_ATTRIBUTES_SEND,
        SMB_VFS_OP_GET_DOS_ATTRIBUTES_RECV,
        SMB_VFS_OP_FGET_DOS_ATTRIBUTES,
@@ -324,7 +323,6 @@ static struct {
        { SMB_VFS_OP_SNAP_CHECK_PATH, "snap_check_path" },
        { SMB_VFS_OP_SNAP_CREATE, "snap_create" },
        { SMB_VFS_OP_SNAP_DELETE, "snap_delete" },
-       { SMB_VFS_OP_GET_DOS_ATTRIBUTES, "get_dos_attributes" },
        { SMB_VFS_OP_GET_DOS_ATTRIBUTES_SEND, "get_dos_attributes_send" },
        { SMB_VFS_OP_GET_DOS_ATTRIBUTES_RECV, "get_dos_attributes_recv" },
        { SMB_VFS_OP_FGET_DOS_ATTRIBUTES, "fget_dos_attributes" },
@@ -2224,26 +2222,6 @@ static NTSTATUS smb_full_audit_readdir_attr(struct vfs_handle_struct *handle,
        return status;
 }
 
-static NTSTATUS smb_full_audit_get_dos_attributes(
-                               struct vfs_handle_struct *handle,
-                               struct smb_filename *smb_fname,
-                               uint32_t *dosmode)
-{
-       NTSTATUS status;
-
-       status = SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle,
-                               smb_fname,
-                               dosmode);
-
-       do_log(SMB_VFS_OP_GET_DOS_ATTRIBUTES,
-               NT_STATUS_IS_OK(status),
-               handle,
-               "%s",
-               smb_fname_str_do_log(handle->conn, smb_fname));
-
-       return status;
-}
-
 struct smb_full_audit_get_dos_attributes_state {
        struct vfs_aio_state aio_state;
        vfs_handle_struct *handle;
@@ -3051,7 +3029,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .strict_lock_check_fn = smb_full_audit_strict_lock_check,
        .translate_name_fn = smb_full_audit_translate_name,
        .fsctl_fn = smb_full_audit_fsctl,
-       .get_dos_attributes_fn = smb_full_audit_get_dos_attributes,
        .get_dos_attributes_send_fn = smb_full_audit_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = smb_full_audit_get_dos_attributes_recv,
        .fget_dos_attributes_fn = smb_full_audit_fget_dos_attributes,
index ae5e2638115625e887c743a76f22eacc31ab64c0..78ee7fc6958d65206e685642b4d8699fcd481ad8 100644 (file)
@@ -1621,49 +1621,6 @@ static unsigned int vfs_gpfs_dosmode_to_winattrs(uint32_t dosmode)
        return winattrs;
 }
 
-static int get_dos_attr_with_capability(struct smb_filename *smb_fname,
-                                       unsigned int *litemask,
-                                       struct gpfs_iattr64 *iattr)
-{
-       int saved_errno = 0;
-       int ret;
-
-       /*
-        * According to MS-FSA 2.1.5.1.2.1 "Algorithm to Check Access to an
-        * Existing File" FILE_LIST_DIRECTORY on a directory implies
-        * FILE_READ_ATTRIBUTES for directory entries. Being able to stat() a
-        * file implies FILE_LIST_DIRECTORY for the directory containing the
-        * file.
-        */
-
-       if (!VALID_STAT(smb_fname->st)) {
-               /*
-                * Safety net: dos_mode() already checks this, but as we set
-                * DAC_OVERRIDE_CAPABILITY based on this, add an additional
-                * layer of defense.
-                */
-               DBG_ERR("Rejecting DAC override, invalid stat [%s]\n",
-                       smb_fname_str_dbg(smb_fname));
-               errno = EACCES;
-               return -1;
-       }
-
-       set_effective_capability(DAC_OVERRIDE_CAPABILITY);
-
-       ret = gpfswrap_stat_x(smb_fname->base_name, litemask,
-                             iattr, sizeof(*iattr));
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-
-       drop_effective_capability(DAC_OVERRIDE_CAPABILITY);
-
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static NTSTATUS vfs_gpfs_get_file_id(struct gpfs_iattr64 *iattr,
                                     uint64_t *fileid)
 {
@@ -1703,66 +1660,6 @@ static struct timespec gpfs_timestruc64_to_timespec(struct gpfs_timestruc64 g)
        return (struct timespec) { .tv_sec = g.tv_sec, .tv_nsec = g.tv_nsec };
 }
 
-static NTSTATUS vfs_gpfs_get_dos_attributes(struct vfs_handle_struct *handle,
-                                           struct smb_filename *smb_fname,
-                                           uint32_t *dosmode)
-{
-       struct gpfs_config_data *config;
-       struct gpfs_iattr64 iattr = { };
-       unsigned int litemask = 0;
-       struct timespec ts;
-       uint64_t file_id;
-       NTSTATUS status;
-       int ret;
-
-       SMB_VFS_HANDLE_GET_DATA(handle, config,
-                               struct gpfs_config_data,
-                               return NT_STATUS_INTERNAL_ERROR);
-
-       if (!config->winattr) {
-               return SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle,
-                                                      smb_fname, dosmode);
-       }
-
-       ret = gpfswrap_stat_x(smb_fname->base_name, &litemask,
-                             &iattr, sizeof(iattr));
-       if (ret == -1 && errno == ENOSYS) {
-               return SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle, smb_fname,
-                                                      dosmode);
-       }
-       if (ret == -1 && errno == EACCES) {
-               ret = get_dos_attr_with_capability(smb_fname, &litemask,
-                                                  &iattr);
-       }
-
-       if (ret == -1 && errno == EBADF) {
-               /*
-                * Returned for directory listings in gpfs root for
-                * .. entry which steps out of gpfs.
-                */
-               DBG_DEBUG("Getting winattrs for %s returned EBADF.\n",
-                         smb_fname->base_name);
-               return map_nt_error_from_unix(errno);
-       } else if (ret == -1) {
-               DBG_WARNING("Getting winattrs failed for %s: %s\n",
-                           smb_fname->base_name, strerror(errno));
-               return map_nt_error_from_unix(errno);
-       }
-
-       status = vfs_gpfs_get_file_id(&iattr, &file_id);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       ts = gpfs_timestruc64_to_timespec(iattr.ia_createtime);
-
-       *dosmode |= vfs_gpfs_winattrs_to_dosmode(iattr.ia_winflags);
-       update_stat_ex_create_time(&smb_fname->st, ts);
-       update_stat_ex_file_id(&smb_fname->st, file_id);
-
-       return NT_STATUS_OK;
-}
-
 static NTSTATUS vfs_gpfs_fget_dos_attributes(struct vfs_handle_struct *handle,
                                             struct files_struct *fsp,
                                             uint32_t *dosmode)
@@ -2735,7 +2632,6 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
        .kernel_flock_fn = vfs_gpfs_kernel_flock,
        .linux_setlease_fn = vfs_gpfs_setlease,
        .get_real_filename_fn = vfs_gpfs_get_real_filename,
-       .get_dos_attributes_fn = vfs_gpfs_get_dos_attributes,
        .get_dos_attributes_send_fn = vfs_not_implemented_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = vfs_not_implemented_get_dos_attributes_recv,
        .fget_dos_attributes_fn = vfs_gpfs_fget_dos_attributes,
index d889dc417b57caffaf554ba919ff8e17341614e9..cc8d410b5e46284f9a2d563cb923073dfffb824c 100644 (file)
@@ -718,13 +718,6 @@ NTSTATUS vfs_not_implemented_readdir_attr(struct vfs_handle_struct *handle,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-NTSTATUS vfs_not_implemented_get_dos_attributes(struct vfs_handle_struct *handle,
-                                               struct smb_filename *smb_fname,
-                                               uint32_t *dosmode)
-{
-       return NT_STATUS_NOT_IMPLEMENTED;
-}
-
 struct vfs_not_implemented_get_dos_attributes_state {
        struct vfs_aio_state aio_state;
        uint32_t dosmode;
@@ -1132,7 +1125,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
        .audit_file_fn = vfs_not_implemented_audit_file,
 
        /* DOS attributes. */
-       .get_dos_attributes_fn = vfs_not_implemented_get_dos_attributes,
        .get_dos_attributes_send_fn = vfs_not_implemented_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = vfs_not_implemented_get_dos_attributes_recv,
        .fget_dos_attributes_fn = vfs_not_implemented_fget_dos_attributes,
index 0a7e8af469c909dd1b5feaeda9701e7378c3f0a0..06edb762dae3aad8f746c3ec294bc013d7775fc4 100644 (file)
@@ -27,14 +27,6 @@ static uint32_t offline_fs_capabilities(struct vfs_handle_struct *handle,
               FILE_SUPPORTS_REMOTE_STORAGE;
 }
 
-static NTSTATUS offline_get_dos_attributes(struct vfs_handle_struct *handle,
-                                          struct smb_filename *smb_fname,
-                                          uint32_t *dosmode)
-{
-       *dosmode |= FILE_ATTRIBUTE_OFFLINE;
-       return SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle, smb_fname, dosmode);
-}
-
 static NTSTATUS offline_fget_dos_attributes(struct vfs_handle_struct *handle,
                                            struct files_struct *fsp,
                                            uint32_t *dosmode)
@@ -45,7 +37,6 @@ static NTSTATUS offline_fget_dos_attributes(struct vfs_handle_struct *handle,
 
 static struct vfs_fn_pointers offline_fns = {
     .fs_capabilities_fn = offline_fs_capabilities,
-       .get_dos_attributes_fn = offline_get_dos_attributes,
        .get_dos_attributes_send_fn = vfs_not_implemented_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = vfs_not_implemented_get_dos_attributes_recv,
        .fget_dos_attributes_fn = offline_fget_dos_attributes,
index e18733b55c1be19d70aa5700d5caf61134f10408..e2d257aedae4fe8b913e1e40eb5584ca70bf946f 100644 (file)
@@ -1786,30 +1786,6 @@ static NTSTATUS smb_time_audit_fsctl(struct vfs_handle_struct *handle,
        return result;
 }
 
-static NTSTATUS smb_time_get_dos_attributes(struct vfs_handle_struct *handle,
-                                       struct smb_filename *smb_fname,
-                                       uint32_t *dosmode)
-{
-       NTSTATUS result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle,
-                               smb_fname,
-                               dosmode);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("get_dos_attributes",
-                               timediff,
-                               smb_fname->base_name);
-       }
-
-       return result;
-}
-
 struct smb_time_audit_get_dos_attributes_state {
        struct vfs_aio_state aio_state;
        files_struct *dir_fsp;
@@ -2921,7 +2897,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .strict_lock_check_fn = smb_time_audit_strict_lock_check,
        .translate_name_fn = smb_time_audit_translate_name,
        .fsctl_fn = smb_time_audit_fsctl,
-       .get_dos_attributes_fn = smb_time_get_dos_attributes,
        .get_dos_attributes_send_fn = smb_time_audit_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = smb_time_audit_get_dos_attributes_recv,
        .fget_dos_attributes_fn = smb_time_fget_dos_attributes,
index 1ae3719a30dc6acbb3f105d07bc95cfbeb7457fd..eacbd0f59f047ef183149d72997f8e28117a599d 100644 (file)
@@ -268,20 +268,6 @@ done:
        return offline;
 }
 
-static NTSTATUS tsmsm_get_dos_attributes(struct vfs_handle_struct *handle,
-                                        struct smb_filename *fname,
-                                        uint32_t *dosmode)
-{
-       bool offline;
-
-       offline = tsmsm_is_offline(handle, fname, &fname->st);
-       if (offline) {
-               *dosmode |= FILE_ATTRIBUTE_OFFLINE;
-       }
-
-       return SMB_VFS_NEXT_GET_DOS_ATTRIBUTES(handle, fname, dosmode);
-}
-
 static NTSTATUS tsmsm_fget_dos_attributes(struct vfs_handle_struct *handle,
                                          files_struct *fsp,
                                          uint32_t *dosmode)
@@ -606,7 +592,6 @@ static struct vfs_fn_pointers tsmsm_fns = {
        .sendfile_fn = tsmsm_sendfile,
        .set_dos_attributes_fn = tsmsm_set_dos_attributes,
        .fset_dos_attributes_fn = tsmsm_fset_dos_attributes,
-       .get_dos_attributes_fn = tsmsm_get_dos_attributes,
        .get_dos_attributes_send_fn = vfs_not_implemented_get_dos_attributes_send,
        .get_dos_attributes_recv_fn = vfs_not_implemented_get_dos_attributes_recv,
        .fget_dos_attributes_fn = tsmsm_fget_dos_attributes,
index fd6b15f206c573d4ab46297883b4b5fa227faba2..9811efe6e2ce31f3494e5755f4507d9bede17c81 100644 (file)
@@ -2450,14 +2450,6 @@ NTSTATUS smb_vfs_call_fsctl(struct vfs_handle_struct *handle,
                                     out_len);
 }
 
-NTSTATUS smb_vfs_call_get_dos_attributes(struct vfs_handle_struct *handle,
-                                        struct smb_filename *smb_fname,
-                                        uint32_t *dosmode)
-{
-       VFS_FIND(get_dos_attributes);
-       return handle->fns->get_dos_attributes_fn(handle, smb_fname, dosmode);
-}
-
 NTSTATUS smb_vfs_call_fget_dos_attributes(struct vfs_handle_struct *handle,
                                          struct files_struct *fsp,
                                          uint32_t *dosmode)