1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s4-schema: Set ATTID in schema cache from "msDS-IntId"

According to http://msdn.microsoft.com/en-us/library/cc223224%28PROT.13%29.aspx
some Attributes OIDs may not use prefixMap.
Setting ATTID in Schema Cache here should work, although
this code snippet should be moved in separate function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
This commit is contained in:
Kamen Mazdrashki 2009-12-18 04:08:52 +02:00 committed by Andrew Tridgell
parent 14bac3a3e6
commit 4e8ad284f5

View File

@ -558,14 +558,19 @@ WERROR dsdb_attribute_from_ldb(struct ldb_context *ldb,
/* set an invalid value */ /* set an invalid value */
attr->attributeID_id = 0xFFFFFFFF; attr->attributeID_id = 0xFFFFFFFF;
} else { } else {
status = dsdb_schema_pfm_make_attid(schema->prefixmap, /* check if msDS-IntId element is set */
attr->attributeID_oid, attr->attributeID_id = samdb_result_uint(msg, "msDS-IntId", 0xFFFFFFFF);
&attr->attributeID_id); if (attr->attributeID_id == 0xFFFFFFFF) {
if (!W_ERROR_IS_OK(status)) { /* msDS-IntId is not set, make */
DEBUG(0,("%s: '%s': unable to map attributeID %s: %s\n", status = dsdb_schema_pfm_make_attid(schema->prefixmap,
__location__, attr->lDAPDisplayName, attr->attributeID_oid, attr->attributeID_oid,
win_errstr(status))); &attr->attributeID_id);
return status; if (!W_ERROR_IS_OK(status)) {
DEBUG(0,("%s: '%s': unable to map attributeID %s: %s\n",
__location__, attr->lDAPDisplayName, attr->attributeID_oid,
win_errstr(status)));
return status;
}
} }
} }
GET_GUID_LDB(msg, "schemaIDGUID", attr, schemaIDGUID); GET_GUID_LDB(msg, "schemaIDGUID", attr, schemaIDGUID);