]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_cdsa_utilities/lib/acl_threshold.cpp
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / libsecurity_cdsa_utilities / lib / acl_threshold.cpp
index 17e568f91165dd6e06c078f1685d441437d74008..9d45cd8e353083b2a160e8909724eb4d56169cac 100644 (file)
@@ -53,7 +53,7 @@ public:
     const TypedList &sampleList;
 };
 
-bool ThresholdAclSubject::validate(const AclValidationContext &baseCtx,
+bool ThresholdAclSubject::validates(const AclValidationContext &baseCtx,
     const TypedList &sample) const
 {
 #ifdef STRICTCOUNTING
@@ -71,7 +71,7 @@ bool ThresholdAclSubject::validate(const AclValidationContext &baseCtx,
     SublistValidationContext ctx(baseCtx, sample);
     uint32 matched = 0;
     for (uint32 n = 0; n < totalSubjects; n++) {
-               if ((matched += elements[n]->validate(ctx)) >= minimumNeeded)
+               if ((matched += elements[n]->validates(ctx)) >= minimumNeeded)
             return true;
 #ifdef STRICTCOUNTING
         else if (matched + subSampleCount - n <= minimumNeeded)
@@ -112,8 +112,9 @@ ThresholdAclSubject *ThresholdAclSubject::Maker::make(const TypedList &list) con
     // now compile the subSubjects
     AclSubjectVector elements(totalSubjects);
     const ListElement *subSubject = &list[3];
-    for (uint32 n = 0; n < totalSubjects; n++, subSubject = subSubject->next())
+    for (uint32 n = 0; n < totalSubjects; n++, subSubject = subSubject->next()) {
         elements[n] = ObjectAcl::make(subSubject->typedList());
+    }
        return new ThresholdAclSubject(totalSubjects, minimumNeeded, elements);
 }
 
@@ -156,7 +157,7 @@ void ThresholdAclSubject::exportBlob(Writer &pub, Writer &priv)
 
 void ThresholdAclSubject::add(AclSubject *subject, unsigned beforePosition)
 {
-       secdebug("threshacl", "adding subject %p before position %u",
+       secinfo("threshacl", "adding subject %p before position %u",
                subject, beforePosition);
        elements.insert(elements.begin() + beforePosition, subject);
        totalSubjects++;