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.

17 lines
415 B

  1. --- a/src/libs/zbxnix/daemon.c
  2. +++ b/src/libs/zbxnix/daemon.c
  3. @@ -300,11 +300,14 @@ int daemon_start(int allow_root, const c
  4. if (0 == allow_root && 0 == getuid()) /* running as root? */
  5. {
  6. +#if 0
  7. +/* allow changing user and foreground */
  8. if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND))
  9. {
  10. zbx_error("cannot run as root!");
  11. exit(EXIT_FAILURE);
  12. }
  13. +#endif
  14. if (NULL == user)
  15. user = "zabbix";