Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 603806

Summary: net-irc/shadowircd: init script should use checkpath instead of mkdir/chown/chmod
Product: Gentoo Linux Reporter: Michael Orlitzky <mjo>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=540006
Whiteboard:
Package list:
Runtime testing required: ---

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.