activate-configuration: Report it if a setuid program was not found.

svn path=/nixos/trunk/; revision=11152
This commit is contained in:
Ludovic Courtès 2008-03-17 10:11:48 +00:00
parent 465a66ab3f
commit 5568ef6e8d

View File

@ -135,6 +135,15 @@ mkdir -p $wrapperDir
for i in @setuidPrograms@; do
program=$(type -tp $i)
cp "$(type -tp setuid-wrapper)" $wrapperDir/$i
if [ -z "$program" ]
then
# XXX: It would be preferable to detect this problem before
# `activate-configuration' is invoked.
echo "WARNING: No executable named \`$i' was found" >&2
echo "WARNING: but \`$i' was specified as a setuid program." >&2
fi
echo -n $program > $wrapperDir/$i.real
chown root.root $wrapperDir/$i
chmod 4755 $wrapperDir/$i