003-change-user-and-foreground.patch (415B)
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 5 if (0 == allow_root && 0 == getuid()) /* running as root? */ 6 { 7 +#if 0 8 +/* allow changing user and foreground */ 9 if (0 != (flags & ZBX_TASK_FLAG_FOREGROUND)) 10 { 11 zbx_error("cannot run as root!"); 12 exit(EXIT_FAILURE); 13 } 14 +#endif 15 16 if (NULL == user) 17 user = "zabbix";