Summary: | net-analyzer/centreon - centreon init script causes ods to start as root | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeff Mills <hybiepoo> |
Component: | New packages | Assignee: | Gentoo Web Application Packages Maintainers <web-apps> |
Status: | RESOLVED CANTFIX | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Jeff Mills
2008-10-30 21:56:31 UTC
Here is a change to the init script that makes ods run as the nagios user. #!/sbin/runscript # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/centreon/files/ods.initd,v 1.1 2008/03/28 18:38:07 hollow Exp $ depend() { need mysql } start() { ebegin "Starting OreonDataStorage (ODS)" start-stop-daemon --start --pidfile /var/run/ods/ods.pid \ --chuid nagios \ --background \ --exec /usr/sbin/ods \ --group nagios eend } stop() { ebegin "Stopping OreonDataStorage (ODS)" start-stop-daemon --stop --pidfile /var/run/ods/ods.pid \ --user nagios eend } from the s-s-d help text: -c, --chuid <arg> deprecated, use --user (In reply to comment #2) > from the s-s-d help text: > -c, --chuid <arg> deprecated, use --user > Interesting! Perhaps there is some other issue with the ods init script then, because it definitely starts ods as the root user. It caused me many headaches before I realised what was going on. start-stop-daemon --help shows this: -c|--chuid <name|uid[:group|gid]> change to this user/group before starting process -u|--user <username>|<uid> stop processes owned by this user To me, this tells me that --user is used to "stop processes owned by this user", not to start the process as this user! Closing as CANTFIX, the package is not any more in the main tree. |