From 8a69db3ab734542f83cd1e9812c7d1abdac0521a Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 16 Jun 2018 17:28:42 +0000 Subject: [PATCH] Update: Allow running as root IF Icecast has PID=1 --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index ccf8d0ef..fe12b3a1 100644 --- a/src/main.c +++ b/src/main.c @@ -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");