Assuming that every platform has 'id', wouldn't something like this be
better for the configure script vs. checking /etc/passwd itself?


--- configure.in.orig   2002-11-05 12:34:14.000000000 -0500
+++ configure.in        2002-11-05 13:20:34.000000000 -0500
@@ -256,13 +256,19 @@

 AM_CONDITIONAL(USE_PTHREAD, test "$have_pthreads" = "yes")

-dnl Check for user clamav in /etc/passwd
+dnl Check for clamav user and group

 if test "$test_clamav" = "yes"
 then
-    if test -r /etc/passwd; then
-       clamavuser=`cat /etc/passwd|grep clamav`
-       clamavgroup=`cat /etc/group|grep clamav`
+    id clamav > /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:"`
+       else
+           clamavgroup=`cat /etc/group|grep clamav`
+       fi

        if test "$use_netinfo" = "yes"
        then


I know I can disable the check with --disable-clamav, but I do want to
verify that the account and group exist even though they're stored in LDAP.

I use Linux and nss_ldap (http://www.padl.com/OSS/nss_ldap.html) is
what makes 'id' and 'getent group' work for the LDAP accounts and groups.
If there's an 'id' equivalent for groups (other than using getent from
glibc), someone please remind me what it is.

  Jason

-- 
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