From 83a245fda0739a5ed4253fe2c701ca58061f5324 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Tue, 1 Sep 2009 03:54:21 +0000 Subject: 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 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 --- libglusterfsclient/src/libglusterfsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfsclient/src') 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; -- cgit