summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/marker/utils/syncdaemon/resource.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/marker/utils/syncdaemon/resource.py b/xlators/features/marker/utils/syncdaemon/resource.py
index 7083b56cf..f157b1907 100644
--- a/xlators/features/marker/utils/syncdaemon/resource.py
+++ b/xlators/features/marker/utils/syncdaemon/resource.py
@@ -1,6 +1,7 @@
import re
import os
import sys
+import pwd
import stat
import time
import errno
@@ -446,7 +447,7 @@ class SSH(AbstractUrl, SlaveRemote):
if m:
u, h = m.groups()
else:
- u, h = os.getlogin(), self.remote_addr
+ u, h = pwd.getpwuid(os.geteuid()).pw_name, self.remote_addr
remote_addr = '@'.join([u, socket.gethostbyname(h)])
return ':'.join([remote_addr, self.inner_rsc.get_url(canonical=True)])