You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jf...@apache.org on 2005/05/09 18:00:49 UTC
svn commit: r169335 -
/jakarta/commons/proper/daemon/trunk/src/native/unix/native/jsvc-unix.c
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org