diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-28 19:48:00 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-28 19:48:00 +0000 |
commit | b2930c3b16d71c6e992377764d5a8db78010de68 (patch) | |
tree | 6b792b1c8c58ca962cda45ba353b242bab13c3fe /bin/isolated-functions.sh | |
parent | a13ddbb7028bab249dafbdf95d558a59d44d7632 (diff) | |
download | portage-b2930c3b16d71c6e992377764d5a8db78010de68.tar.gz portage-b2930c3b16d71c6e992377764d5a8db78010de68.tar.bz2 portage-b2930c3b16d71c6e992377764d5a8db78010de68.zip |
Even though the message is split on $'\n' in elog_base(), it's still
not entirely safe to use it as a delimiter in the log file since
there can still be escaped newlines that will be expanded due to
the echo -e parameter.
svn path=/main/trunk/; revision=11244
Diffstat (limited to 'bin/isolated-functions.sh')
-rwxr-xr-x | bin/isolated-functions.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index e9ce37cde..56381ce8a 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -170,10 +170,14 @@ elog_base() { return 1 ;; esac + # Note: Even though the message is split on $'\n' here, it's still + # not entirely safe to use it as a delimiter in the log file since + # there can still be escaped newlines that will be expanded due to + # the echo -e parameter. save_IFS IFS=$'\n' for line in $* ; do - echo -ne "${messagetype} ${line}\n" >> \ + echo -ne "${messagetype} ${line}\n\0" >> \ "${T}/logging/${EBUILD_PHASE:-other}" done restore_IFS |