mountd: Fixed strcmp usage in in insert groups.
authorMatthew Treinish <treinish@linux.vnet.ibm.com>
Wed, 3 Aug 2011 17:10:14 +0000 (13:10 -0400)
committerSteve Dickson <steved@redhat.com>
Wed, 3 Aug 2011 17:41:37 +0000 (13:41 -0400)
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 <treinish@linux.vnet.ibm.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mountd/mountd.c

index 035624c..bcf5080 100644 (file)
@@ -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));