* 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();
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)
/* 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));
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)
.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,