summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2009-12-18 04:08:52 +0200
committerAndrew Tridgell <tridge@samba.org>2009-12-21 23:44:29 +1100
commit4e8ad284f5813413fdec8426f11e24570d22549b (patch)
treed66ef8500176602cae5a25ab5da4f73e3ebfd30b /source4
parent14bac3a3e6a9308d9088559cf8f898b6ac4b4d68 (diff)
downloadsamba-4e8ad284f5813413fdec8426f11e24570d22549b.tar.gz
samba-4e8ad284f5813413fdec8426f11e24570d22549b.tar.bz2
samba-4e8ad284f5813413fdec8426f11e24570d22549b.zip
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>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/schema/schema_init.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 4af36838cd..b8cbedcb7d 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -558,14 +558,19 @@ WERROR dsdb_attribute_from_ldb(struct ldb_context *ldb,
/* set an invalid value */
attr->attributeID_id = 0xFFFFFFFF;
} else {
- status = dsdb_schema_pfm_make_attid(schema->prefixmap,
- attr->attributeID_oid,
- &attr->attributeID_id);
- 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;
+ /* check if msDS-IntId element is set */
+ attr->attributeID_id = samdb_result_uint(msg, "msDS-IntId", 0xFFFFFFFF);
+ if (attr->attributeID_id == 0xFFFFFFFF) {
+ /* msDS-IntId is not set, make */
+ status = dsdb_schema_pfm_make_attid(schema->prefixmap,
+ attr->attributeID_oid,
+ &attr->attributeID_id);
+ 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);