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

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