We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9e8d4e commit eb3afc4Copy full SHA for eb3afc4
intelmq/lib/utils.py
@@ -692,6 +692,7 @@ def drop_privileges() -> bool:
692
"""
693
if os.geteuid() == 0:
694
try:
695
+ os.setgroups([group.gr_gid for group in grp.getgrall() if 'intelmq' in group.gr_mem])
696
os.setgid(grp.getgrnam('intelmq').gr_gid)
697
os.setuid(pwd.getpwnam('intelmq').pw_uid)
698
except (OSError, KeyError):
0 commit comments