diff options
Diffstat (limited to 'xlators/features/marker/utils/syncdaemon/syncdutils.py')
-rw-r--r-- | xlators/features/marker/utils/syncdaemon/syncdutils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/syncdutils.py b/xlators/features/marker/utils/syncdaemon/syncdutils.py index 6a08fbdaf..f82f412a0 100644 --- a/xlators/features/marker/utils/syncdaemon/syncdutils.py +++ b/xlators/features/marker/utils/syncdaemon/syncdutils.py @@ -1,5 +1,6 @@ import os import sys +import pwd import time import fcntl import shutil @@ -216,3 +217,8 @@ class Thread(baseThread): class GsyncdError(Exception): pass + +def getusername(uid = None): + if uid == None: + uid = os.geteuid() + return pwd.getpwuid(uid).pw_name |