Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602650 - net-analyzer/smokeping: ebuild improvements
Summary: net-analyzer/smokeping: ebuild improvements
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-14 15:05 UTC by Michael Orlitzky
Modified: 2022-09-18 21:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Orlitzky gentoo-dev 2016-12-14 15:05:29 UTC
The ebuilds for smokeping do one thing that is *really* suspicious:

  if use apache2 ; then
      fowners apache:apache /var/lib/${PN}/.simg
      fowners -R apache:apache /var/www
  else
      ...

Smokeping installs to /var/www/localhost, but /var/www doesn't belong to it. That's a common location where web hosts keep their site directories, e.g.

  /var/www/example.com/www
  /var/www/example.net/git

Changing ownership of that whole tree to apache:apache can be disastrous.

Some other minor issues: the calls to "rm" and "mv" need "|| die", and the pkg_postinst() stuff looks like it's already performed in src_install().
Comment 1 nic 2021-09-19 20:38:39 UTC
Hello- These adjustments seem more sensible, although I am not running apache myself to validate further. Could there be collisions with localhost/cgi-bin too?

    if use apache2 ; then
        fowners apache:apache /var/lib/${PN}/.simg
        fowners -R apache:apache /var/www/localhost/${PN}
        fowners -R apache:apache /var/www/localhost/cgi-bin
    else
Comment 2 Jonas Stein gentoo-dev 2021-12-01 21:52:53 UTC
|| die was added