1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

Update: Allow running as root IF Icecast has PID=1

This commit is contained in:
Philipp Schafft 2018-06-16 17:28:42 +00:00
parent cc0f62df89
commit 8a69db3ab7

View File

@ -563,7 +563,7 @@ int main(int argc, char **argv)
#ifdef HAVE_SETUID
/* We'll only have getuid() if we also have setuid(), it's reasonable to
* assume */
if(!getuid()) /* Running as root! Don't allow this */
if(!getuid() && getpid() != 1) /* Running as root! Don't allow this */
{
fprintf(stderr, "ERROR: You should not run icecast2 as root\n");
fprintf(stderr, "Use the changeowner directive in the config file\n");