1 |
Author: zmedico |
2 |
Date: 2008-03-02 23:28:12 +0000 (Sun, 02 Mar 2008) |
3 |
New Revision: 9417 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.2/bin/ebuild.sh |
7 |
main/branches/2.1.2/bin/filter-bash-environment.py |
8 |
Log: |
9 |
Bug #211949 - As suggested by vapier, tighten the variable filter to also |
10 |
exclude variable names that begin with a digit or that contain any |
11 |
non-alphanumeric characters that are not be supported by bash. (trunk r9416) |
12 |
|
13 |
|
14 |
Modified: main/branches/2.1.2/bin/ebuild.sh |
15 |
=================================================================== |
16 |
--- main/branches/2.1.2/bin/ebuild.sh 2008-03-02 23:26:42 UTC (rev 9416) |
17 |
+++ main/branches/2.1.2/bin/ebuild.sh 2008-03-02 23:28:12 UTC (rev 9417) |
18 |
@@ -1388,8 +1388,9 @@ |
19 |
# with names that are known to cause interference: |
20 |
# |
21 |
# * some specific variables for which bash does not allow assignment |
22 |
-# * any variables with names containing a hyphen (not allowed by bash) |
23 |
# * some specific variables that affect portage or sandbox behavior |
24 |
+# * variable names that begin with a digit or that contain any |
25 |
+# non-alphanumeric characters that are not be supported by bash |
26 |
# |
27 |
# --filter-sandbox causes all SANDBOX_* variables to be filtered, which |
28 |
# is only desired in certain cases, such as during preprocessing or when |
29 |
@@ -1418,7 +1419,8 @@ |
30 |
SANDBOX_DEBUG_LOG SANDBOX_DISABLED SANDBOX_LIB |
31 |
SANDBOX_LOG SANDBOX_ON" |
32 |
filtered_vars="${readonly_bash_vars} ${READONLY_PORTAGE_VARS} |
33 |
- BASH_[_[:alnum:]]* PATH [-_[:alnum:]]*-[-_[:alnum:]]*" |
34 |
+ BASH_[_[:alnum:]]* PATH |
35 |
+ [[:digit:]][_[:alnum:]]* [_[:alnum:]]*[^_[:alnum:]][_[:alnum:]]*" |
36 |
if hasq --filter-sandbox $* ; then |
37 |
filtered_vars="${filtered_vars} SANDBOX_[_[:alnum:]]*" |
38 |
else |
39 |
|
40 |
Modified: main/branches/2.1.2/bin/filter-bash-environment.py |
41 |
=================================================================== |
42 |
--- main/branches/2.1.2/bin/filter-bash-environment.py 2008-03-02 23:26:42 UTC (rev 9416) |
43 |
+++ main/branches/2.1.2/bin/filter-bash-environment.py 2008-03-02 23:28:12 UTC (rev 9417) |
44 |
@@ -7,6 +7,7 @@ |
45 |
|
46 |
egrep_compat_map = { |
47 |
"[:alnum:]" : r'\w', |
48 |
+ "[:digit:]" : r'\d', |
49 |
"[:space:]" : r'\s', |
50 |
} |
51 |
|
52 |
|
53 |
-- |
54 |
gentoo-commits@l.g.o mailing list |