Re: Support required to fix for vulnerable component in busybox
On Fri, 17 Jun 2022 09:02:10 + "Bhardava, Bharatkumar [AUTOSOL/MSOL/IN]" wrote: > I am using BusyBox(version: 1.23.2) in one of ours device. As there > is vulnerability present in awk applet, I need patch for the same. That version is pretty old, so I'd upgrade. Also, which vulnerability exactly are you referring to, is it already known and perhaps patched in the latest version? Uli ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
Re: grep: add option for better usability in pipelines
On Thu, 17 Feb 2022 08:32:06 +0800 Kang-Che Sung wrote: > On Thu, Feb 17, 2022 at 8:01 AM Ulrich Eckhardt > wrote: > > Now, for an example where it makes a difference. Consider a Bash > > script like this: > > > > # enable automatic error handling > > set -eo pipefail > > # check for string "issues" in a logfile > > cat logfile | grep issue | sort --unique > > > > If there are no issues in the logs, grep return exit code 1 and the > > shell interprets this as an error and exits itself. > > > > Why do we need to implement a workaround in grep while you can > do this in shell to ignore the exit code of grep? > > { grep issue > I've implemented that feature here, though it lacks tests yet: > > https://github.com/UlrichEckhardt/busybox/tree/grep-pipe-option > > Also, I'm currently trying to get the same feature into GNU grep as > > well, the long form `--pipe` is used there. I've also considered > > `--filter` (because it only filters) as alternative. I'm not fully > > happy with either one, maybe someone here comes up with a better > > suggestion. > > I don't see the '--pipe' option in GNU grep manual > <https://www.gnu.org/software/grep/manual/grep.html> Misunderstanding: It's not in there! I have it implemented already and I'm trying to get it incorporated there, which takes time due to FSF paperwork. Cheers! Uli ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox
grep: add option for better usability in pipelines
Greetings! I've implemented a `-p` flag for grep, which disables a behaviour that the exit status is used (abused?) to signal whether any match occurred. In many cases, you won't notice this. Also, in many cases, shell scripts don't check for errors. Now, for an example where it makes a difference. Consider a Bash script like this: # enable automatic error handling set -eo pipefail # check for string "issues" in a logfile cat logfile | grep issue | sort --unique If there are no issues in the logs, grep return exit code 1 and the shell interprets this as an error and exits itself. I've implemented that feature here, though it lacks tests yet: https://github.com/UlrichEckhardt/busybox/tree/grep-pipe-option Also, I'm currently trying to get the same feature into GNU grep as well, the long form `--pipe` is used there. I've also considered `--filter` (because it only filters) as alternative. I'm not fully happy with either one, maybe someone here comes up with a better suggestion. If you want, grab the first commit in there, it just fixes a small typo. I'd be happy to hear any suggestions! Cheers! Uli ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox