summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-06-21 09:56:22 -0700
committerJeremy Allison <jra@samba.org>2013-06-21 10:58:47 -0700
commit6c49f90965327a7f70d24fecdb7529f3f78fc9e4 (patch)
treed8652d462f7150796eb4d8079503a98db1167874 /source3
parentb96cea4aa5b707cbd01d75ecb4782496160db961 (diff)
downloadsamba-6c49f90965327a7f70d24fecdb7529f3f78fc9e4.tar.gz
samba-6c49f90965327a7f70d24fecdb7529f3f78fc9e4.tar.bz2
samba-6c49f90965327a7f70d24fecdb7529f3f78fc9e4.zip
Fix glusterfs backend crash found at the Microsoft interop event.
Based on a fix originally from Raghavendra Talur <rtalur@redhat.com>. When a new document is created in explorer, a check for file_exist is made. vfs_gluster_get_real_filename was returning 0 even when the file did not exist. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: "Christopher R. Hertel" <crh@ubiqx.mn.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_glusterfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 24e1bdaea7..1323e0e17f 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -894,8 +894,10 @@ static int vfs_gluster_get_real_filename(struct vfs_handle_struct *handle,
"user.glusterfs.get_real_filename:%s", name);
ret = glfs_getxattr(handle->data, path, key_buf, val_buf, NAME_MAX + 1);
- if (ret == -1 && errno == ENODATA) {
- errno = EOPNOTSUPP;
+ if (ret == -1) {
+ if (errno == ENODATA) {
+ errno = EOPNOTSUPP;
+ }
return -1;
}