1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-07 18:30:54 +00:00

Merge pull request #1830 from pbiering/fix-1826

Fix issue 1826
This commit is contained in:
Peter Bieringer 2025-07-20 12:56:59 +02:00 committed by GitHub
commit 2a134061c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -9,6 +9,7 @@
* Fix: logging ignores not retrievable get_native_id if not supported by OS
* Fix: report with enabled expand honors now provided filter proper
* Improve: add options [logging] trace_on_debug and trace_filter for supporting trace logging
* Fix: catch case where getpwuid is not returning a username
## 3.5.4
* Improve: item filter enhanced for 3rd level supporting VALARM and honoring TRIGGER (offset or absolute)

View file

@ -225,7 +225,12 @@ def user_groups_as_string():
if sys.platform != "win32":
euid = os.geteuid()
egid = os.getegid()
username = pwd.getpwuid(euid)[0]
try:
username = pwd.getpwuid(euid)[0]
except Exception:
# name of user not found
s = "user=(%d) group=(%d)" % (euid, egid)
return s
gids = os.getgrouplist(username, egid)
groups = []
for gid in gids: