Don't hardcode attributes to be treated as a DN
authorAndrew Bartlett <abartlet@samba.org>
Thu, 21 Aug 2008 02:56:04 +0000 (12:56 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 21 Aug 2008 02:56:04 +0000 (12:56 +1000)
This is now handled by reading the schema into the attributes.

Also, when we do set something here, mark it as FIXED, so the schema
and any reload from @ATTRIBUTES won't touch it.

Andrew Bartlett

source/lib/ldb-samba/ldif_handlers.c

index 22a57da10bfd6b029c0fc98b65b57b14268ac8e9..7301193dc2d4c69cc07022950da2cfb7697a3bf8 100644 (file)
@@ -617,19 +617,6 @@ static const struct {
        { "fRSReplicaSetGUID",          LDB_SYNTAX_SAMBA_GUID },
        { "netbootGUID",                LDB_SYNTAX_SAMBA_GUID },
        { "objectCategory",             LDB_SYNTAX_SAMBA_OBJECT_CATEGORY },
-       { "member",                     LDB_SYNTAX_DN },
-       { "memberOf",                   LDB_SYNTAX_DN },
-       { "nCName",                     LDB_SYNTAX_DN },
-       { "schemaNamingContext",        LDB_SYNTAX_DN },
-       { "configurationNamingContext", LDB_SYNTAX_DN },
-       { "rootDomainNamingContext",    LDB_SYNTAX_DN },
-       { "defaultNamingContext",       LDB_SYNTAX_DN },
-       { "subRefs",                    LDB_SYNTAX_DN },
-       { "dMDLocation",                LDB_SYNTAX_DN },
-       { "serverReference",            LDB_SYNTAX_DN },
-       { "masteredBy",                 LDB_SYNTAX_DN },
-       { "msDs-masteredBy",            LDB_SYNTAX_DN },
-       { "fSMORoleOwner",              LDB_SYNTAX_DN },
        { "prefixMap",                  LDB_SYNTAX_SAMBA_PREFIX_MAP }
 };
 
@@ -669,7 +656,7 @@ int ldb_register_samba_handlers(struct ldb_context *ldb)
                        return -1;
                }
 
-               ret = ldb_schema_attribute_add_with_syntax(ldb, samba_attributes[i].name, 0, s);
+               ret = ldb_schema_attribute_add_with_syntax(ldb, samba_attributes[i].name, LDB_ATTR_FLAG_FIXED, s);
                if (ret != LDB_SUCCESS) {
                        return ret;
                }