Mailinglist Archive: opensuse (3666 mails)

< Previous Next >
Re: [SLE] rkhunter-1.2.2-1.noarch.rpm
  • From: Mike McMullin <mwmcmlln@xxxxxxxx>
  • Date: Mon, 21 Mar 2005 16:37:25 -0500
  • Message-id: <1111441043.7254.7.camel@xxxxxxxxxxxxxx>
On Mon, 2005-03-21 at 05:19, Paul Hewlett wrote:
> On Monday 21 March 2005 08:13, Mike McMullin wrote:
> > I dl'ed the file and installed it via yast. rkhunter-1.0.5.tar.gz had
> > been installed using the installer.sh file in the archive and not
> > removed.
> >
> > I ran it with the following result :
> >
> > sudo /usr/bin/rkhunter -c
> >
> >
> > Rootkit Hunter 1.2.2 is running
> >
> > Determining OS... Ready
> > /usr/bin/rkhunter: line 2061: [: /var/rkhunter/tmp: binary operator
> > expected
> >
> > line 2060-2063 read : {
> >
> > if [ -d ${TMPDIR} ]
> > then
> > } (braces indicate start/end of code)
> >
> > /var/rkhunter/tmp is an empty directory.
> >
> > Any ideas as to what misfired and why?
> > (BTW later on in the script rkhunter.upd files will be put here, so this
> > ought to be a directory and not a file.)
>
> The environment variable TMPDIR is not defined. Try defining it :
>
> export TMPDIR=/tmp
> rkhunter -c
>
> You will have to be super-user.

Thanks Paul, this did work, and complained with the following:
Warning! Using /tmp as your temporary directory can be a security risk!
See logfile for more information about this issue.

Oddly enough if you look at the script it references the
/etc/rkhuntedr.conf file which defines TMPDIR twice.

from the script :
# Check configuration file
if [ "${CONFIGFILE}" = "" ]
then
if [ -f /etc/rkhunter.conf ]
then
CONFIGFILE="/etc/rkhunter.conf"
else
CONFIGFILE="/usr/local/etc/rkhunter.conf"
fi
fi

from /etc/rkhunter.conf:
## Next three lines installed automatically by RPM. Do not change
## unless you know what you're doing...
INSTALLDIR=/usr
DBDIR=/var/rkhunter/db
TMPDIR=/var/rkhunter/tmp

[...]

# Use a custom temporary directory (you can override it with the
# --tmpdir parameter)
#TMPDIR=/tmp
TMPDIR=/tmp

I guess this is a question for the author at this point.

Mike



< Previous Next >