r1.5 of ldapctl.c accidentally inverted the conditionals meant to skip
compacting or indexing namespaces with referrals.

ok?

Index: ldapctl.c
===================================================================
RCS file: /cvs/src/usr.sbin/ldapctl/ldapctl.c,v
retrieving revision 1.15
diff -u -p -u -p -r1.15 ldapctl.c
--- ldapctl.c   15 Jan 2021 18:57:04 -0000      1.15
+++ ldapctl.c   15 Dec 2021 03:29:36 -0000
@@ -128,8 +128,8 @@ compact_namespaces(const char *datadir)
        struct namespace        *ns;
 
        TAILQ_FOREACH(ns, &conf->namespaces, next) {
-               if (SLIST_EMPTY(&ns->referrals))
-                   continue;
+               if (!SLIST_EMPTY(&ns->referrals))
+                       continue;
                if (compact_namespace(ns, datadir) != 0)
                        return -1;
        }
@@ -224,7 +224,7 @@ index_namespaces(const char *datadir)
        struct namespace        *ns;
 
        TAILQ_FOREACH(ns, &conf->namespaces, next) {
-               if (SLIST_EMPTY(&ns->referrals))
+               if (!SLIST_EMPTY(&ns->referrals))
                        continue;
                if (index_namespace(ns, datadir) != 0)
                        return -1;

Reply via email to