Author: metze
Date: 2006-12-29 11:46:52 +0000 (Fri, 29 Dec 2006)
New Revision: 20407

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20407

Log:
the oMObjectClass values are not padded to 10 bytes!

metze
Modified:
   branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
   branches/SAMBA_4_0/source/ldap_server/devdocs/AD-Syntaxes.txt


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c       2006-12-29 
11:01:37 UTC (rev 20406)
+++ branches/SAMBA_4_0/source/dsdb/schema/schema_syntax.c       2006-12-29 
11:46:52 UTC (rev 20407)
@@ -22,6 +22,8 @@
 #include "includes.h"
 #include "dsdb/samdb/samdb.h"
 
+#define OMOBJECTCLASS(val) { .length = sizeof(val) - 1, .data = 
discard_const_p(uint8_t, val) }
+
 static const struct dsdb_syntax dsdb_syntaxes[] = {
        {
                .name                   = "Boolean",
@@ -107,50 +109,43 @@
                .name                   = "Object(DS-DN)",
                .ldap_oid               = "1.3.6.1.4.1.1466.115.121.1.12",
                .oMSyntax               = 127,
-               .oMObjectClass.length   = 10,
-               .oMObjectClass.data     = discard_const_p(uint8_t, 
"\x2b\x0c\x02\x87\x73\x1c\x00\x85\x4a\x00"),
+               .oMObjectClass          = 
OMOBJECTCLASS("\x2b\x0c\x02\x87\x73\x1c\x00\x85\x4a"),
                .attributeSyntax_oid    = "2.5.5.1",
        },{
                .name                   = "Object(DN-Binary)",
                .ldap_oid               = "1.2.840.113556.1.4.903",
                .oMSyntax               = 127,
-               .oMObjectClass.length   = 10,
-               .oMObjectClass.data     = discard_const_p(uint8_t, 
"\x2a\x86\x48\x86\xf7\x14\x01\x01\x01\x0b)"),
+               .oMObjectClass          = 
OMOBJECTCLASS("\x2a\x86\x48\x86\xf7\x14\x01\x01\x01\x0b"),
                .attributeSyntax_oid    = "2.5.5.7",
        },{
                .name                   = "Object(OR-Name)",
                .ldap_oid               = "1.2.840.113556.1.4.1221",
                .oMSyntax               = 127,
-               .oMObjectClass.length   = 10,
-               .oMObjectClass.data     = discard_const_p(uint8_t, 
"\x56\x06\x01\x02\x05\x0b\x1D\x00\x00\x00"),
+               .oMObjectClass          = 
OMOBJECTCLASS("\x56\x06\x01\x02\x05\x0b\x1D"),
                .attributeSyntax_oid    = "2.5.5.7",
        },{
                .name                   = "Object(Replica-Link)",
                .ldap_oid               = "1.3.6.1.4.1.1466.115.121.1.40",
                .oMSyntax               = 127,
-               .oMObjectClass.length   = 10,
-               .oMObjectClass.data     = discard_const_p(uint8_t, 
"\x2a\x86\x48\x86\xf7\x14\x01\x01\x01\x06"),
+               .oMObjectClass          = 
OMOBJECTCLASS("\x2a\x86\x48\x86\xf7\x14\x01\x01\x01\x06"),
                .attributeSyntax_oid    = "2.5.5.10",
        },{
                .ldap_oid               = "1.3.6.1.4.1.1466.115.121.1.43",
                .oMSyntax               = 127,
-               .oMObjectClass.length   = 10,
-               .oMObjectClass.data     = discard_const_p(uint8_t, 
"\x2b\x0c\x02\x87\x73\x1c\x00\x85\x5c\x00"),
+               .oMObjectClass          = 
OMOBJECTCLASS("\x2b\x0c\x02\x87\x73\x1c\x00\x85\x5c"),
                .attributeSyntax_oid    = "2.5.5.13",
                .name                   = "Object(Presentation-Address)",
        },{
                .name                   = "Object(Access-Point)",
                .ldap_oid               = "1.3.6.1.4.1.1466.115.121.1.2",
                .oMSyntax               = 127,
-               .oMObjectClass.length   = 10,
-               .oMObjectClass.data     = discard_const_p(uint8_t, 
"\x2b\x0c\x02\x87\x73\x1c\x00\x85\x3e\x00"),
+               .oMObjectClass          = 
OMOBJECTCLASS("\x2b\x0c\x02\x87\x73\x1c\x00\x85\x3e"),
                .attributeSyntax_oid    = "2.5.5.14",
        },{
                .name                   = "Object(DN-String)",
                .ldap_oid               = "1.2.840.113556.1.4.904",
                .oMSyntax               = 127,
-               .oMObjectClass.length   = 10,
-               .oMObjectClass.data     = discard_const_p(uint8_t, 
"\x2a\x86\x48\x86\xf7\x14\x01\x01\x01\x0c"),
+               .oMObjectClass          = 
OMOBJECTCLASS("\x2a\x86\x48\x86\xf7\x14\x01\x01\x01\x0c"),
                .attributeSyntax_oid    = "2.5.5.14",
        }
 };

Modified: branches/SAMBA_4_0/source/ldap_server/devdocs/AD-Syntaxes.txt
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/devdocs/AD-Syntaxes.txt       
2006-12-29 11:01:37 UTC (rev 20406)
+++ branches/SAMBA_4_0/source/ldap_server/devdocs/AD-Syntaxes.txt       
2006-12-29 11:46:52 UTC (rev 20407)
@@ -16,12 +16,12 @@
 Directory String               1.3.6.1.4.1.1466.115.121.1.15     64            
                        2.5.5.12                String(Unicode)
 Large-Integer                * 1.2.840.113556.1.4.906            65            
                        2.5.5.16                Interval/LargeInteger
 Object-Security-Descriptor   * 1.2.840.113556.1.4.907            66            
                        2.5.5.15                String(NT-Sec-Desc)
-DN                             1.3.6.1.4.1.1466.115.121.1.12    127    2b0c 
0287 731c 0085 4a00        2.5.5.1                 Object(DS-DN)
+DN                             1.3.6.1.4.1.1466.115.121.1.12    127    2b0c 
0287 731c 0085 4a          2.5.5.1                 Object(DS-DN)
 DNWithOctetString            * 1.2.840.113556.1.4.903           127    2a86 
4886 f714 0101 010b        2.5.5.7                 Object(DN-Binary)
-OR-Name                             *  1.2.840.113556.1.4.1221          127    
5606 0102 050b 1D00 0000        2.5.5.7                 Object(OR-Name)
+OR-Name                             *  1.2.840.113556.1.4.1221          127    
5606 0102 050b 1D               2.5.5.7                 Object(OR-Name)
 Octet String                   1.3.6.1.4.1.1466.115.121.1.40    127    2a86 
4886 f714 0101 0106        2.5.5.10                Object(Replica-Link)
-Presentation Address           1.3.6.1.4.1.1466.115.121.1.43    127    2b0c 
0287 731c 0085 5c00        2.5.5.13                Object(Presentation-Address)
-Access Point                   1.3.6.1.4.1.1466.115.121.1.2     127    2b0c 
0287 731c 0085 3e00        2.5.5.14                Object(Access-Point)
+Presentation Address           1.3.6.1.4.1.1466.115.121.1.43    127    2b0c 
0287 731c 0085 5c          2.5.5.13                Object(Presentation-Address)
+Access Point                   1.3.6.1.4.1.1466.115.121.1.2     127    2b0c 
0287 731c 0085 3e          2.5.5.14                Object(Access-Point)
 DNWithString                 * 1.2.840.113556.1.4.904           127    2a86 
4886 f714 0101 010c        2.5.5.14                Object(DN-String)
 
 

Reply via email to