summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2011-03-10 00:43:03 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-10 07:39:54 -0800
commit45fd0d904d11f07f8b523af2d1357f081e3c5dc1 (patch)
treeb671f887e849b4149df3f68b739d2fb9b6b37360 /xlators/features
parent38d57757b33983052594e14582611ef05f753581 (diff)
syncdaemon: don't follow symlinks on entries query
Signed-off-by: Kaushik BV <kaushikbv@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/marker/utils/syncdaemon/resource.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py
index 6882164b9c5..59926782403 100644
--- a/xlators/features/marker/utils/syncdaemon/resource.py
+++ b/xlators/features/marker/utils/syncdaemon/resource.py
@@ -93,6 +93,9 @@ class Server(object):
@staticmethod
def entries(path):
+ # prevent symlinks being followed
+ if not stat.S_ISDIR(os.lstat(path).st_mode):
+ raise OSError(ENOTDIR, os.strerror(ENOTDIR))
return os.listdir(path)
@classmethod