diff options
author | Volker Lendecke <vl@samba.org> | 2011-05-04 15:47:42 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-05-04 16:11:30 +0200 |
commit | 41bde55821a6c18ace24330aede8d4928215e658 (patch) | |
tree | cba82b80b69dde9ee1c2cae3e71d16bfc40937ae | |
parent | 2329fb56a701804585d866817586b4d567966b92 (diff) | |
download | samba-41bde55821a6c18ace24330aede8d4928215e658.tar.gz samba-41bde55821a6c18ace24330aede8d4928215e658.tar.bz2 samba-41bde55821a6c18ace24330aede8d4928215e658.zip |
vfs_gpfs: Block sendfile for offline files
-rw-r--r-- | source3/modules/vfs_gpfs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index e8d8bd38ae..7d5d199405 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1235,6 +1235,17 @@ static bool vfs_gpfs_aio_force(struct vfs_handle_struct *handle, return vfs_gpfs_is_offline(handle, fsp->fsp_name, &fsp->fsp_name->st); } +static ssize_t vfs_gpfs_sendfile(vfs_handle_struct *handle, int tofd, + files_struct *fsp, const DATA_BLOB *hdr, + SMB_OFF_T offset, size_t n) +{ + if ((fsp->fsp_name->st.vfs_private & GPFS_WINATTR_OFFLINE) != 0) { + errno = ENOSYS; + return -1; + } + return SMB_VFS_NEXT_SENDFILE(handle, tofd, fsp, hdr, offset, n); +} + int vfs_gpfs_connect(struct vfs_handle_struct *handle, const char *service, const char *user) { @@ -1314,6 +1325,7 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .ntimes = vfs_gpfs_ntimes, .is_offline = vfs_gpfs_is_offline, .aio_force = vfs_gpfs_aio_force, + .sendfile = vfs_gpfs_sendfile, .ftruncate = vfs_gpfs_ftruncate }; |