mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
radicale: [NEW] Python-based CalDAV/CardDAV Server
Inspired by OpenWrt Ticket System Ticket 9119 Python3 package currently marked as @BROKEN because no time for testing. Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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(+)
|
||||
|
||||
diff --git a/bin/radicale b/bin/radicale
|
||||
index 619aca5..7466020 100755
|
||||
--- a/bin/radicale
|
||||
+++ b/bin/radicale
|
||||
@@ -26,6 +26,13 @@ Launch the server according to configuration and command-line options.
|
||||
|
||||
"""
|
||||
|
||||
+# 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__
|
||||
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
||||
Reference in New Issue
Block a user