From 45fd0d904d11f07f8b523af2d1357f081e3c5dc1 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 10 Mar 2011 00:43:03 +0000 Subject: syncdaemon: don't follow symlinks on entries query Signed-off-by: Kaushik BV Signed-off-by: Vijay Bellur BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570 --- xlators/features/marker/utils/syncdaemon/resource.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py index 6882164b9..599267824 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 -- cgit