summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_default.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_default.c
parent48f6b4d6fc08fa0621734c1c677ef7ef92891754 (diff)
downloadsamba-c9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046.tar.gz
samba-c9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046.tar.bz2
samba-c9d1e16c2c6ab5ffebbab4bd82a4cda0bb860046.zip
s3: Pass smb_filename through the is_offline vfs op
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r--source3/modules/vfs_default.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 5448db8ee0..6ad538149a 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1607,9 +1607,14 @@ static bool vfswrap_aio_force(struct vfs_handle_struct *handle, struct files_str
return false;
}
-static bool vfswrap_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
+static bool vfswrap_is_offline(struct vfs_handle_struct *handle,
+ const struct smb_filename *fname,
+ SMB_STRUCT_STAT *sbuf)
{
- if (ISDOT(path) || ISDOTDOT(path)) {
+ NTSTATUS status;
+ char *path;
+
+ if (ISDOT(fname->base_name) || ISDOTDOT(fname->base_name)) {
return false;
}
@@ -1620,6 +1625,12 @@ static bool vfswrap_is_offline(struct vfs_handle_struct *handle, const char *pat
return false;
}
+ status = get_full_smb_filename(talloc_tos(), fname, &path);
+ if (!NT_STATUS_IS_OK(status)) {
+ errno = map_errno_from_nt_status(status);
+ return false;
+ }
+
return (dmapi_file_flags(path) & FILE_ATTRIBUTE_OFFLINE) != 0;
}