2 * Copyright (c) 2000-2004,2006,2011-2014 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
26 // objectacl - core implementation of an ACL-bearing object
28 #include <security_cdsa_utilities/objectacl.h>
29 #include <security_cdsa_utilities/cssmbridge.h>
30 #include <security_utilities/endian.h>
31 #include <security_utilities/debugging.h>
35 #include <security_cdsa_utilities/acl_preauth.h> //@@@ impure - will be removed
37 using namespace DataWalkers
;
41 // The static map of available ACL subject makers.
42 // These are the kinds of ACL subjects we can deal with.
44 ModuleNexus
<ObjectAcl::MakerMap
> ObjectAcl::makers
;
48 // Create an ObjectAcl
50 ObjectAcl::ObjectAcl(Allocator
&alloc
) : allocator(alloc
), mNextHandle(1)
54 ObjectAcl::ObjectAcl(const AclEntryPrototype
&proto
, Allocator
&alloc
)
55 : allocator(alloc
), mNextHandle(1)
57 cssmSetInitial(proto
);
60 ObjectAcl::~ObjectAcl()
65 // Set an "initial ACL" from a CSSM-style initial ACL argument.
66 // This will replace the owner, as well as replace the entire ACL
67 // with a single-item slot, as per CSSM specification.
69 void ObjectAcl::cssmSetInitial(const AclEntryPrototype
&proto
)
71 mOwner
= OwnerEntry(proto
);
72 add(proto
.s_tag(), proto
);
73 IFDUMPING("acl", debugDump("create/proto"));
76 void ObjectAcl::cssmSetInitial(const AclSubjectPointer
&subject
)
78 mOwner
= OwnerEntry(subject
);
80 IFDUMPING("acl", debugDump("create/subject"));
83 ObjectAcl::Entry::~Entry()
89 // ObjectAcl::validate validates an access authorization claim.
90 // Returns normally if 'auth' is granted to the bearer of 'cred'.
91 // Otherwise, throws a suitable (ACL-related) CssmError exception.
93 bool ObjectAcl::validates(AclAuthorization auth
, const AccessCredentials
*cred
,
94 AclValidationEnvironment
*env
)
96 BaseValidationContext
ctx(cred
, auth
, env
);
97 return validates(ctx
);
100 bool ObjectAcl::validates(AclValidationContext
&ctx
)
102 // make sure we are ready to go
105 IFDUMPING("acleval", Debug::dump("<<WANT(%d)<", ctx
.authorization()));
107 //@@@ should pre-screen based on requested auth, maybe?
109 #if defined(ACL_OMNIPOTENT_OWNER)
110 // try owner (owner can do anything)
111 if (mOwner
.validates(ctx
))
113 #endif //ACL_OMNIPOTENT_OWNER
115 // try applicable ACLs
116 pair
<EntryMap::const_iterator
, EntryMap::const_iterator
> range
;
117 if (getRange(ctx
.s_credTag(), range
) == 0) {
119 secinfo("SecAccess", "no tag for cred tag: \"%s\"", ctx
.s_credTag().c_str());
120 CssmError::throwMe(CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND
);
122 // try each entry in turn
123 for (EntryMap::const_iterator it
= range
.first
; it
!= range
.second
; it
++) {
124 const AclEntry
&slot
= it
->second
;
125 IFDUMPING("acleval", (Debug::dump(" EVAL["), slot
.debugDump(), Debug::dump("]")));
126 if (slot
.authorizes(ctx
.authorization())) {
127 ctx
.init(this, slot
.subject
);
128 ctx
.entryTag(slot
.tag
);
129 if (slot
.validates(ctx
)) {
130 IFDUMPING("acleval", Debug::dump(">PASS>>\n"));
131 return true; // passed
133 IFDUMPING("acleval", Debug::dump(" NO"));
136 IFDUMPING("acleval", Debug::dump(">FAIL>>\n"));
137 return false; // no joy
140 void ObjectAcl::validate(AclAuthorization auth
, const AccessCredentials
*cred
,
141 AclValidationEnvironment
*env
)
143 if (!validates(auth
, cred
, env
))
144 CssmError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED
);
147 void ObjectAcl::validate(AclValidationContext
&ctx
)
150 CssmError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED
);
154 void ObjectAcl::validateOwner(AclAuthorization authorizationHint
,
155 const AccessCredentials
*cred
, AclValidationEnvironment
*env
)
157 BaseValidationContext
ctx(cred
, authorizationHint
, env
);
161 void ObjectAcl::validateOwner(AclValidationContext
&ctx
)
165 ctx
.init(this, mOwner
.subject
);
166 if (mOwner
.validates(ctx
))
168 CssmError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED
);
173 // Export an ObjectAcl to two memory blobs: public and private data separated.
174 // This is a standard two-pass size+copy operation.
176 void ObjectAcl::exportBlob(CssmData
&publicBlob
, CssmData
&privateBlob
)
179 Writer::Counter pubSize
, privSize
;
180 Endian
<uint32
> entryCount
= (uint32
)mEntries
.size();
181 mOwner
.exportBlob(pubSize
, privSize
);
183 for (EntryMap::iterator it
= begin(); it
!= end(); it
++)
184 it
->second
.exportBlob(pubSize
, privSize
);
185 publicBlob
= CssmData(allocator
.malloc(pubSize
), pubSize
);
186 privateBlob
= CssmData(allocator
.malloc(privSize
), privSize
);
187 Writer
pubWriter(publicBlob
), privWriter(privateBlob
);
188 mOwner
.exportBlob(pubWriter
, privWriter
);
189 pubWriter(entryCount
);
190 for (EntryMap::iterator it
= begin(); it
!= end(); it
++)
191 it
->second
.exportBlob(pubWriter
, privWriter
);
192 IFDUMPING("acl", debugDump("exported"));
197 // Import an ObjectAcl's contents from two memory blobs representing public and
198 // private contents, respectively. These blobs must have been generated by the
200 // Prior contents (if any) are deleted and replaced.
202 void ObjectAcl::importBlob(const void *publicBlob
, const void *privateBlob
)
204 Reader
pubReader(publicBlob
), privReader(privateBlob
);
205 mOwner
.importBlob(pubReader
, privReader
);
206 Endian
<uint32
> entryCountIn
; pubReader(entryCountIn
);
207 uint32 entryCount
= entryCountIn
;
209 mEntries
.erase(begin(), end());
210 for (uint32 n
= 0; n
< entryCount
; n
++) {
212 newEntry
.importBlob(pubReader
, privReader
);
213 add(newEntry
.tag
, newEntry
);
215 IFDUMPING("acl", debugDump("imported"));
220 // Import/export helpers for subjects.
221 // This is exported to (subject implementation) callers to maintain consistency
222 // in binary format handling.
224 AclSubject
*ObjectAcl::importSubject(Reader
&pub
, Reader
&priv
)
226 Endian
<uint32
> typeAndVersion
; pub(typeAndVersion
);
227 return make(typeAndVersion
, pub
, priv
);
232 // Setup/update hooks
234 void ObjectAcl::instantiateAcl()
236 // nothing by default
239 void ObjectAcl::changedAcl()
241 // nothing by default
246 // ACL utility methods
248 unsigned int ObjectAcl::getRange(const std::string
&tag
,
249 pair
<EntryMap::const_iterator
, EntryMap::const_iterator
> &range
, bool tolerant
/* = false */) const
251 if (!tag
.empty()) { // tag restriction in effect
252 secinfo("SecAccess", "looking for ACL entries matching tag: \"%s\"", tag
.c_str());
253 range
= mEntries
.equal_range(tag
);
254 unsigned int count
= (unsigned int)mEntries
.count(tag
);
255 if (count
== 0 && !tolerant
)
256 CssmError::throwMe(CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND
);
258 } else { // try all tags
259 secinfo("SecAccess", "no tag given; looking for all ACL entries");
260 range
.first
= mEntries
.begin();
261 range
.second
= mEntries
.end();
262 return (unsigned int)mEntries
.size();
266 ObjectAcl::EntryMap::iterator
ObjectAcl::findEntryHandle(CSSM_ACL_HANDLE handle
)
268 for (EntryMap::iterator it
= mEntries
.begin(); it
!= mEntries
.end(); it
++)
269 if (it
->second
.handle
== handle
)
271 CssmError::throwMe(CSSMERR_CSSM_INVALID_HANDLE_USAGE
); //%%% imprecise error code
276 // CSSM style ACL access and modification functions.
278 void ObjectAcl::cssmGetAcl(const char *tag
, uint32
&count
, AclEntryInfo
* &acls
)
281 pair
<EntryMap::const_iterator
, EntryMap::const_iterator
> range
;
282 count
= getRange(tag
? tag
: "", range
);
283 acls
= allocator
.alloc
<AclEntryInfo
>(count
);
286 secinfo("SecAccess", "getting the ACL for %p (%d entries) tag: %s", this, count
, tag
? tag
: "<none>");
288 for (EntryMap::const_iterator it
= range
.first
; it
!= range
.second
; it
++, n
++) {
289 acls
[n
].EntryHandle
= it
->second
.handle
;
290 it
->second
.toEntryInfo(acls
[n
].EntryPublicInfo
, allocator
);
291 secinfo("SecAccess", "found an entry of type %d", acls
[n
].EntryPublicInfo
.TypedSubject
.Head
->WordID
);
296 void ObjectAcl::cssmChangeAcl(const AclEdit
&edit
,
297 const AccessCredentials
*cred
, AclValidationEnvironment
*env
, const char *preserveTag
)
299 IFDUMPING("acl", debugDump("acl-change-from"));
301 // make sure we're ready to go
304 // validate access credentials
305 validateOwner(CSSM_ACL_AUTHORIZATION_CHANGE_ACL
, cred
, env
);
307 // what is Thy wish, effendi?
308 switch (edit
.EditMode
) {
309 case CSSM_ACL_EDIT_MODE_ADD
: {
310 secinfo("SecAccess", "adding ACL for %p (%ld) while preserving: %s", this, edit
.handle(), preserveTag
);
311 const AclEntryInput
&input
= Required(edit
.newEntry());
312 if (preserveTag
&& input
.proto().s_tag() == preserveTag
)
313 MacOSError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED
);
314 add(input
.proto().s_tag(), input
.proto());
315 secinfo("SecAccess", "subject type is %d", input
.proto().TypedSubject
.Head
->WordID
);
318 case CSSM_ACL_EDIT_MODE_REPLACE
: {
319 secinfo("SecAccess", "replacing ACL for %p (%ld to %p) while preserving: %s", this, edit
.handle(), edit
.newEntry(), preserveTag
);
320 // keep the handle, and try for some modicum of atomicity
321 EntryMap::iterator it
= findEntryHandle(edit
.handle());
322 if (preserveTag
&& it
->second
.tag
== preserveTag
)
323 MacOSError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED
);
324 AclEntryPrototype proto2
;
325 it
->second
.toEntryInfo(proto2
, allocator
);
326 secinfo("SecAccess", "subject type was %d", proto2
.TypedSubject
.Head
->WordID
);
327 DataWalkers::chunkFree(proto2
, allocator
);
329 AclEntryPrototype proto
= Required(edit
.newEntry()).proto(); // (bypassing callbacks)
330 add(proto
.s_tag(), proto
, edit
.handle());
331 secinfo("SecAccess", "new subject type is %d", proto
.TypedSubject
.Head
->WordID
);
335 case CSSM_ACL_EDIT_MODE_DELETE
: {
336 secinfo("SecAccess", "deleting ACL for %p (%ld) while preserving: %s", this, edit
.handle(), preserveTag
);
337 EntryMap::iterator it
= findEntryHandle(edit
.handle());
338 if (preserveTag
&& it
->second
.tag
== preserveTag
)
339 MacOSError::throwMe(CSSM_ERRCODE_OPERATION_AUTH_DENIED
);
341 AclEntryPrototype proto
;
342 it
->second
.toEntryInfo(proto
, allocator
);
343 secinfo("SecAccess", "subject type was %d", proto
.TypedSubject
.Head
->WordID
);
344 DataWalkers::chunkFree(proto
, allocator
);
350 secinfo("SecAccess", "no idea what this CSSM_ACL_EDIT type is: %d", edit
.EditMode
);
351 CssmError::throwMe(CSSM_ERRCODE_INVALID_ACL_EDIT_MODE
);
357 IFDUMPING("acl", debugDump("acl-change-to"));
360 void ObjectAcl::cssmGetOwner(AclOwnerPrototype
&outOwner
)
363 outOwner
.TypedSubject
= mOwner
.subject
->toList(allocator
);
364 outOwner
.Delegate
= mOwner
.delegate
;
366 secinfo("SecAccess", "%p: getting the owner ACL: type %d", this, outOwner
.TypedSubject
.Head
->WordID
);
369 void ObjectAcl::cssmChangeOwner(const AclOwnerPrototype
&newOwner
,
370 const AccessCredentials
*cred
, AclValidationEnvironment
*env
)
372 IFDUMPING("acl", debugDump("owner-change-from"));
376 // only the owner entry can match
377 validateOwner(CSSM_ACL_AUTHORIZATION_CHANGE_OWNER
, cred
, env
);
382 secinfo("SecAccess", "%p: new owner's type is %d", this, newOwner
.subject().Head
->WordID
);
386 IFDUMPING("acl", debugDump("owner-change-to"));
391 // Load a set of ACL entries from an AclEntryInfo array.
392 // This completely replaces the ACL's entries.
393 // Note that we will adopt the handles in the infos, so they better be proper
394 // (unique, nonzero).
396 template <class Input
>
397 void ObjectAcl::owner(const Input
&input
)
399 IFDUMPING("acl", debugDump("owner-load-old"));
400 mOwner
= OwnerEntry(input
);
401 IFDUMPING("acl", debugDump("owner-load-new"));
404 template void ObjectAcl::owner(const AclOwnerPrototype
&);
405 template void ObjectAcl::owner(const AclSubjectPointer
&);
408 void ObjectAcl::entries(uint32 count
, const AclEntryInfo
*info
)
410 IFDUMPING("acl", debugDump("entries-load-old"));
411 mEntries
.erase(mEntries
.begin(), mEntries
.end());
412 for (uint32 n
= 0; n
< count
; n
++, info
++)
413 add(info
->proto().s_tag(), info
->proto());
414 IFDUMPING("acl", debugDump("entries-load-new"));
419 // Clear out the ACL and return it to un-initialized state
421 void ObjectAcl::clear()
423 mOwner
= OwnerEntry();
424 mEntries
.erase(mEntries
.begin(), mEntries
.end());
425 secinfo("acl", "%p cleared", this);
430 // Common gate to add an ACL entry
432 void ObjectAcl::add(const std::string
&tag
, const AclEntry
&newEntry
)
434 add(tag
, newEntry
, mNextHandle
++);
437 void ObjectAcl::add(const std::string
&tag
, AclEntry newEntry
, CSSM_ACL_HANDLE handle
)
440 //@@@ This should use a hook-registry mechanism. But for now, we are explicit:
441 if (!newEntry
.authorizesAnything
) {
442 for (AclAuthorizationSet::const_iterator it
= newEntry
.authorizations
.begin();
443 it
!= newEntry
.authorizations
.end(); it
++)
444 if (*it
>= CSSM_ACL_AUTHORIZATION_PREAUTH_BASE
&&
445 *it
< CSSM_ACL_AUTHORIZATION_PREAUTH_END
) {
446 // preauthorization right - special handling
447 if (newEntry
.subject
->type() != CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE
)
449 new PreAuthorizationAcls::SourceAclSubject(newEntry
.subject
);
453 mEntries
.insert(make_pair(tag
, newEntry
))->second
.handle
= handle
;
454 if (handle
>= mNextHandle
)
455 mNextHandle
= handle
+ 1; // don't reuse this handle (in this ACL)
460 // Common features of ACL entries/owners
462 void ObjectAcl::Entry::init(const AclSubjectPointer
&subject
, bool delegate
)
464 this->subject
= subject
;
465 this->delegate
= delegate
;
468 void ObjectAcl::Entry::importBlob(Reader
&pub
, Reader
&priv
)
470 // the delegation flag is 4 bytes for historic reasons
475 subject
= importSubject(pub
, priv
);
480 // An OwnerEntry is a restricted EntryPrototype for use as the ACL owner.
482 bool ObjectAcl::OwnerEntry::authorizes(AclAuthorization
) const
484 return true; // owner can do anything
487 bool ObjectAcl::OwnerEntry::validates(const AclValidationContext
&ctx
) const
489 if (AclValidationEnvironment
* env
= ctx
.environment())
490 if (env
->forceSuccess
)
492 return subject
->validates(ctx
); // simple subject match - no strings attached
497 // An AclEntry has some extra goodies
499 ObjectAcl::AclEntry::AclEntry(const AclEntryPrototype
&proto
) : Entry(proto
)
502 if (proto
.authorization().contains(CSSM_ACL_AUTHORIZATION_ANY
))
503 authorizesAnything
= true; // anything else wouldn't add anything
504 else if (proto
.authorization().empty())
505 authorizesAnything
= true; // not in standard, but common sense
507 authorizesAnything
= false;
508 authorizations
= proto
.authorization();
510 //@@@ not setting time range
511 // handle = not set here. Set by caller when the AclEntry is created.
514 ObjectAcl::AclEntry::AclEntry(const AclSubjectPointer
&subject
) : Entry(subject
)
516 authorizesAnything
= true; // by default, everything
517 //@@@ not setting time range
520 void ObjectAcl::AclEntry::toEntryInfo(CSSM_ACL_ENTRY_PROTOTYPE
&info
, Allocator
&alloc
) const
522 info
.TypedSubject
= subject
->toList(alloc
);
523 info
.Delegate
= delegate
;
524 info
.Authorization
= authorizesAnything
?
525 AuthorizationGroup(CSSM_ACL_AUTHORIZATION_ANY
, alloc
) :
526 AuthorizationGroup(authorizations
, alloc
);
527 //@@@ info.TimeRange =
528 assert(tag
.length() <= CSSM_MODULE_STRING_SIZE
);
529 memcpy(info
.EntryTag
, tag
.c_str(), tag
.length() + 1);
532 bool ObjectAcl::AclEntry::authorizes(AclAuthorization auth
) const
534 return authorizesAnything
|| authorizations
.find(auth
) != authorizations
.end();
537 bool ObjectAcl::AclEntry::validates(const AclValidationContext
&ctx
) const
539 //@@@ not checking time ranges
540 return subject
->validates(ctx
);
543 void ObjectAcl::AclEntry::addAuthorization(AclAuthorization auth
)
545 authorizations
.insert(auth
);
546 authorizesAnything
= false;
550 void ObjectAcl::AclEntry::importBlob(Reader
&pub
, Reader
&priv
)
552 Entry::importBlob(pub
, priv
);
553 const char *s
; pub(s
); tag
= s
;
555 // authorizesAnything is on disk as a 4-byte flag
556 Endian
<uint32
> tmpAuthorizesAnything
;
557 pub(tmpAuthorizesAnything
);
558 authorizesAnything
= tmpAuthorizesAnything
;
560 authorizations
.erase(authorizations
.begin(), authorizations
.end());
561 if (!authorizesAnything
) {
562 Endian
<uint32
> countIn
; pub(countIn
);
563 uint32 count
= countIn
;
565 for (uint32 n
= 0; n
< count
; n
++) {
566 Endian
<AclAuthorization
> auth
; pub(auth
);
567 authorizations
.insert(auth
);
570 //@@@ import time range
575 // Subject factory and makers
577 AclSubject::Maker::Maker(CSSM_ACL_SUBJECT_TYPE type
)
580 ObjectAcl::makers()[type
] = this;
583 AclSubject
*ObjectAcl::make(const TypedList
&list
)
585 if (!list
.isProper())
586 CssmError::throwMe(CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE
);
587 return makerFor(list
.type()).make(list
);
590 AclSubject
*ObjectAcl::make(uint32 typeAndVersion
, Reader
&pub
, Reader
&priv
)
592 // this type is encoded as (version << 24) | type
593 return makerFor(typeAndVersion
& ~AclSubject::versionMask
).make(typeAndVersion
>> AclSubject::versionShift
, pub
, priv
);
596 AclSubject::Maker
&ObjectAcl::makerFor(CSSM_ACL_SUBJECT_TYPE type
)
598 AclSubject::Maker
*maker
= makers()[type
];
600 CssmError::throwMe(CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED
);
606 // Parsing helper for subject makers.
607 // Note that count/array exclude the first element of list, which is the subject type wordid.
609 void AclSubject::Maker::crack(const CssmList
&list
, uint32 count
, ListElement
**array
, ...)
611 if (count
!= list
.length() - 1)
612 CssmError::throwMe(CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE
);
615 va_start(args
, array
);
616 ListElement
*elem
= list
.first()->next();
617 for (uint32 n
= 0; n
< count
; n
++, elem
= elem
->next()) {
618 CSSM_LIST_ELEMENT_TYPE expectedType
= va_arg(args
, CSSM_LIST_ELEMENT_TYPE
);
619 if (elem
->type() != expectedType
)
620 CssmError::throwMe(CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE
);
627 CSSM_WORDID_TYPE
AclSubject::Maker::getWord(const ListElement
&elem
,
628 int min
/*= 0*/, int max
/*= INT_MAX*/)
630 if (elem
.type() != CSSM_LIST_ELEMENT_WORDID
)
631 CssmError::throwMe(CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE
);
632 CSSM_WORDID_TYPE value
= elem
;
633 if (value
< min
|| value
> max
)
634 CssmError::throwMe(CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE
);
640 // Debug dumping support.
641 // Leave the ObjectAcl::debugDump method in (stubbed out)
642 // to keep the virtual table layout stable, and to allow
643 // proper linking in weird mix-and-match scenarios.
645 void ObjectAcl::debugDump(const char *what
) const
647 #if defined(DEBUGDUMP)
650 Debug::dump("%p ACL %s: %d entries\n", this, what
, int(mEntries
.size()));
651 Debug::dump(" OWNER ["); mOwner
.debugDump(); Debug::dump("]\n");
652 for (EntryMap::const_iterator it
= begin(); it
!= end(); it
++) {
653 const AclEntry
&ent
= it
->second
;
654 Debug::dump(" (%ld:%s) [", ent
.handle
, ent
.tag
.c_str());
658 Debug::dump("%p ACL END\n", this);
662 #if defined(DEBUGDUMP)
664 void ObjectAcl::Entry::debugDump() const
667 if (AclSubject::Version v
= subject
->version())
668 Debug::dump("V=%d ", v
);
669 subject
->debugDump();
671 Debug::dump("NULL subject");
674 Debug::dump(" DELEGATE");
677 void ObjectAcl::AclEntry::debugDump() const
680 if (authorizesAnything
) {
681 Debug::dump(" auth(ALL)");
683 Debug::dump(" auth(");
684 for (AclAuthorizationSet::iterator it
= authorizations
.begin();
685 it
!= authorizations
.end(); it
++) {
686 if (*it
>= CSSM_ACL_AUTHORIZATION_PREAUTH_BASE
687 && *it
< CSSM_ACL_AUTHORIZATION_PREAUTH_END
)
688 Debug::dump(" PRE(%d)", *it
- CSSM_ACL_AUTHORIZATION_PREAUTH_BASE
);
690 Debug::dump(" %d", *it
);