You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
567 B

Subject: [PATCH] Run as user radicale and group radicale
Patch to run Radicale service as radicale:radicale non root user
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
---
bin/radicale | 7 +++++++
1 file changed, 7 insertions(+)
--- a/bin/radicale
+++ b/bin/radicale
@@ -26,6 +26,13 @@ Launch the server according to configura
"""
+# inserted to run as user radicale
+import pwd, grp, os
+uid = pwd.getpwnam('radicale').pw_uid
+gid = grp.getgrnam('radicale').gr_gid
+os.setegid(gid)
+os.seteuid(uid)
+
import radicale.__main__