1 |
Author: ulm |
2 |
Date: 2009-09-08 12:11:14 +0000 (Tue, 08 Sep 2009) |
3 |
New Revision: 641 |
4 |
|
5 |
Modified: |
6 |
trunk/ChangeLog |
7 |
trunk/NEWS |
8 |
trunk/modules/env.eselect |
9 |
Log: |
10 |
Make parsing of files in env.d more robust, fixes bug 283932. |
11 |
|
12 |
|
13 |
Modified: trunk/ChangeLog |
14 |
=================================================================== |
15 |
--- trunk/ChangeLog 2009-08-27 20:10:11 UTC (rev 640) |
16 |
+++ trunk/ChangeLog 2009-09-08 12:11:14 UTC (rev 641) |
17 |
@@ -1,3 +1,9 @@ |
18 |
+2009-09-08 Ulrich Mueller <ulm@g.o> |
19 |
+ |
20 |
+ * modules/env.eselect (create_profile_env): Ignore leading |
21 |
+ "export" in env files, fixes bug 283932. Accept only valid shell |
22 |
+ identifiers as variable names. |
23 |
+ |
24 |
2009-08-27 Ulrich Mueller <ulm@g.o> |
25 |
|
26 |
* configure.ac: Update version to 1.2. |
27 |
|
28 |
Modified: trunk/NEWS |
29 |
=================================================================== |
30 |
--- trunk/NEWS 2009-08-27 20:10:11 UTC (rev 640) |
31 |
+++ trunk/NEWS 2009-09-08 12:11:14 UTC (rev 641) |
32 |
@@ -1,6 +1,10 @@ |
33 |
This file contains a summary of changes in released versions. Please read the |
34 |
ChangeLog file for a more detailed listing of changes/bug fixes. |
35 |
|
36 |
+trunk: |
37 |
+ Bug fixes: |
38 |
+ - Fixed bug #283932: Make parsing of files in env.d more robust. |
39 |
+ |
40 |
1.2: |
41 |
Bug fixes: |
42 |
- Fixed bug #280598: POSIX compliant basename and dirname functions. |
43 |
|
44 |
Modified: trunk/modules/env.eselect |
45 |
=================================================================== |
46 |
--- trunk/modules/env.eselect 2009-08-27 20:10:11 UTC (rev 640) |
47 |
+++ trunk/modules/env.eselect 2009-09-08 12:11:14 UTC (rev 641) |
48 |
@@ -103,8 +103,11 @@ |
49 |
|
50 |
# Which vars are to be loaded? |
51 |
# TODO: Change to bash magic? |
52 |
- vars=$(sed \ |
53 |
- -e '/^#/d' -e '/^\s*$/d' -e '/^.*=/s/^\([^=]*\)=.*/\1/' \ |
54 |
+ vars=$(LC_ALL=C sed \ |
55 |
+ -e 's/^\s*//' \ |
56 |
+ -e 's/^export\s\+//' \ |
57 |
+ -e '/^[[:alpha:]_]\w*=/!d' \ |
58 |
+ -e 's/=.*//' \ |
59 |
${envfile}) |
60 |
[[ -z ${vars} ]] && continue |
61 |
for var in ${vars} ; do |