mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
s3: Pass smb_filename through the set_offline vfs op
This commit is contained in:
committed by
Volker Lendecke
parent
c9d1e16c2c
commit
cf7dac6fbc
@ -349,10 +349,13 @@ static ssize_t tsmsm_pwrite(struct vfs_handle_struct *handle, struct files_struc
|
||||
}
|
||||
|
||||
static int tsmsm_set_offline(struct vfs_handle_struct *handle,
|
||||
const char *path) {
|
||||
const struct smb_filename *fname)
|
||||
{
|
||||
struct tsmsm_struct *tsmd = (struct tsmsm_struct *) handle->data;
|
||||
int result = 0;
|
||||
char *command;
|
||||
NTSTATUS status;
|
||||
char *path;
|
||||
|
||||
if (tsmd->hsmscript == NULL) {
|
||||
/* no script enabled */
|
||||
@ -360,6 +363,12 @@ static int tsmsm_set_offline(struct vfs_handle_struct *handle,
|
||||
return 0;
|
||||
}
|
||||
|
||||
status = get_full_smb_filename(talloc_tos(), fname, &path);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
errno = map_errno_from_nt_status(status);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Now, call the script */
|
||||
command = talloc_asprintf(tsmd, "%s offline \"%s\"", tsmd->hsmscript, path);
|
||||
if(!command) {
|
||||
|
Reference in New Issue
Block a user