From: Matthew Treinish Date: Wed, 3 Aug 2011 17:10:14 +0000 (-0400) Subject: mountd: Fixed strcmp usage in in insert groups. X-Git-Tag: debian/1%1.2.5-1~11^2~39 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=99d9d6e00a325dd876ac11052c1acaeea5cf35f5;p=nfs-utils.git mountd: Fixed strcmp usage in in insert groups. Fixed the usage of strcmp in the duplicate check in insert groups. Fixes an issue with showmount and other commands that required the group information. Signed-off-by: Matthew Treinish Signed-off-by: Steve Dickson --- diff --git a/utils/mountd/mountd.c b/utils/mountd/mountd.c index 035624c..bcf5080 100644 --- a/utils/mountd/mountd.c +++ b/utils/mountd/mountd.c @@ -633,7 +633,7 @@ static void insert_group(struct exportnode *e, char *newname) struct groupnode *g; for (g = e->ex_groups; g; g = g->gr_next) - if (strcmp(g->gr_name, newname)) + if (!strcmp(g->gr_name, newname)) return; g = xmalloc(sizeof(*g));