> Wed Nov 20 01:15:48 CET 2002
> -----------------------------
>   * configure: --enable-id-check - it uses the check procedure from Jason
>                Englander, currently it will fail on systems with getent,
>                if it doesn't detect clamav group.

I must've been having a real bad day at the time because the patch
against 0.53 that I posted to the list is broken.  ...unless
of course I'm having a bad day today too, then nevermind :-)

Here's an updated patch against 0.54's configure.in that should fix it and
I also replaced a few static clamav's in there with
$clamav_user/$clamav_group.  I've verified that this works on a Linux box
where the user and group are in LDAP and on another Linux box where they
were in /etc/passwd and /etc/group.

id's errorlevel (well, the one from GNU sh-utils anyway) is 0 for
success and 1 for failure so this was wrong:

  if test "$?" != 0 ; then

and this should be checking to see if the length of $GETENT is _non_-zero
(-n) instead of zero (-z):

  if test -z "$GETENT" ; then

No idea how/why I did that.  Temporary logical dyslexia?  ;-)  I apologize
to anyone that tried --with-id-check and had it fail for no apparent
reason.


--- configure.in.orig   2002-11-22 17:45:39.000000000 -0500
+++ configure.in        2002-11-22 17:48:06.000000000 -0500
@@ -288,14 +288,14 @@
        fi
     else
        AC_MSG_RESULT(Checking id output...)
-       id clamav > /dev/null 2>&1
-       if test "$?" != 0 ; then
+       id $clamav_user > /dev/null 2>&1
+       if test "$?" = 0 ; then
            clamavuser=1
            AC_PATH_PROG(GETENT, getent)
-           if test -z "$GETENT" ; then
-               clamavgroup=`$GETENT group | grep "^clamav:"`
+           if test -n "$GETENT" ; then
+               clamavgroup=`$GETENT group | grep "^${clamav_group}:"`
            else
-               clamavgroup=`cat /etc/group|grep clamav`
+               clamavgroup=`cat /etc/group|grep $clamav_group`
            fi
        fi
     fi


-- 
Jason Englander <[EMAIL PROTECTED]>
394F 7E02 C105 7268 777A  3F5A 0AC0 C618 0675 80CA


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Reply via email to