summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-09-01 03:54:21 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-08 03:23:26 -0700
commit83a245fda0739a5ed4253fe2c701ca58061f5324 (patch)
tree58ea5ad782976856ba3834d6326f02841e2faa74 /libglusterfsclient/src
parent302d310c82cf55ca178c13a9947eaea9c543a2ea (diff)
libglusterfsclient: handle symlinks properly in glusterfs_glh_opendir.
- exclude symbolic links from set of filetypes to which ENOTDIR is returned, since a symbolic link can point to a directory. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 234 (Apache-2.2 on booster returns HTTP_FORBIDDEN for a directory which is present) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=234
Diffstat (limited to 'libglusterfsclient/src')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 7e503feeb..dc46c167d 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5154,7 +5154,7 @@ glusterfs_glh_opendir (glusterfs_handle_t handle, const char *path)
goto out;
}
- if (!S_ISDIR (loc.inode->st_mode)) {
+ if (!S_ISDIR (loc.inode->st_mode) && !S_ISLNK (loc.inode->st_mode)) {
errno = ENOTDIR;
op_ret = -1;
goto out;