summaryrefslogtreecommitdiff
blob: 5a9566b916767cd773d385322ee1399c9649b9b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- daemon-1.0.1/src/native/unix/native/jsvc-unix.c.orig	2007-01-20 12:08:52.000000000 +0100
+++ daemon-1.0.1/src/native/unix/native/jsvc-unix.c	2007-01-20 12:12:35.000000000 +0100
@@ -475,7 +475,7 @@
 
 #ifdef OS_LINUX
     /* setuid()/setgid() only apply the current thread so we must do it now */
-    if (linuxset_user_group(args->user,uid,gid)!=0)
+    if (getuid()==0 && linuxset_user_group(args->user,uid,gid)!=0)
             return(4);
 #endif
     /* Initialize the Java VM */