2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
20 // dlclient - client interface to CSSM DLs and their operations
22 #include <security_cdsa_client/dlclient.h>
23 #include <security_cdsa_client/aclclient.h>
24 #include <Security/cssmapple.h>
25 #include <Security/cssmapplePriv.h>
27 using namespace CssmClient
;
30 // blob type for blobs created by these classes -- done so that we can change the formats later
31 const uint32 kBlobType
= 0x1;
40 DbCursorMaker::~DbCursorMaker()
43 DbUniqueRecordMaker::~DbUniqueRecordMaker()
48 // Manage DL attachments
50 DLImpl::DLImpl(const Guid
&guid
) : AttachmentImpl(guid
, CSSM_SERVICE_DL
)
54 DLImpl::DLImpl(const Module
&module) : AttachmentImpl(module, CSSM_SERVICE_DL
)
63 DLImpl::getDbNames(char **)
65 CssmError::throwMe(CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED
);
69 DLImpl::freeNameList(char **)
71 CssmError::throwMe(CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED
);
75 DLImpl::newDb(const char *inDbName
, const CSSM_NET_ADDRESS
*inDbLocation
)
77 return new DbImpl(DL(this), inDbName
, inDbLocation
);
84 DbImpl::DbImpl(const DL
&dl
, const char *inDbName
, const CSSM_NET_ADDRESS
*inDbLocation
)
85 : ObjectImpl(dl
), mDbName(inDbName
, inDbLocation
),
86 mUseNameFromHandle(!inDbName
), mNameFromHandle(NULL
),
87 mAccessRequest(CSSM_DB_ACCESS_READ
), mAccessCredentials(NULL
),
88 mDefaultCredentials(NULL
), mOpenParameters(NULL
), mDbInfo(NULL
),
89 mResourceControlContext(NULL
)
98 allocator().free(mNameFromHandle
);
108 StLock
<Mutex
> _(mActivateMutex
);
112 assert(mDbInfo
== nil
);
113 mHandle
.DLHandle
= dl()->handle();
114 check(CSSM_DL_DbOpen(mHandle
.DLHandle
, mDbName
.canonicalName(), dbLocation(),
115 mAccessRequest
, mAccessCredentials
,
116 mOpenParameters
, &mHandle
.DBHandle
));
121 if (!mAccessCredentials
&& mDefaultCredentials
)
122 if (const AccessCredentials
*creds
= mDefaultCredentials
->makeCredentials())
123 CSSM_DL_Authenticate(handle(), mAccessRequest
, creds
); // ignore error
127 DbImpl::createWithBlob(CssmData
&blob
)
130 CssmError::throwMe(CSSMERR_DL_DATASTORE_ALREADY_EXISTS
);
132 if (mDbInfo
== nil
) {
133 // handle a missing (null) mDbInfo as an all-zero one
134 static const CSSM_DBINFO nullDbInfo
= { };
135 mDbInfo
= &nullDbInfo
;
138 mHandle
.DLHandle
= dl()->handle();
140 // create a parameter block for our call to the passthrough
141 CSSM_APPLE_CSPDL_DB_CREATE_WITH_BLOB_PARAMETERS params
;
143 params
.dbName
= mDbName
.canonicalName ();
144 params
.dbLocation
= dbLocation ();
145 params
.dbInfo
= mDbInfo
;
146 params
.accessRequest
= mAccessRequest
;
147 params
.credAndAclEntry
= NULL
;
148 params
.openParameters
= mOpenParameters
;
151 check(CSSM_DL_PassThrough (mHandle
, CSSM_APPLECSPDL_DB_CREATE_WITH_BLOB
, ¶ms
, (void**) &mHandle
.DBHandle
));
157 StLock
<Mutex
> _(mActivateMutex
);
159 CssmError::throwMe(CSSMERR_DL_DATASTORE_ALREADY_EXISTS
);
161 if (mDbInfo
== nil
) {
162 // handle a missing (null) mDbInfo as an all-zero one
163 static const CSSM_DBINFO nullDbInfo
= { };
164 mDbInfo
= &nullDbInfo
;
166 mHandle
.DLHandle
= dl()->handle();
168 if (!mResourceControlContext
&& mAccessCredentials
) {
169 AclFactory::AnyResourceContext
ctx(mAccessCredentials
);
170 check(CSSM_DL_DbCreate(mHandle
.DLHandle
, mDbName
.canonicalName(), dbLocation(),
171 mDbInfo
, mAccessRequest
, &ctx
,
172 mOpenParameters
, &mHandle
.DBHandle
));
174 check(CSSM_DL_DbCreate(mHandle
.DLHandle
, mDbName
.canonicalName(), dbLocation(),
175 mDbInfo
, mAccessRequest
, mResourceControlContext
,
176 mOpenParameters
, &mHandle
.DBHandle
));
184 StLock
<Mutex
> _(mActivateMutex
);
187 check(CSSM_DL_DbClose (mHandle
));
207 StLock
<Mutex
> _(mActivateMutex
);
218 // Deactivate so the db gets closed if it was open.
220 // This call does not require the receiver to be active.
221 check(CSSM_DL_DbDelete(dl()->handle(), mDbName
.canonicalName(), dbLocation(),
222 mAccessCredentials
));
226 DbImpl::rename(const char *newName
)
228 // Deactivate so the db gets closed if it was open.
230 if (::rename(mDbName
.canonicalName(), newName
))
231 UnixError::throwMe(errno
);
233 // Change our DbName to reflect this rename.
234 mDbName
= DbName(newName
, dbLocation());
238 DbImpl::authenticate(CSSM_DB_ACCESS_TYPE inAccessRequest
,
239 const CSSM_ACCESS_CREDENTIALS
*inAccessCredentials
)
243 // XXX Could do the same for create but this would require sticking
244 // inAccessCredentials into mResourceControlContext.
247 // We were not yet active. Just do an open.
248 accessRequest(inAccessRequest
);
249 accessCredentials(inAccessCredentials
);
255 check(CSSM_DL_Authenticate(handle(), inAccessRequest
, inAccessCredentials
));
259 DbImpl::name(char *&outDbName
)
261 check(CSSM_DL_GetDbNameFromHandle(handle(), &outDbName
));
267 if (mUseNameFromHandle
)
270 || !CSSM_DL_GetDbNameFromHandle(handle(), &mNameFromHandle
))
272 return mNameFromHandle
;
275 // We failed to get the name from the handle so use the passed
277 mUseNameFromHandle
= false;
280 return mDbName
.canonicalName();
284 DbImpl::createRelation(CSSM_DB_RECORDTYPE inRelationID
,
285 const char *inRelationName
,
286 uint32 inNumberOfAttributes
,
287 const CSSM_DB_SCHEMA_ATTRIBUTE_INFO
*pAttributeInfo
,
288 uint32 inNumberOfIndexes
,
289 const CSSM_DB_SCHEMA_INDEX_INFO
*pIndexInfo
)
291 check(CSSM_DL_CreateRelation(handle(), inRelationID
, inRelationName
,
292 inNumberOfAttributes
, pAttributeInfo
,
293 inNumberOfIndexes
, pIndexInfo
));
297 DbImpl::destroyRelation(CSSM_DB_RECORDTYPE inRelationID
)
299 check(CSSM_DL_DestroyRelation(handle(), inRelationID
));
303 DbImpl::insert(CSSM_DB_RECORDTYPE recordType
, const CSSM_DB_RECORD_ATTRIBUTE_DATA
*attributes
,
304 const CSSM_DATA
*data
)
306 DbUniqueRecord
uniqueId(Db(this));
307 check(CSSM_DL_DataInsert(handle(), recordType
,
310 // Activate uniqueId so CSSM_DL_FreeUniqueRecord() gets called when it goes out of scope.
311 uniqueId
->activate();
317 DbImpl::insertWithoutEncryption(CSSM_DB_RECORDTYPE recordType
, const CSSM_DB_RECORD_ATTRIBUTE_DATA
*attributes
,
320 DbUniqueRecord
uniqueId(Db(this));
322 // fill out the parameters
323 CSSM_APPLECSPDL_DB_INSERT_WITHOUT_ENCRYPTION_PARAMETERS params
;
324 params
.recordType
= recordType
;
325 params
.attributes
= const_cast<CSSM_DB_RECORD_ATTRIBUTE_DATA
*>(attributes
);
328 // for clarity, call the overloaded operator to produce a unique record pointer
329 CSSM_DB_UNIQUE_RECORD_PTR
*uniquePtr
= uniqueId
;
332 passThrough (CSSM_APPLECSPDL_DB_INSERT_WITHOUT_ENCRYPTION
, ¶ms
, (void**) uniquePtr
);
334 // Activate uniqueId so CSSM_DL_FreeUniqueRecord() gets called when it goes out of scope.
335 uniqueId
->activate();
341 // Generic Passthrough interface
343 void DbImpl::passThrough(uint32 passThroughId
, const void *in
, void **out
)
345 check(CSSM_DL_PassThrough(handle(), passThroughId
, in
, out
));
350 // Passthrough functions (only implemented by AppleCSPDL).
355 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_LOCK
, NULL
, NULL
));
361 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_UNLOCK
, NULL
, NULL
));
365 DbImpl::unlock(const CSSM_DATA
&password
)
367 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_UNLOCK
, &password
, NULL
));
371 DbImpl::getSettings(uint32
&outIdleTimeout
, bool &outLockOnSleep
)
373 CSSM_APPLECSPDL_DB_SETTINGS_PARAMETERS_PTR settings
;
374 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_GET_SETTINGS
,
375 NULL
, reinterpret_cast<void **>(&settings
)));
376 outIdleTimeout
= settings
->idleTimeout
;
377 outLockOnSleep
= settings
->lockOnSleep
;
378 allocator().free(settings
);
382 DbImpl::setSettings(uint32 inIdleTimeout
, bool inLockOnSleep
)
384 CSSM_APPLECSPDL_DB_SETTINGS_PARAMETERS settings
;
385 settings
.idleTimeout
= inIdleTimeout
;
386 settings
.lockOnSleep
= inLockOnSleep
;
387 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_SET_SETTINGS
, &settings
, NULL
));
393 CSSM_APPLECSPDL_DB_IS_LOCKED_PARAMETERS_PTR params
;
394 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_IS_LOCKED
,
395 NULL
, reinterpret_cast<void **>(¶ms
)));
396 bool isLocked
= params
->isLocked
;
397 allocator().free(params
);
402 DbImpl::changePassphrase(const CSSM_ACCESS_CREDENTIALS
*cred
)
404 CSSM_APPLECSPDL_DB_CHANGE_PASSWORD_PARAMETERS params
;
405 params
.accessCredentials
= const_cast<CSSM_ACCESS_CREDENTIALS
*>(cred
);
406 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_CHANGE_PASSWORD
, ¶ms
, NULL
));
409 void DbImpl::recode(const CSSM_DATA
&data
, const CSSM_DATA
&extraData
)
411 // setup parameters for the recode call
412 CSSM_APPLECSPDL_RECODE_PARAMETERS params
;
413 params
.dbBlob
= data
;
414 params
.extraData
= extraData
;
417 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_CSP_RECODE
, ¶ms
, NULL
));
420 void DbImpl::copyBlob (CssmData
&data
)
423 check(CSSM_DL_PassThrough(handle(), CSSM_APPLECSPDL_DB_COPY_BLOB
, NULL
, (void**) (CSSM_DATA
*) &data
));
426 void DbImpl::setBatchMode(Boolean mode
, Boolean rollback
)
429 // We need the DL_DB_Handle of the underyling DL in order to use CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT
432 CSSM_DL_DB_HANDLE dldbHandleOfUnderlyingDL
;
433 result
= CSSM_DL_PassThrough(handle(),
434 CSSM_APPLECSPDL_DB_GET_HANDLE
,
436 (void **)&dldbHandleOfUnderlyingDL
);
438 // Now, toggle the autocommit...
440 if ( result
== noErr
)
442 CSSM_BOOL modeToUse
= !mode
;
445 result
= (OSStatus
)CSSM_DL_PassThrough(dldbHandleOfUnderlyingDL
,
446 CSSM_APPLEFILEDL_ROLLBACK
, NULL
, NULL
);
449 result
= CSSM_DL_PassThrough(dldbHandleOfUnderlyingDL
,
450 CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT
,
453 if (!rollback
&& modeToUse
)
454 result
= CSSM_DL_PassThrough(dldbHandleOfUnderlyingDL
,
455 CSSM_APPLEFILEDL_COMMIT
,
465 DbImpl::newDbCursor(const CSSM_QUERY
&query
, Allocator
&allocator
)
467 return new DbDbCursorImpl(Db(this), query
, allocator
);
471 DbImpl::newDbCursor(uint32 capacity
, Allocator
&allocator
)
473 return new DbDbCursorImpl(Db(this), capacity
, allocator
);
478 // Db adapters for AclBearer
480 void DbImpl::getAcl(AutoAclEntryInfoList
&aclInfos
, const char *selectionTag
) const
482 aclInfos
.allocator(allocator());
483 check(CSSM_DL_GetDbAcl(const_cast<DbImpl
*>(this)->handle(),
484 reinterpret_cast<const CSSM_STRING
*>(selectionTag
), aclInfos
, aclInfos
));
487 void DbImpl::changeAcl(const CSSM_ACL_EDIT
&aclEdit
,
488 const CSSM_ACCESS_CREDENTIALS
*accessCred
)
490 check(CSSM_DL_ChangeDbAcl(handle(), AccessCredentials::needed(accessCred
), &aclEdit
));
493 void DbImpl::getOwner(AutoAclOwnerPrototype
&owner
) const
495 owner
.allocator(allocator());
496 check(CSSM_DL_GetDbOwner(const_cast<DbImpl
*>(this)->handle(), owner
));
499 void DbImpl::changeOwner(const CSSM_ACL_OWNER_PROTOTYPE
&newOwner
,
500 const CSSM_ACCESS_CREDENTIALS
*accessCred
)
502 check(CSSM_DL_ChangeDbOwner(handle(),
503 AccessCredentials::needed(accessCred
), &newOwner
));
506 void DbImpl::defaultCredentials(DefaultCredentialsMaker
*maker
)
508 mDefaultCredentials
= maker
;
513 // Abstract DefaultCredentialsMakers
515 DbImpl::DefaultCredentialsMaker::~DefaultCredentialsMaker()
520 // Db adapters for DLAccess
522 CSSM_HANDLE
Db::dlGetFirst(const CSSM_QUERY
&query
, CSSM_DB_RECORD_ATTRIBUTE_DATA
&attributes
,
523 CSSM_DATA
*data
, CSSM_DB_UNIQUE_RECORD
*&id
)
526 switch (CSSM_RETURN rc
= CSSM_DL_DataGetFirst(handle(), &query
, &result
, &attributes
, data
, &id
)) {
529 case CSSMERR_DL_ENDOFDATA
:
530 return CSSM_INVALID_HANDLE
;
532 CssmError::throwMe(rc
);
533 return CSSM_INVALID_HANDLE
; // placebo
537 bool Db::dlGetNext(CSSM_HANDLE query
, CSSM_DB_RECORD_ATTRIBUTE_DATA
&attributes
,
538 CSSM_DATA
*data
, CSSM_DB_UNIQUE_RECORD
*&id
)
540 CSSM_RETURN rc
= CSSM_DL_DataGetNext(handle(), query
, &attributes
, data
, &id
);
544 case CSSMERR_DL_ENDOFDATA
:
547 CssmError::throwMe(rc
);
548 return false; // placebo
552 void Db::dlAbortQuery(CSSM_HANDLE query
)
554 CssmError::check(CSSM_DL_DataAbortQuery(handle(), query
));
557 void Db::dlFreeUniqueId(CSSM_DB_UNIQUE_RECORD
*id
)
559 CssmError::check(CSSM_DL_FreeUniqueRecord(handle(), id
));
562 void Db::dlDeleteRecord(CSSM_DB_UNIQUE_RECORD
*id
)
564 CssmError::check(CSSM_DL_DataDelete(handle(), id
));
567 Allocator
&Db::allocator()
569 return Object::allocator();
574 // DbUniqueRecordMaker
577 DbImpl::newDbUniqueRecord()
579 return new DbUniqueRecordImpl(Db(this));
587 DbImpl::dlDbIdentifier()
589 // Always use the same dbName and dbLocation that were passed in during
591 return DLDbIdentifier(dl()->subserviceUid(), mDbName
.canonicalName(), dbLocation());
598 DbDbCursorImpl::DbDbCursorImpl(const Db
&db
, const CSSM_QUERY
&query
, Allocator
&allocator
)
599 : DbCursorImpl(db
, query
, allocator
), mResultsHandle(CSSM_INVALID_HANDLE
)
603 DbDbCursorImpl::DbDbCursorImpl(const Db
&db
, uint32 capacity
, Allocator
&allocator
)
604 : DbCursorImpl(db
, capacity
, allocator
), mResultsHandle(CSSM_INVALID_HANDLE
)
608 DbDbCursorImpl::~DbDbCursorImpl()
618 DbDbCursorImpl::next(DbAttributes
*attributes
, ::CssmDataContainer
*data
, DbUniqueRecord
&uniqueId
)
621 attributes
->deleteValues();
628 DbUniqueRecord
unique(db
);
631 // ask the CSP/DL if the requested record type exists
632 CSSM_BOOL boolResult
;
633 CSSM_DL_PassThrough(db
->handle(), CSSM_APPLECSPDL_DB_RELATION_EXISTS
, &RecordType
, (void**) &boolResult
);
644 result
= CSSM_DL_DataGetFirst(db
->handle(),
651 StLock
<Mutex
> _(mActivateMutex
);
652 if (result
== CSSM_OK
)
654 else if (data
!= NULL
)
659 result
= CSSM_DL_DataGetNext(db
->handle(),
665 if (result
!= CSSM_OK
&& data
!= NULL
)
671 if (result
!= CSSM_OK
&& attributes
!= NULL
)
673 attributes
->invalidate();
676 if (result
== CSSMERR_DL_ENDOFDATA
)
678 StLock
<Mutex
> _(mActivateMutex
);
685 // Activate uniqueId so CSSM_DL_FreeUniqueRecord() gets called when it goes out of scope.
692 DbDbCursorImpl::activate()
697 DbDbCursorImpl::deactivate()
699 StLock
<Mutex
> _(mActivateMutex
);
703 check(CSSM_DL_DataAbortQuery(database()->handle(), mResultsHandle
));
711 DbCursorImpl::DbCursorImpl(const Object
&parent
, const CSSM_QUERY
&query
, Allocator
&allocator
) :
712 ObjectImpl(parent
), CssmAutoQuery(query
, allocator
)
716 DbCursorImpl::DbCursorImpl(const Object
&parent
, uint32 capacity
, Allocator
&allocator
) :
717 ObjectImpl(parent
), CssmAutoQuery(capacity
, allocator
)
722 DbCursorImpl::allocator() const
724 return ObjectImpl::allocator();
728 DbCursorImpl::allocator(Allocator
&alloc
)
730 ObjectImpl::allocator(alloc
);
737 DbUniqueRecordImpl::DbUniqueRecordImpl(const Db
&db
) : ObjectImpl(db
), mDestroyID (false)
741 DbUniqueRecordImpl::~DbUniqueRecordImpl()
747 allocator ().free (mUniqueId
);
756 DbUniqueRecordImpl::deleteRecord()
758 check(CSSM_DL_DataDelete(database()->handle(), mUniqueId
));
762 DbUniqueRecordImpl::modify(CSSM_DB_RECORDTYPE recordType
,
763 const CSSM_DB_RECORD_ATTRIBUTE_DATA
*attributes
,
764 const CSSM_DATA
*data
,
765 CSSM_DB_MODIFY_MODE modifyMode
)
767 check(CSSM_DL_DataModify(database()->handle(), recordType
, mUniqueId
,
773 DbUniqueRecordImpl::modifyWithoutEncryption(CSSM_DB_RECORDTYPE recordType
,
774 const CSSM_DB_RECORD_ATTRIBUTE_DATA
*attributes
,
775 const CSSM_DATA
*data
,
776 CSSM_DB_MODIFY_MODE modifyMode
)
778 // fill out the parameters
779 CSSM_APPLECSPDL_DB_MODIFY_WITHOUT_ENCRYPTION_PARAMETERS params
;
780 params
.recordType
= recordType
;
781 params
.uniqueID
= mUniqueId
;
782 params
.attributes
= const_cast<CSSM_DB_RECORD_ATTRIBUTE_DATA
*>(attributes
);
783 params
.data
= (CSSM_DATA
*) data
;
784 params
.modifyMode
= modifyMode
;
787 check(CSSM_DL_PassThrough(database()->handle(),
788 CSSM_APPLECSPDL_DB_MODIFY_WITHOUT_ENCRYPTION
,
794 DbUniqueRecordImpl::get(DbAttributes
*attributes
,
795 ::CssmDataContainer
*data
)
798 attributes
->deleteValues();
803 // @@@ Fix the allocators for attributes and data.
805 result
= CSSM_DL_DataGetFromUniqueRecordId(database()->handle(), mUniqueId
,
809 if (result
!= CSSM_OK
)
812 attributes
->invalidate();
813 if (data
!= NULL
) // the data returned is no longer valid
823 DbUniqueRecordImpl::getWithoutEncryption(DbAttributes
*attributes
,
824 ::CssmDataContainer
*data
)
827 attributes
->deleteValues();
832 // @@@ Fix the allocators for attributes and data.
835 // make the parameter block
836 CSSM_APPLECSPDL_DB_GET_WITHOUT_ENCRYPTION_PARAMETERS params
;
837 params
.uniqueID
= mUniqueId
;
838 params
.attributes
= attributes
;
841 ::CssmDataContainer recordData
;
842 result
= CSSM_DL_PassThrough(database()->handle(), CSSM_APPLECSPDL_DB_GET_WITHOUT_ENCRYPTION
, ¶ms
,
848 DbUniqueRecordImpl::activate()
850 StLock
<Mutex
> _(mActivateMutex
);
855 DbUniqueRecordImpl::deactivate()
857 StLock
<Mutex
> _(mActivateMutex
);
861 check(CSSM_DL_FreeUniqueRecord(database()->handle(), mUniqueId
));
866 DbUniqueRecordImpl::getRecordIdentifier(CSSM_DATA
&data
)
868 check(CSSM_DL_PassThrough(database()->handle(), CSSM_APPLECSPDL_DB_GET_RECORD_IDENTIFIER
,
869 mUniqueId
, (void**) &data
));
872 void DbUniqueRecordImpl::setUniqueRecordPtr(CSSM_DB_UNIQUE_RECORD_PTR uniquePtr
)
875 mUniqueId
= (CSSM_DB_UNIQUE_RECORD_PTR
) allocator ().malloc (sizeof (CSSM_DB_UNIQUE_RECORD
));
876 *mUniqueId
= *uniquePtr
;
883 DbAttributes::DbAttributes()
884 : CssmAutoDbRecordAttributeData(0, Allocator::standard(), Allocator::standard())
888 DbAttributes::DbAttributes(const Db
&db
, uint32 capacity
, Allocator
&allocator
)
889 : CssmAutoDbRecordAttributeData(capacity
, db
->allocator(), allocator
)