Author: jfclere
Date: Mon May 9 09:00:47 2005
New Revision: 169335
URL: http://svn.apache.org/viewcvs?rev=169335&view=rev
Log:
Allow initgroups() to fail if we are already the user requested.
(That is to allow testing without beeing root).
Modified:
jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
Modified: jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
URL:
http://svn.apache.org/viewcvs/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c?rev=169335&r1=169334&r2=169335&view=diff
==============================================================================
--- jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
(original)
+++ jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c Mon
May 9 09:00:47 2005
@@ -90,8 +90,11 @@
return(-1);
}
if (initgroups(user, gid)!=0) {
- log_error("Cannot set supplement group list for user '%s'",user);
- return(-1);
+ if (getuid()!= uid) {
+ log_error("Cannot set supplement group list for user
'%s'",user);
+ return(-1);
+ } else
+ log_debug("Cannot set supplement group list for user
'%s'",user);
}
if (setuid(uid)!=0) {
log_error("Cannot set user id for user '%s'",user);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]