mirror of
https://github.com/Kozea/Radicale.git
synced 2025-10-03 21:20:45 +00:00
This commit is contained in:
parent
1704302d54
commit
d050096bbb
1 changed files with 6 additions and 1 deletions
|
@ -225,7 +225,12 @@ def user_groups_as_string():
|
||||||
if sys.platform != "win32":
|
if sys.platform != "win32":
|
||||||
euid = os.geteuid()
|
euid = os.geteuid()
|
||||||
egid = os.getegid()
|
egid = os.getegid()
|
||||||
|
try:
|
||||||
username = pwd.getpwuid(euid)[0]
|
username = pwd.getpwuid(euid)[0]
|
||||||
|
except:
|
||||||
|
# name of user not found
|
||||||
|
s = "user=(%d) group=(%d)" % (euid, egid)
|
||||||
|
return s
|
||||||
gids = os.getgrouplist(username, egid)
|
gids = os.getgrouplist(username, egid)
|
||||||
groups = []
|
groups = []
|
||||||
for gid in gids:
|
for gid in gids:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue