[Adduser-devel] deluser code "this needs to be fixed"

Marc Haber mh+adduser-devel@zugschlus.de
Thu, 25 Mar 2004 13:44:35 +0100


On Thu, Mar 25, 2004 at 01:32:58PM +0100, Roland Bauerschmidt wrote:
> Marc Haber wrote:
> >     # This need to be fixed
> >     if(system("grep", "-q", "^.*:.*:.*:$gr_gid:.*:.*:.*\$", "/etc/passwd") == 0) {
> >         dief (_("There are users having %s' as primary group!\n"),$group);
> >     }
> > 
> > Can you explain the comment? Do you mean that this needs to be
> > rewritten using getpwent?
> 
> Yes, definitely. I don't remember though, why that's not the case.

Probably to ease load on the NIS/LDAP server? I fear that we need to
iterate through all users here?

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Karlsruhe, Germany |  lose things."    Winona Ryder | Fon: *49 721 966 32 15
Nordisch by Nature |  How to make an American Quilt | Fax: *49 721 966 31 29