Revert "vfs_catia: implement SMB_VFS_GET_DOS_ATTRIBUTES_SEND/RECV()"
authorRalph Boehme <slow@samba.org>
Wed, 25 Jul 2018 17:08:43 +0000 (19:08 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 26 Jul 2018 13:14:21 +0000 (15:14 +0200)
This reverts commit ba13e7a2cea3e962d7d3bb96dde1de67be2a4819.

source3/modules/vfs_catia.c

index 90e414d8922dab495d52e779ad0afc96a2c1c3c5..ee98953bf1b310b04750d82e0b8b11a50018183c 100644 (file)
@@ -2515,119 +2515,6 @@ static NTSTATUS catia_get_dos_attributes(struct vfs_handle_struct *handle,
        return status;
 }
 
-struct catia_get_dos_attributes_state {
-       struct vfs_aio_state aio_state;
-       struct catia_cache *cc;
-       files_struct *dir_fsp;
-       uint32_t dosmode;
-};
-
-static void catia_get_dos_attributes_done(struct tevent_req *subreq);
-
-static struct tevent_req *catia_get_dos_attributes_send(
-       struct vfs_handle_struct *handle,
-       TALLOC_CTX *mem_ctx,
-       const struct smb_vfs_ev_glue *evg,
-       files_struct *dir_fsp,
-       struct smb_filename *smb_fname)
-{
-       struct tevent_context *ev = smb_vfs_ev_glue_ev_ctx(evg);
-       struct tevent_req *req = NULL;
-       struct tevent_req *subreq = NULL;
-       struct catia_get_dos_attributes_state *state = NULL;
-       char *mapped_name = NULL;
-       struct smb_filename *mapped_smb_fname = NULL;
-       NTSTATUS status;
-       int ret;
-
-       req = tevent_req_create(mem_ctx, &state,
-                               struct catia_get_dos_attributes_state);
-       if (req == NULL) {
-               return NULL;
-       }
-       state->dir_fsp = dir_fsp;
-
-       ret = CATIA_FETCH_FSP_PRE_NEXT(state, handle, dir_fsp, &state->cc);
-       if (ret != 0) {
-               tevent_req_error(req, errno);
-               return tevent_req_post(req, ev);
-       }
-
-       status = catia_string_replace_allocate(handle->conn,
-                               smb_fname->base_name,
-                               &mapped_name,
-                               vfs_translate_to_unix);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
-               tevent_req_error(req, errno);
-               return tevent_req_post(req, ev);
-       }
-
-       mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       mapped_name,
-                                       NULL,
-                                       NULL,
-                                       smb_fname->flags);
-       if (mapped_smb_fname == NULL) {
-               TALLOC_FREE(mapped_name);
-               tevent_req_error(req, ENOMEM);
-               return tevent_req_post(req, ev);
-       }
-
-       subreq = SMB_VFS_NEXT_GET_DOS_ATTRIBUTES_SEND(handle,
-                                                     mem_ctx,
-                                                     evg,
-                                                     dir_fsp,
-                                                     smb_fname);
-       if (tevent_req_nomem(subreq, req)) {
-               return tevent_req_post(req, ev);
-       }
-       tevent_req_set_callback(
-               subreq, catia_get_dos_attributes_done, req);
-
-       return req;
-}
-
-static void catia_get_dos_attributes_done(struct tevent_req *subreq)
-{
-       struct tevent_req *req = tevent_req_callback_data(
-               subreq, struct tevent_req);
-       struct catia_get_dos_attributes_state *state = tevent_req_data(
-               req, struct catia_get_dos_attributes_state);
-       NTSTATUS status;
-
-       status = SMB_VFS_NEXT_GET_DOS_ATTRIBUTES_RECV(subreq,
-                                                     &state->aio_state,
-                                                     &state->dosmode);
-       TALLOC_FREE(subreq);
-       CATIA_FETCH_FSP_POST_NEXT(&state->cc, state->dir_fsp);
-       if (tevent_req_nterror(req, status)) {
-               return;
-       }
-
-       tevent_req_done(req);
-       return;
-}
-
-static NTSTATUS catia_get_dos_attributes_recv(struct tevent_req *req,
-                                               struct vfs_aio_state *aio_state,
-                                               uint32_t *dosmode)
-{
-       struct catia_get_dos_attributes_state *state = tevent_req_data(
-               req, struct catia_get_dos_attributes_state);
-       NTSTATUS status;
-
-       if (tevent_req_is_nterror(req, &status)) {
-               tevent_req_received(req);
-               return status;
-       }
-
-       *aio_state = state->aio_state;
-       *dosmode = state->dosmode;
-       tevent_req_received(req);
-       return NT_STATUS_OK;
-}
-
 static NTSTATUS catia_set_dos_attributes(struct vfs_handle_struct *handle,
                                         const struct smb_filename *smb_fname,
                                         uint32_t dosmode)
@@ -2707,8 +2594,8 @@ static struct vfs_fn_pointers vfs_catia_fns = {
        .translate_name_fn = catia_translate_name,
        .fsctl_fn = catia_fsctl,
        .get_dos_attributes_fn = catia_get_dos_attributes,
-       .get_dos_attributes_send_fn = catia_get_dos_attributes_send,
-       .get_dos_attributes_recv_fn = catia_get_dos_attributes_recv,
+       .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,
        .fset_dos_attributes_fn = catia_fset_dos_attributes,
        .fget_dos_attributes_fn = catia_fget_dos_attributes,