activate-configuration: Report it if a setuid program was not found.
svn path=/nixos/trunk/; revision=11152
This commit is contained in:
parent
465a66ab3f
commit
5568ef6e8d
@ -135,6 +135,15 @@ mkdir -p $wrapperDir
|
|||||||
for i in @setuidPrograms@; do
|
for i in @setuidPrograms@; do
|
||||||
program=$(type -tp $i)
|
program=$(type -tp $i)
|
||||||
cp "$(type -tp setuid-wrapper)" $wrapperDir/$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
|
echo -n $program > $wrapperDir/$i.real
|
||||||
chown root.root $wrapperDir/$i
|
chown root.root $wrapperDir/$i
|
||||||
chmod 4755 $wrapperDir/$i
|
chmod 4755 $wrapperDir/$i
|
||||||
|
Loading…
Reference in New Issue
Block a user