Run --verify-config before start/reload/restart as root. No longer su - to

debian-tor tor run it.  Given that we now even start Tor as root (it setuids
later on) this should be fine (closes: #468566).


svn:r13788
This commit is contained in:
Peter Palfrader 2008-03-01 00:51:37 +00:00
parent 0b95e987b1
commit 9b582af28a
2 changed files with 10 additions and 2 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
tor (0.2.0.20-rc-1+XX) XXperimental; urgency=low
* Run --verify-config before start/reload/restart as root. No longer
su - to debian-tor tor run it. Given that we now even start Tor as
root (it setuids later on) this should be fine (closes: #468566).
-- Peter Palfrader <weasel@debian.org> Sat, 1 Mar 2008 01:49:58 +0100
tor (0.2.0.20-rc-1) experimental; urgency=low tor (0.2.0.20-rc-1) experimental; urgency=low
* New upstream version. * New upstream version.

4
debian/tor.init vendored
View File

@ -90,9 +90,9 @@ check_torpiddir () {
} }
check_config () { check_config () {
if ! su -s /bin/sh -c "$DAEMON --verify-config" debian-tor > /dev/null; then if ! "$DAEMON --verify-config" > /dev/null; then
echo "ABORTED: Tor configuration invalid:" >&2 echo "ABORTED: Tor configuration invalid:" >&2
su -s /bin/sh -c "$DAEMON --verify-config" debian-tor >&2 $DAEMON --verify-config >&2
exit 1 exit 1
fi fi
} }