[Aide] Configure aide for /boot only verification on encrypted root system

service at remekmotorok.com service at remekmotorok.com
Sun Jan 27 22:50:12 EET 2008


Greetings,

For anyone interested, I located the problem within the configure file.

The command
./configure.modified --prefix=/ --sysconfdir=/ --with-config-file=aide.conf
 should build aide to have all its file in ~/, but it does not.
 From memory, the above example was producing the error: file://aide.db 
not found or was looking for it in /etc.

At line 9041 in configure the code is:
if test "x$sysconfdir" != x'${prefix}/etc'; then
    evalled_sysconfdir=`eval echo "$sysconfdir"`
    default_db="$evalled_sysconfdir/aide.db"
    default_db_out="$evalled_sysconfdir/aide.db.new"
elif test "x$prefix" != xNONE; then
    default_db="$prefix/etc/aide.db"
    default_db_out="$prefix/etc/aide.db.new"
else
    default_db="$ac_default_prefix/etc/aide.db"
    default_db_out="$ac_default_prefix/etc/aide.db.new"
fi

I am not a C programmer, so this looks alien to me (Pascal, Basic, and 
Fortran are my skills.)
As written, something is not escaped right and it ends up looking for // 
or /etc rather than just /

To make it work for me (all files in the same directory), I mangled the 
code like this:
if test "x$sysconfdir" != x'${prefix}/etc'; then
    evalled_sysconfdir=`eval echo "$sysconfdir"`
    default_db="aide.db"
    default_db_out="aide.db.new"
elif test "x$prefix" != xNONE; then
    default_db="aide.db"
    default_db_out="aide.db.new"
else
    default_db="aide.db"
    default_db_out="aide.db.new"
fi
In this case, no matter what is passed with a variable, it gives the 
results I need.

Can some one take a look and let me know the correct way to code this?

Thanks,
Cheers!






More information about the Aide mailing list