s4:kdc: Implement KDC plugin hardware authentication policy
[samba.git] / source3 / modules / vfs_tsmsm.c
index 1ae3719a30dc6acbb3f105d07bc95cfbeb7457fd..89191f7e3ae55be0d38083365fc33754efcacc3e 100644 (file)
@@ -197,7 +197,7 @@ static bool tsmsm_is_offline(struct vfs_handle_struct *handle,
         * become_root() is just as good anyway (tridge) 
         */
 
-       /* Also, AIX has DMAPI but no POSIX capablities support. In this case,
+       /* Also, AIX has DMAPI but no POSIX capabilities support. In this case,
         * we need to be root to do DMAPI manipulations.
         */
        become_root();
@@ -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)
@@ -519,7 +505,7 @@ static NTSTATUS tsmsm_set_offline(struct vfs_handle_struct *handle,
        /* Now, call the script */
        command = talloc_asprintf(tsmd, "%s offline \"%s\"", tsmd->hsmscript, path);
        if(!command) {
-               DEBUG(1, ("tsmsm_set_offline: can't allocate memory to run hsm script"));
+               DEBUG(1, ("tsmsm_set_offline: can't allocate memory to run hsm script\n"));
                return NT_STATUS_NO_MEMORY;
        }
        DEBUG(10, ("tsmsm_set_offline: Running [%s]\n", command));
@@ -533,37 +519,6 @@ static NTSTATUS tsmsm_set_offline(struct vfs_handle_struct *handle,
        return NT_STATUS_OK;
 }
 
-static NTSTATUS tsmsm_set_dos_attributes(struct vfs_handle_struct *handle,
-                                        const struct smb_filename *smb_fname,
-                                        uint32_t dosmode)
-{
-       NTSTATUS status;
-       uint32_t old_dosmode;
-       struct smb_filename *fname = NULL;
-
-       /* dos_mode() doesn't like const smb_fname */
-       fname = cp_smb_filename(talloc_tos(), smb_fname);
-       if (fname == NULL) {
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       old_dosmode = fdos_mode(smb_fname->fsp);
-       TALLOC_FREE(fname);
-
-       status = SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle, smb_fname, dosmode);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
-       if (!(old_dosmode & FILE_ATTRIBUTE_OFFLINE) &&
-           (dosmode & FILE_ATTRIBUTE_OFFLINE))
-       {
-               return NT_STATUS_OK;
-       }
-
-       return tsmsm_set_offline(handle, smb_fname);
-}
-
 static NTSTATUS tsmsm_fset_dos_attributes(struct vfs_handle_struct *handle,
                                          struct files_struct *fsp,
                                          uint32_t dosmode)
@@ -604,9 +559,7 @@ static struct vfs_fn_pointers tsmsm_fns = {
        .pwrite_send_fn = tsmsm_pwrite_send,
        .pwrite_recv_fn = tsmsm_pwrite_recv,
        .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,