summarylogtreecommitdiffstats
path: root/deheader_use-system-python.patch
blob: f46a2935d8f4c4c1cfff71caf89ff6bb559275de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From c14978acf7cc42d6fe9fa1c91adaf771610f43cf Mon Sep 17 00:00:00 2001
From: Jonas Witschel <diabonas@gmx.de>
Date: Tue, 15 Oct 2019 17:51:25 +0200
Subject: [PATCH] Force use of the system Python 3 interpreter

This avoids PATH manipulation attacks and is encouraged by PEP 394.
---
 deheader      | 2 +-
 test/Makefile | 5 -----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/deheader b/deheader
index 6e8ed47..ba10088 100755
--- a/deheader
+++ b/deheader
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 """\
 deheader -- find (optionally remove) unneeded includes in C or C++ sourcefiles.
 
diff --git a/test/Makefile b/test/Makefile
index 0ac42f9..f6fc9ef 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -4,13 +4,8 @@ SOURCES = $(shell ls *.c)
 
 regress:
 	@echo "Testing deheader: no output is good news."
-	@./setpython python2
 	@-../deheader -v -v . >/tmp/regress
 	@diff -u regress.chk /tmp/regress
-	@./setpython python3
-	@-../deheader -v -v . >/tmp/regress
-	@diff -u regress.chk /tmp/regress
-	@./setpython python
 	@rm /tmp/regress 
 makeregress:
 	@-../deheader -v -v . >regress.chk
-- 
2.28.0