quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH 2/2] inspect: Complain if wrapper script can't be exe


From: Jean Delvare
Subject: [Quilt-dev] [PATCH 2/2] inspect: Complain if wrapper script can't be executed
Date: Tue, 17 Jan 2012 21:23:11 +0100
User-agent: KMail/1.12.4 (Linux/2.6.32.49-0.3-pae; KDE/4.3.5; i686; ; )

inspect: Complain if wrapper script can't be executed.

There is no guarantee that the wrapper script can be executed.
For example user can mount their temporary directories with noexec
for security reasons. Instead of failing with no explanation,
complain when this situation is detected.
---
 quilt/scripts/inspect.in |   11 +++++++++++
 1 file changed, 11 insertions(+)

--- a/quilt/scripts/inspect.in
+++ b/quilt/scripts/inspect.in
@@ -317,7 +317,18 @@ cat <<-'EOF' > $tmpdir/bin/wrapper
            ${0##*/} "$@" < $tmpdir/data
        fi
 EOF
+
 chmod 755 $tmpdir/bin/wrapper
+# If $TMPDIR is mounted with noexec, rpmbuild won't be able to execute
+# our wrapper script
+if [ ! -x $tmpdir/bin/wrapper ]
+then
+       printf "Cannot execute %s; filesystem mounted with noexec?\n" \
+              $tmpdir/bin/wrapper >&2
+       printf "Setting %s in ~/.quiltrc may help\n" "VARTMPDIR" >&2
+       exit 1
+fi
+
 ln -s wrapper $tmpdir/bin/patch
 ln -s wrapper $tmpdir/bin/tar
 

-- 
Jean Delvare
Suse L3



reply via email to

[Prev in Thread] Current Thread [Next in Thread]