[Pkg-clamav-devel] pkg-clamav : possible error in clamav-base.config.in

Stephen Gran sgran at debian.org
Tue Jun 9 23:01:00 UTC 2009


This one time, at band camp, Romain Dartigues said:
> 2009/6/9 Stephen Gran <sgran at debian.org>:
> > On Tue, Jun 09, 2009 at 11:03:00AM -0400, Romain Dartigues said:
> >> Good day,
> >>
> >> i'd like to report a possible error in debian/clamav-base.config.in;
> >> if i should proceed in another fashion, please le me know how.
> >> ::
> >>     AddGroups=`groups "$User" | awk -F ':' '{print $2}' | sed -e s/"$User"//`
> >>
> >> As far as i know, the command "groups" does not print any ":" if used
> >> with one user (and "$User" is quoted), so:
> >
> > steve at varinia:~$ groups
> > steve root adm mail dialout cdrom floppy audio dip video plugdev games users netdev fuse powerdev libvirt nvram
> > steve at varinia:~$ groups steve
> > steve : steve root adm mail dialout cdrom floppy audio dip video plugdev games users netdev fuse powerdev libvirt nvram
> >
> > So, I'm not sure why you're seeing the output you are, but I'm not.
> 
> You are right, it seem's the ":" is a characteristic of Debian and RedHat.
> I had the "issue" on Ubuntu (8.04) and since on Ubuntu and my
> Slackware "groups" have the same behavior, i assumed it was universal.

> I'll report it to the Ubuntu community; but maybe you could, then,
> patch it with:
> AddGroups=`groups "$User" | sed -e 's/^.*: \?//g' -e s/"$User"//`
> 
> It should support both forms.
> 
> For information
> 
> user at ubuntu-8.04: groups --version
> groups (GNU coreutils) 6.10
> ...
> Written by David MacKenzie.
> 
> user at slackware-12.0: groups --version
> groups (GNU coreutils) 6.9

I'm still having a little trouble with this.  That code is roughly 5
years old, and it would had to have silently not worked for a stretch of
at least several months without anyone noticing, which I find very hard
to believe.  The fact that you're the first person to see this in Ubuntu
despite it being a Debian downstream for the last several years is also
difficult to understand.  Are you sure you don't have some locally
installed version of coreutils or something?  I am completely sure that
check has been there for the lifespan of both of those coreutils version
(roughly 2007 - 2008).  All this being said, the sed patch looks
reasonable, albeit much less readable.  I am not happy about giving up
readability without a reason, and so far I don't understand the reason.

Cheers,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran at debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-clamav-devel/attachments/20090610/e13bc261/attachment.pgp>


More information about the Pkg-clamav-devel mailing list