summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_tsmsm.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-25 06:43:52 -0700
committerVolker Lendecke <vlendec@samba.org>2011-03-02 18:39:21 +0100
commitcf7dac6fbccca6667e5ed20b199e80701b8a6bd4 (patch)
tree611f063cb14b4ba77be8a574dc2cd46101dfb150 /source3/modules/vfs_tsmsm.c
parentc9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046 (diff)
downloadsamba-cf7dac6fbccca6667e5ed20b199e80701b8a6bd4.tar.gz
samba-cf7dac6fbccca6667e5ed20b199e80701b8a6bd4.tar.xz
samba-cf7dac6fbccca6667e5ed20b199e80701b8a6bd4.zip
s3: Pass smb_filename through the set_offline vfs op
Diffstat (limited to 'source3/modules/vfs_tsmsm.c')
-rw-r--r--source3/modules/vfs_tsmsm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index 533fde20030..6383891913f 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -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) {