]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_cdsa_utilities/lib/cssmaclpod.cpp
Security-58286.270.3.0.1.tar.gz
[apple/security.git] / OSX / libsecurity_cdsa_utilities / lib / cssmaclpod.cpp
index 96a32b50be92e84244148196df97f0483a21adea..347971db7896ce5129be18719ab636e51713db59 100644 (file)
@@ -71,12 +71,17 @@ void AuthorizationGroup::destroy(Allocator &alloc)
 {
        alloc.free(AuthTags);
 }
-
+       
 bool AuthorizationGroup::contains(CSSM_ACL_AUTHORIZATION_TAG tag) const
 {
        return find(AuthTags, &AuthTags[NumberOfAuthTags], tag) != &AuthTags[NumberOfAuthTags];
 }
 
+bool AuthorizationGroup::containsOnly(CSSM_ACL_AUTHORIZATION_TAG tag) const
+{
+       return count() == 1 && (*this)[0] == tag;
+}
+
 
 AuthorizationGroup::operator AclAuthorizationSet() const
 {