summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-09-01 03:52:20 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-08 03:22:46 -0700
commitb27afdea5d8c594e160a099e2dd814fa33529276 (patch)
treec644034cdce7d62a8ec710d3d44237b08f4a9254
parent342100dac9d0e01039b8cd8a0da4426b70d27060 (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
-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 50ca6a5a796..eaa11376f71 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5148,7 +5148,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;