From: Fabian Keil Date: Thu, 7 Nov 2013 15:11:32 +0000 (+0000) Subject: Let --with-group properly deal with secondary groups X-Git-Tag: v_3_0_22~221 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=cd1a3b9bf3680c2213277af0dba6241772e2e186 Let --with-group properly deal with secondary groups Patch submitted by Anatoly Arzhnikov in #3615187. --- diff --git a/configure.in b/configure.in index df879e9f..0b4de0a2 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl $Id: configure.in,v 1.179 2013/03/01 17:40:18 fabiankeil Exp $ +dnl $Id: configure.in,v 1.180 2013/03/20 11:25:52 fabiankeil Exp $ dnl dnl Written by and Copyright (C) 2001-2010 the dnl Privoxy team. http://www.privoxy.org/ @@ -32,7 +32,7 @@ dnl ================================================================= dnl AutoConf Initialization dnl ================================================================= -AC_REVISION($Revision: 1.179 $) +AC_REVISION($Revision: 1.180 $) AC_INIT(jcc.c) if test ! -f config.h.in; then @@ -211,12 +211,14 @@ else AC_MSG_RESULT($with_group) $BGROUPS $USER >/dev/null if test $? -eq 0 ; then - # FIXME: this fails if valid group, but not first group - # listed. - if test "$with_group" != "`$BGROUPS $USER | sed 's/.*: //' 2>/dev/null |$AWK '{print $1}'`" ; then + for i in `$BGROUPS $USER | sed 's/.*: //' 2>/dev/null`; do + if test "x$i" = "x$with_group" ; then + GROUP=$with_group + break + fi + done + if test "x$GROUP" != "x$with_group" ; then AC_MSG_ERROR(The given value '$withval' does not match group entry) - else - GROUP=$with_group; fi else AC_MSG_ERROR(There is no group entry for user '$USER')