nwrap: Don't fail if we want to add an existing entry
[obnox/samba/samba-obnox.git] / 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);