nwrap: Don't fail if we want to add an existing entry
authorAndreas Schneider <asn@samba.org>
Tue, 24 Nov 2015 16:32:47 +0000 (17:32 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:32 +0000 (12:25 +0100)
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
lib/nss_wrapper/nss_wrapper.c

index a080b808f54b112932f6f17a684f7560eb60bb2e..f48b9cc7e8d65d1f992a014d8dad80fc2ed833a8 100644 (file)
@@ -2622,12 +2622,14 @@ static bool nwrap_ed_inventarize_add_to_existing(struct nwrap_entdata *const ed,
        for (cursor = el; cursor->next != NULL; cursor = cursor->next)
        {
                if (cursor->ed == ed) {
-                       return false;
+                       /* The entry already exists in this list. */
+                       return true;
                }
        }
 
        if (cursor->ed == ed) {
-               return false;
+               /* The entry already exists in this list. */
+               return true;
        }
 
        el_new = nwrap_entlist_init(ed);