s4/schema: Object(OR-Name) syntax handling for DRS calls
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>
Sun, 22 Nov 2009 12:41:25 +0000 (14:41 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 23 Nov 2009 13:15:05 +0000 (14:15 +0100)
OR-Name syntax through DRS calls looks like DN-Binary syntax

source4/dsdb/common/dsdb_dn.c
source4/dsdb/common/dsdb_dn.h
source4/dsdb/schema/schema_syntax.c

index dbc63a9..660eaf7 100644 (file)
@@ -31,6 +31,8 @@ enum dsdb_dn_format dsdb_dn_oid_to_format(const char *oid)
                return DSDB_BINARY_DN;
        } else if (strcmp(oid, DSDB_SYNTAX_STRING_DN) == 0) {
                return DSDB_STRING_DN;
+       } else if (strcmp(oid, DSDB_SYNTAX_OR_NAME) == 0) {
+               return DSDB_NORMAL_DN;
        } else {
                return DSDB_INVALID_DN;
        }
index 55b5c0b..53e1053 100644 (file)
@@ -12,5 +12,6 @@ struct dsdb_dn {
        const char *oid;
 };
 
-#define DSDB_SYNTAX_BINARY_DN "1.2.840.113556.1.4.903"
-#define DSDB_SYNTAX_STRING_DN  "1.2.840.113556.1.4.904"
+#define DSDB_SYNTAX_BINARY_DN  "1.2.840.113556.1.4.903"
+#define DSDB_SYNTAX_STRING_DN  "1.2.840.113556.1.4.904"
+#define DSDB_SYNTAX_OR_NAME    "1.2.840.113556.1.4.1221"
index edf5df8..9bd744a 100644 (file)
@@ -1690,14 +1690,16 @@ static const struct dsdb_syntax dsdb_syntaxes[] = {
                .equality               = "octetStringMatch",
                .comment                = "OctetString: Binary+DN",
        },{
-       /* not used in w2k3 schema */
+       /* not used in w2k3 schema, but used in Exchange schema*/
                .name                   = "Object(OR-Name)",
-               .ldap_oid               = "1.2.840.113556.1.4.1221",
+               .ldap_oid               = DSDB_SYNTAX_OR_NAME,
                .oMSyntax               = 127,
                .oMObjectClass          = OMOBJECTCLASS("\x56\x06\x01\x02\x05\x0b\x1D"),
                .attributeSyntax_oid    = "2.5.5.7",
-               .drsuapi_to_ldb         = dsdb_syntax_FOOBAR_drsuapi_to_ldb,
-               .ldb_to_drsuapi         = dsdb_syntax_FOOBAR_ldb_to_drsuapi,
+               .drsuapi_to_ldb         = dsdb_syntax_DN_BINARY_drsuapi_to_ldb,
+               .ldb_to_drsuapi         = dsdb_syntax_DN_BINARY_ldb_to_drsuapi,
+               .equality               = "caseIgnoreMatch",
+               .ldb_syntax             = LDB_SYNTAX_DN,
        },{
        /* 
         * TODO: verify if DATA_BLOB is correct here...!