[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] svlogd: strip leading '!' from processor lines
From: Denys Vlasenko <vda.linux () googlemail ! com>
Date: 2016-09-15 12:05:32
Message-ID: CAK1hOcPf9O6Y6dCdW0apCLgw+xA84QGQFJUWteBy_HQ60GbnBg () mail ! gmail ! com
[Download RAW message or body]
applied, thanks!
On Wed, Sep 14, 2016 at 2:21 PM, Peter Korsgaard <jacmet@sunsite.dk> wrote:
>>>>>> "Francis" == Francis Rounds <Francis.Rounds@4bridgeworks.com> writes:
>
> > When using svlogd's processor functionality to run arbitrary commands
> > on log rotation, the line in the config is executed verbatim, i.e. the
> > exclamation mark is included.
>
> > For example, if the config file contains:
>
> > s100
> > !cat
>
> > then when it's time to rotate the log files after each 100 bytes, sh -c
> > "!cat" will be run, instead of sh -c "cat" as intended. The result is
> > svlogd logging
>
> > /bin/bash: !cat: command not found
> > svlogd: warning: processor failed, restart: /tmp/svlogd/
>
> > over and over again as it keeps attempting to execute the processor and
> > failing (unless you happen to have a "!cat" binary around :)).
>
> > Skipping the exclamation mark when performing the wstrdup() fixes the
> > issue.
>
> > Signed-off-by: Francis Rounds <francis.rounds@4bridgeworks.com>
>
> Argh, indeed :/
>
> Acked-by: Peter Korsgaard <peter@korsgaard.com>
>
> --
> Bye, Peter Korsgaard
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic