]> git.saurik.com Git - apple/security.git/blob - AppleDL/ISSUES
Security-179.tar.gz
[apple/security.git] / AppleDL / ISSUES
1 ISSUES with cdsa verson 2 Datastore Library
2
3 DL_DataGetFromUniqueRecordId
4
5 * Which value of CSSM_QUERYFLAGS should this call assume? In other words if fetching the Data of a Key item should this call return a reference key or a raw key.
6
7 * What if the record has been modified by another caller since it was last retrieved. This call should be able to update the CSSM_UNIQUE_RECORD_PTR passed in. Or otherwise indicate that the record that a particular attribute is being requested for has changed.
8
9 DL_DbCreate v/s DL_CreateRelation
10
11 * Why not change CSSM_DBINFO to use the same data structures as DL_CreateRelation does. Currently CSSM_DBINFO uses CSSM_DB_RECORD_ATTRIBUTE_INFO, CSSM_DB_RECORD_INDEX_INFO and CSSM_DB_PARSING_MODULE_INFO the first 2 contains less information than the CSSM_DB_SCHEMA_ATTRIBUTE_INFO and CSSM_DB_SCHEMA_INDEX_INFO fields used by DL_CreateRelation. There is no equivalent for the information provided at Database creation time containd in the CSSM_DB_PARSING_MODULE_INFO inside the CSSM_DBINFO.
12
13 I purpose we change everything to using the same data structures (CSSM_DB_SCHEMA_ATTRIBUTE_INFO and CSSM_DB_SCHEMA_INDEX_INFO since they are richer). This would make the CSSM_DB_RECORD_ATTRIBUTE_INFO structure obsolete.
14
15 Also note that CSSM_DB_SCHEMA_ATTRIBUTE_INFO does not contain an CSSM_DB_ATTRIBUTE_NAME_FORMAT field and neither should the CSSM_DB_SCHEMA_ATTRIBUTE_INFO relation since each attribute will have the 3 types of names given at creation time. The CSSM_DB_ATTRIBUTE_NAME_FORMAT need only be used to retrieve an attribute using a particular name format.
16
17 DL_DataGetFirst
18
19 * CSSM_SELECTION_PREDICATE (which is part of CSSM_QUERY) contains a CSSM_DB_ATTRIBUTE_DATA. What are the intended semantics for a CSSM_SELECTION_PREDICATE containing a CSSM_DB_ATTRIBUTE_DATA with NumberOfValues not equal to 1?
20
21 DL_DataGetFirst, DL_DataGetNext and DL_DataGetFromUniqueRecordId
22
23 * The AttributeFormat specified when retrieving an attribute must match that in the schema.
24 -or-
25 * When retrieving an attribute the AttributeFormat for that attribute is returned.
26
27 From the description of these calls it is not clear which of the two options above is the intended one. I vote for the second option.
28
29 DL_DataInsert and DL_DataModify
30
31 * The AttributeFormat specified when specifying an attribute must match that in the schema otherwise CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT is returned.
32
33 This should be a added to the description of these calls.
34
35 DL_DataDelete
36
37 * From the description of this function it would seem that is does an implicit CSSM_DL_FreeUniqueRecord(). Is this correct?
38
39
40 General
41
42 * What is the difference between a single valued and multi-valued attribute? How do you indicate that an attribute is to be multi-valued?
43
44 These terms are used in the description of DL_DataModify and in other places. However there is nothing in the schema to indicate whether an attribute is single valued or multi valued. If an attribute has one value and DL_DataModify is called with the CSSM_DB_MODIFY_ATTRIBUTE_ADD ModifyMode it is unclear whether the current value should be replaced with a new one or the passed in value should be added to the values of the attribute (bring the NumberOfValues for that attribute up to 2).
45
46 How is this supposed to (or intended to) work?
47
48 Error codes
49
50 * When for example passing a value for a CSSM_DB_ATTRIBUTE_FORMAT or CSSM_DB_ATTRIBUTE_FORMAT_UINT32 with a length other than 1 2 or 4 we need an error code to indicate this. I suggest something like:
51
52 #define CSSMERR_DL_INVALID_VALUE (CSSM_DL_BASE_DL_ERROR + 47)
53
54 A value specified for an attribute was not of the correct form.
55
56
57 New Issues:
58
59 Page 471:
60 CSSM_DB_CONJUNCTIVE
61 What is the intented semantic of CSSM_DB_NONE? It only makes sense when a single SelectionPredicate is specified in which case using either CSSM_DB_AND or CSSM_DB_OR would do just fine instead.