Kerstin Puschke
2010-Mar-22 11:14 UTC
[Logcheck-devel] [PATCH] commit 941a3c38cccde0b30dfd3b641e40f6a6f35ce3b3 Author: Kerstin Puschke <kpuschke@zedat.fu-berlin.de> Date: Wed Mar 17 18:58:27 2010 +0100
logcheck cd's to $STATEDIR before cleaning up temp dir Now you can run logcheck as a user who has no permissions for /var/lib/logcheck (where logcheck used to cd to) Signed-off-by: Kerstin Puschke <kpuschke at zedat.fu-berlin.de> --- src/logcheck | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/logcheck b/src/logcheck index 2bc0995..3622f95 100755 --- a/src/logcheck +++ b/src/logcheck @@ -108,7 +108,7 @@ cleanup() { if [ -d "$TMPDIR" ]; then # Remove the tmp directory if [ "$NOCLEANUP" -eq 0 ];then - cd /var/lib/logcheck + cd $STATEDIR debug "cleanup: Removing - $TMPDIR" rm -r "$TMPDIR" else -- 1.6.6.1
Hannes von Haugwitz
2010-Apr-13 07:48 UTC
[Logcheck-devel] [PATCH] commit 941a3c38cccde0b30dfd3b641e40f6a6f35ce3b3 Author: Kerstin Puschke <kpuschke@zedat.fu-berlin.de> Date: Wed Mar 17 18:58:27 2010 +0100
Applied to git, thanks for contribution. Greetings Hannes Kerstin Puschke wrote:> logcheck cd's to $STATEDIR before cleaning up temp dir > > Now you can run logcheck as a user who has no permissions for /var/lib/logcheck (where logcheck used to cd to) > > Signed-off-by: Kerstin Puschke <kpuschke at zedat.fu-berlin.de> > --- > src/logcheck | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/logcheck b/src/logcheck > index 2bc0995..3622f95 100755 > --- a/src/logcheck > +++ b/src/logcheck > @@ -108,7 +108,7 @@ cleanup() { > if [ -d "$TMPDIR" ]; then > # Remove the tmp directory > if [ "$NOCLEANUP" -eq 0 ];then > - cd /var/lib/logcheck > + cd $STATEDIR > debug "cleanup: Removing - $TMPDIR" > rm -r "$TMPDIR" > else