summaryrefslogtreecommitdiffstats
path: root/source3/modules/vfs_tsmsm.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-02-25 06:37:34 -0700
committerVolker Lendecke <vlendec@samba.org>2011-03-02 18:39:21 +0100
commitc9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046 (patch)
tree3ffb79da3653f0ba9273afd637f9e25e4aedd6cb /source3/modules/vfs_tsmsm.c
parent48f6b4d6fc08fa0621734c1c677ef7ef92891754 (diff)
downloadsamba-c9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046.tar.gz
samba-c9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046.tar.xz
samba-c9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046.zip
s3: Pass smb_filename through the is_offline vfs op
Diffstat (limited to 'source3/modules/vfs_tsmsm.c')
-rw-r--r--source3/modules/vfs_tsmsm.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index 95c83de08d2..533fde20030 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -146,8 +146,9 @@ static int tsmsm_connect(struct vfs_handle_struct *handle,
}
static bool tsmsm_is_offline(struct vfs_handle_struct *handle,
- const char *path,
- SMB_STRUCT_STAT *stbuf) {
+ const struct smb_filename *fname,
+ SMB_STRUCT_STAT *stbuf)
+{
struct tsmsm_struct *tsmd = (struct tsmsm_struct *) handle->data;
const dm_sessid_t *dmsession_id;
void *dmhandle = NULL;
@@ -158,6 +159,14 @@ static bool tsmsm_is_offline(struct vfs_handle_struct *handle,
bool offline;
char *buf = NULL;
size_t buflen;
+ NTSTATUS status;
+ char *path;
+
+ status = get_full_smb_filename(talloc_tos(), fname, &path);
+ if (!NT_STATUS_IS_OK(status)) {
+ errno = map_errno_from_nt_status(status);
+ return false;
+ }
/* if the file has more than FILE_IS_ONLINE_RATIO of blocks available,
then assume it is not offline (it may not be 100%, as it could be sparse) */