Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603806 - net-irc/shadowircd: init script should use checkpath instead of mkdir/chown/chmod
Summary: net-irc/shadowircd: init script should use checkpath instead of mkdir/chown/c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-26 23:39 UTC by Michael Orlitzky
Modified: 2017-07-24 14:55 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-26 23:39:22 UTC
The init script for shadowircd creates its own "run" directory:

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

A single call to "checkpath" from OpenRC would be more appropriate here. It's more portable, being part of OpenRC, and more secure: chown/chmod will follow symlinks and hardlinks, but checkpath won't.