Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603262 - net-irc/charybdis: init script should use checkpath instead of mkdir/chown/chmod
Summary: net-irc/charybdis: init script should use checkpath instead of mkdir/chown/chmod
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2017-07-05
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2016-12-20 22:54 UTC by Michael Orlitzky
Modified: 2017-07-05 10:50 UTC (History)
0 users

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-20 22:54:50 UTC
The init script for charybdis uses mkdir, chown, and chmod to create and set permissions on its runtime directory:

  start() {
      if ! [ -d /var/run/charybdis ]; then
          ebegin "Creating /var/run/charybdis for ${SVCNAME}"
          mkdir /var/run/charybdis \
            && chown :charybdis /var/run/charybdis \
            && chmod 770 /var/run/charybdis
          eend $?
      fi

Using "checkpath" (man openrc-run) is more portable (it's part of OpenRC), and slightly more secure. The chown/chmod utilities follow symlinks, so if root:root ever loses control of that path, the charybdis user can replace /var/run/charybdis with a symlink and gain ownership of the target.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-06-05 16:20:25 UTC
# Michał Górny <mgorny@gentoo.org> (05 Jun 2017)
# (on behalf of Treecleaner project)
# Unmaintained in Gentoo. Security vulnerability.
# Removal in 30 days. Bug #562896.
net-irc/charybdis
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-07-05 10:50:39 UTC
commit b6e6234008767ec82ed0fb1642b3f933d94e5f8f
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Wed Jul 5 12:32:14 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Wed Jul 5 12:35:23 2017

    net-irc/charybdis: Remove last-rited pkg, #562896