From 5b9d47a3a39fac39e3fbccd4083f2f45c9ce5b49 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Wed, 29 Feb 2012 10:21:03 +0100 Subject: geo-rep / syncdaemon: determine suitable xattr namespace based on privilege Change-Id: I91fe16d7e5e4c21f138eab4ee0b9334aec40e41b BUG: 765433 Signed-off-by: Csaba Henk Reviewed-on: http://review.gluster.com/2838 Tested-by: Gluster Build System Reviewed-by: Venky Shankar --- xlators/features/marker/utils/syncdaemon/syncdutils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/features/marker/utils/syncdaemon/syncdutils.py') diff --git a/xlators/features/marker/utils/syncdaemon/syncdutils.py b/xlators/features/marker/utils/syncdaemon/syncdutils.py index b91b328b965..11c2063b750 100644 --- a/xlators/features/marker/utils/syncdaemon/syncdutils.py +++ b/xlators/features/marker/utils/syncdaemon/syncdutils.py @@ -225,6 +225,9 @@ def getusername(uid = None): uid = os.geteuid() return pwd.getpwuid(uid).pw_name +def privileged(): + return os.geteuid() == 0 + def boolify(s): """ Generic string to boolean converter -- cgit