SOURCES: rc-scripts-clean-env.patch - simple variant, no escaping ...
glen
glen at pld-linux.org
Tue Feb 7 19:17:05 CET 2006
Author: glen Date: Tue Feb 7 18:17:05 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- simple variant, no escaping - assume passed env contains just path components
---- Files affected:
SOURCES:
rc-scripts-clean-env.patch (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SOURCES/rc-scripts-clean-env.patch
diff -u SOURCES/rc-scripts-clean-env.patch:1.2 SOURCES/rc-scripts-clean-env.patch:1.3
--- SOURCES/rc-scripts-clean-env.patch:1.2 Fri Jan 27 18:54:53 2006
+++ SOURCES/rc-scripts-clean-env.patch Tue Feb 7 19:17:00 2006
@@ -1,25 +1,26 @@
---- rc-scripts-0.4.0.25/rc.d/init.d/functions 2006-01-27 19:10:12.000000000 +0200
-+++ /tmp/functions 2006-01-27 19:54:10.000000000 +0200
-@@ -522,8 +522,22 @@
+--- rc-scripts-0.4.0.25/rc.d/init.d/functions 2006-02-07 20:15:00.000000000 +0200
++++ /tmp/functions 2006-02-07 20:15:50.000000000 +0200
+@@ -522,8 +522,23 @@
# And start it up.
busy
cd /
+
+ # copy the allowed environment variables
-+ local E v
++ local pass_env v
+ for i in $ALLOWED_ENV PATH TERM LANG; do
-+ v=$(eval echo '$'$i | sed -e 's,",\\",g')
++ v=$(printenv "$i")
++
+ [ "$v" ] || continue
-+ E="$E $i=\"$v\""
++ pass_env="$pass_env $i=$v"
+ done
+
is_yes "$CPUSETS" && [ -n "$SERVICE_CPUSET" ] && echo $$ > "/dev/cpuset/${SERVICE_CPUSET}/tasks"
- if errors=$(umask ${SERVICE_UMASK:-$DEFAULT_SERVICE_UMASK}; USER=root HOME=/tmp TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$prog" 2>&1); then
+ if errors=$(
+ umask ${SERVICE_UMASK:-$DEFAULT_SERVICE_UMASK};
-+ USER=root HOME=/tmp TMPDIR=/tmp \
++ USER=root HOME=/tmp TMPDIR=/tmp \
+ nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} \
-+ initlog -c "env -i $E $prog" 2>&1
++ env -i $pass_env initlog -c "$prog" 2>&1
+ ); then
if [ -n "$waitname" -a -n "$waittime" ]; then
# Save basename.
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/rc-scripts-clean-env.patch?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list