diff options
author | roy <roy@pkgsrc.org> | 2011-04-19 14:28:28 +0000 |
---|---|---|
committer | roy <roy@pkgsrc.org> | 2011-04-19 14:28:28 +0000 |
commit | 289b9ed60e2bce6c20f814077d21d52c19e33730 (patch) | |
tree | 983d65cdd78080486a8b2564e52307db8b569f2f | |
parent | 7e7030c4b842dd5c106438a2417f3fe3a9cdab41 (diff) | |
download | pkgsrc-289b9ed60e2bce6c20f814077d21d52c19e33730.tar.gz |
Disallow the use of env(1) as an interpreter.
-rw-r--r-- | mk/check/check-interpreter.mk | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mk/check/check-interpreter.mk b/mk/check/check-interpreter.mk index 85ee10b7ba8..f2883e1b431 100644 --- a/mk/check/check-interpreter.mk +++ b/mk/check/check-interpreter.mk @@ -1,10 +1,14 @@ -# $NetBSD: check-interpreter.mk,v 1.25 2011/01/11 12:03:18 obache Exp $ +# $NetBSD: check-interpreter.mk,v 1.26 2011/04/19 14:28:28 roy Exp $ # # This file checks that after installation, all files of the package # that start with a "#!" line will find their interpreter. Files that # have a "#!" line with a non-existent interpreter will generate an # error message if they are executable, and a warning message otherwise. # +# Files are not allowed to use /bin/env or /usr/bin/env as an interpreter +# due the use dynamic paths and package developers not checking that they work. +# A classic example is: #!/usr/bin/env python +# # User-settable variables: # # CHECK_INTERPRETER @@ -62,7 +66,8 @@ _check-interpreter: error-check .PHONY continue; \ }; \ case "$$interp" in \ - "") continue; \ + "") continue;; \ + /bin/env|/usr/bin/env) ${DELAYED_ERROR_MSG} "[check-interpreter.mk] The interpreter \"$$interp\" of \"${DESTDIR}${PREFIX}/$$file\" is not allowed.";; \ esac; \ \ if { [ ! -f ${DESTDIR:Q}"$$interp" ] && \ |