From 5568ef6e8d4363ea76ff03862fa78d763afea87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 17 Mar 2008 10:11:48 +0000 Subject: [PATCH] activate-configuration: Report it if a setuid program was not found. svn path=/nixos/trunk/; revision=11152 --- system/activate-configuration.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/system/activate-configuration.sh b/system/activate-configuration.sh index 1e2eb44acadf..e2e6ddcbbb6f 100644 --- a/system/activate-configuration.sh +++ b/system/activate-configuration.sh @@ -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