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.

30 lines
679 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. diff --git a/bin/radicale b/bin/radicale
  8. index 619aca5..7466020 100755
  9. --- a/bin/radicale
  10. +++ b/bin/radicale
  11. @@ -26,6 +26,13 @@ Launch the server according to configuration and command-line options.
  12. """
  13. +# inserted to run as user radicale
  14. +import pwd, grp, os
  15. +uid = pwd.getpwnam('radicale').pw_uid
  16. +gid = grp.getgrnam('radicale').gr_gid
  17. +os.setegid(gid)
  18. +os.seteuid(uid)
  19. +
  20. import radicale.__main__
  21. --
  22. 2.1.0