From: Tomas Janousek (no email)
Date: Mon Sep 17 2007 - 13:07:35 EDT
Hi,
On Mon, Sep 17, 2007 at 10:15:25AM -0400, Ken Murchison wrote:
> Can you explain the use of:
>
> if (pwd || groupids[ngroups] != gid)
Yes. It's linked to the line which reads:
> gid = pwd ? pwd->pw_gid : (gid_t) -1;
If pwd is non-NULL, we supply the gid and expect (and want) it to appear in
the list. If not, we expect -1 to appear in the list a we filter it out.
-- Tomas Janousek, SW Engineer, Red Hat, Inc.
|
|
|