Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 743349 Details for
Bug 812869
OpenRC shouldn't export its own PATH variable to the environment.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
lib-rc-sh-functions.patch
lib-rc-sh-functions.patch (text/plain), 1.92 KB, created by
kfm
on 2021-10-06 01:33:48 UTC
(
hide
)
Description:
lib-rc-sh-functions.patch
Filename:
MIME Type:
Creator:
kfm
Created:
2021-10-06 01:33:48 UTC
Size:
1.92 KB
patch
obsolete
>--- functions-old.sh 2021-10-06 03:11:15.578990727 +0200 >+++ functions.sh 2021-10-06 03:29:15.221016478 +0200 >@@ -55,21 +55,6 @@ > rc-status --runlevel > } > >-_sanitize_path() >-{ >- local IFS=":" p= path= >- for p in $PATH; do >- case "$p" in >- /lib/rc/bin|/lib/rc/sbin);; >- /bin|/sbin|/usr/bin|/usr/sbin);; >- /usr/bin|/usr/sbin);; >- /usr/local/bin|/usr/local/sbin);; >- *) path="$path${path:+:}$p";; >- esac >- done >- echo "$path" >-} >- > # Allow our scripts to support zsh > if [ -n "$ZSH_VERSION" ]; then > emulate sh >@@ -78,27 +63,30 @@ > setopt NO_GLOB_SUBST > fi > >-# Make a sane PATH >-_PREFIX= >-_PKG_PREFIX=/usr >-_LOCAL_PREFIX=/usr/local >-_LOCAL_PREFIX=${_LOCAL_PREFIX:-/usr/local} >-_PATH=/lib/rc/bin >-case "$_PREFIX" in >- "$_PKG_PREFIX"|"$_LOCAL_PREFIX") ;; >- *) _PATH="$_PATH:$_PREFIX/bin:$_PREFIX/sbin";; >-esac >-_PATH="$_PATH":/bin:/sbin:/usr/bin:/usr/sbin > >-if [ -n "$_PKG_PREFIX" ]; then >- _PATH="$_PATH:$_PKG_PREFIX/bin:$_PKG_PREFIX/sbin" >-fi >-if [ -n "$_LOCAL_PREFIX" ]; then >- _PATH="$_PATH:$_LOCAL_PREFIX/bin:$_LOCAL_PREFIX/sbin" >-fi >-_path="$(_sanitize_path "$PATH")" >-PATH="$_PATH${_path:+:}$_path" ; export PATH >-unset _sanitize_path _PREFIX _PKG_PREFIX _LOCAL_PREFIX _PATH _path >+# Make a sane PATH. We begin with a standard, fixed value that is suitable for >+# a system manager. Next, /lib/rc/bin is prepended and any paths defined by the >+# existing value of PATH are appended, provided they are deemed safe and do not >+# duplicate any of the standard paths. >+standard_path=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin >+standard_path=/lib/rc/bin:$standard_path >+PATH=$standard_path$( >+ IFS=: >+ set -f >+ for p in $PATH; do >+ # Disregard empty and relative paths >+ case $p in >+ /*) ;; >+ *) continue ;; >+ esac >+ # Ensure that it doesn't duplicate any of the standard paths >+ case :$standard_path: in >+ *:"$p":*) ;; >+ *) printf %s ":$p" ;; >+ esac >+ done >+) >+unset standard_path > > for arg; do > case "$arg" in
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 812869
:
739653
| 743349