You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/04/18 05:06:15 UTC

DO NOT REPLY [Bug 34493] New: - jsvc's spec ?(jsvc does not make directory (supplement group) )

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34493>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34493

           Summary: jsvc's spec ?(jsvc does not make  directory (supplement
                    group) )
           Product: Commons
           Version: unspecified
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Daemon
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: abekiti@mbp.ocn.ne.jp
                CC: abekiti@mbp.ocn.ne.jp


running tomcat under enviroment;

OS:SunOS 5.7
Java:java 1.4.2_07
Tomcat:4.1.31
Jsvc:1.0 (start up user abekiti)
user:abekiti
group:abekiti(first), nobody(suppliment)

If java program(servlet ) will make directory "/target/test1/test2",  java
program does not make "/target/test1/test2" directory.

cf. java.io.File mkdir or mkdirs
/target/test1   (this direstory abekiti:nobody 775 )

I try to make this direcotry by shell.
%> su - abekiti
%>mkdir -p /target/test1/test2
result is ok.

I read daemon-1.0/src/native/unix/native/jsvc-unix.c
jsvc does not set supplement group(by system call
setgroups or initgroups)

Is this jsvc's spec? 
security reason?
I don't know this reason. Because I don't make unix daemon program.

I need to tomcat make supplement group directory.
I collected jsvc-unix.c.

/* user and group */
static int set_user_group(char *user, int uid, int gid)
{
    if (user!=NULL) {


        if (setgid(gid)!=0) {
            log_error("Cannot set group id for user '%s'",user);
            return(-1);
        }
        if (initgroups(user, gid)!=0) {
            log_error("Cannot set supplement group list for user '%s'",user);
            return(-1);
        }
        if (setuid(uid)!=0) {
            log_error("Cannot set user id for user '%s'",user);
            return(-1);
        }

        log_debug("user changed to '%s'",user);
    }
    return(0);
}

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org