summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-11-20 10:39:57 +0100
committerMichael Adam <obnox@samba.org>2011-01-21 10:10:02 +0100
commit385d925f7e0fedca7d480e4f25d89e3194433b88 (patch)
treeb69b7f6ee6944741745e823259b06ed1d2b5dc97 /source3
parent1a96ec21095c3524558b9a28643f84a28701db13 (diff)
downloadsamba-385d925f7e0fedca7d480e4f25d89e3194433b88.tar.gz
samba-385d925f7e0fedca7d480e4f25d89e3194433b88.tar.bz2
samba-385d925f7e0fedca7d480e4f25d89e3194433b88.zip
s3:vfs:gpfs: fix logic when gpfs:winattr is false (the default!)
On my autocluster setup, it's not set. Maybe it should be? Otherwise smbclient and some Windows client programs will get errors like: # smbclient //localhost/data -Uadministrator%XXX Domain=[VSOFS1] OS=[Unix] Server=[Samba 3.4.2-ctdb-10] smb: \> put /etc/resolv.conf resolv.conf NT_STATUS_ACCESS_DENIED closing remote file \resolv.conf smb: \> Caused by attempting to update the time on close. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_gpfs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index ffe51c305e..bc634b16e2 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -991,6 +991,11 @@ static int gpfs_set_xattr(struct vfs_handle_struct *handle, const char *path,
ret = set_gpfs_winattrs(CONST_DISCARD(char *, path),
GPFS_WINATTR_SET_ATTRS, &attrs);
if ( ret == -1){
+ if (errno == ENOSYS) {
+ return SMB_VFS_NEXT_SETXATTR(handle, path, name, value,
+ size, flags);
+ }
+
DEBUG(1, ("gpfs_set_xattr:Set GPFS attributes failed %d\n",ret));
return -1;
}
@@ -1016,6 +1021,11 @@ static ssize_t gpfs_get_xattr(struct vfs_handle_struct *handle, const char *pat
ret = get_gpfs_winattrs(CONST_DISCARD(char *, path), &attrs);
if ( ret == -1){
+ if (errno == ENOSYS) {
+ return SMB_VFS_NEXT_GETXATTR(handle, path, name, value,
+ size);
+ }
+
DEBUG(1, ("gpfs_get_xattr: Get GPFS attributes failed: %d\n",ret));
return -1;
}
@@ -1150,7 +1160,7 @@ static int vfs_gpfs_ntimes(struct vfs_handle_struct *handle,
ret = set_gpfs_winattrs(CONST_DISCARD(char *, path),
GPFS_WINATTR_SET_CREATION_TIME, &attrs);
- if(ret == -1){
+ if(ret == -1 && errno != ENOSYS){
DEBUG(1,("vfs_gpfs_ntimes: set GPFS ntimes failed %d\n",ret));
return -1;
}