| Summary: | dev-java/commons-daemon - two jsvc bugs | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Simone Piunno <pioppo> |
| Component: | Current packages | Assignee: | Java team <java> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Simone Piunno
2007-01-20 12:54:54 UTC
(In reply to comment #0) > https://issues.apache.org/jira/browse/DAEMON-24 From http://jakarta.apache.org/commons/daemon/jsvc.html "Jsvc is a daemon process so it should be started as root and the -user parameter allows to downgrade to an unprivilegded user." So I don't see much point for the second patch as the whole purpose of jsvc is to first run as root to be able to bind to privileged ports etc. Please correct me if I am wrong. (In reply to comment #0) > https://issues.apache.org/jira/browse/DAEMON-24 Also I don't think your patch will be added any time soon as you attached it to a resolved bug that was about documentation. It would be the same as me attaching a commons-daemon version bump to this bug. You should open a new bug in the upstream bug tracker with your patch attached. (In reply to comment #0) > jsvc has two bugs on linux: > - fails when called a relative path (does execve on argv[0]) > - fails to set capabilities when called as non-root. > Please take a look at > https://issues.apache.org/jira/browse/DAEMON-92 https://issues.apache.org/jira/browse/DAEMON-92#action_12467164 For me execve works just fine with relative paths. I think there is no reason jsvc shoulnd't work as non root and haven't verified but looking at the code I believe on other platforms it does. Even if the initial intent was to build a tool to be used just as root, I think this could be an easy improvement. Following your suggestion, I opened a new issue: https://issues.apache.org/jira/browse/DAEMON-93 With regard to execve you are right execve works for relative paths, my analisys was wrong. Real cause is execve does not search in $PATH. My patch is still valid as a fix. Patches committed. The execve patch seems to already be a part of trunk. I will likely wait until upstream comments on the uid patch before going stable with a version with these patches. Thanks for reporting. |