[ovs-dev] [v3 01/10] lib/daemon: add function to switch daemon user at run time

Ben Pfaff blp at nicira.com
Fri Sep 18 19:13:42 UTC 2015


On Thu, Sep 17, 2015 at 10:05:22PM -0700, Ansis Atteka wrote:
> > +static bool
> > +gid_equal(const gid_t expected, const gid_t value)
> 
> Really minor since I am not sure if there are conventions that we have
> to follow, but this is not a true _equal function because
> gid_equal(a,b) != git_equal(b,a) if a == -1 and b ==1
> 
> I would:
> 1. rename it to something else, like gid_matches(); OR
> 2. make a function comment explaining this behavior.

I especially like suggestion #1.



More information about the dev mailing list