Unverified Commit 51716ed4 authored by anarcat's avatar anarcat
Browse files

ud-replicate: fix crash when exim is not installed

Without this, ud-replicate aborts halfway through with:

root@submit-01:/var/lib/misc# ud-replicate
receiving file list ... done
submit-01.torproject.org/last_update.trace

sent 44 bytes  received 936 bytes  1,960.00 bytes/sec
total size is 245,745  speedup is 250.76
chown: invalid group: ‘root:Debian-exim’

... unless exim4 is installed, which is not the case in the Tor
Project (we use Postfix).

There are similar guards elsewhere in the code, it seems it's just an
oversight in this case.

This issue only applies to hosts that do not have Exim installed *and*
are SMTP submission servers.

debian.org also has hosts that don't have Exim installed (lists and
salsa both use Postifx) and ud-replicate works fine on them (because
the code in question is never attempted on them).
parent 81d0512e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ if [ -e ${HOST}/web-passwords ]; then
	chmod 0640 ${HOST}/web-passwords
fi

if [ -e "${HOST}/mail-passwords" ]; then
if [ -d "/etc/exim4" ] && [ -e "${HOST}/mail-passwords" ]; then
    chown root:Debian-exim "${HOST}/mail-passwords"
    chmod 0440 "${HOST}/mail-passwords"
fi