summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-29 11:46:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:30:24 -0500
commit030ede58527fe5dfd6d32c637751269a4bb48545 (patch)
tree7b32a49a983e4c15a71f92b8be0d30accf1c4c93
parentcb785a891bb4938692b45c78c921f75ed7ddbade (diff)
downloadsamba-030ede58527fe5dfd6d32c637751269a4bb48545.tar.gz
samba-030ede58527fe5dfd6d32c637751269a4bb48545.tar.bz2
samba-030ede58527fe5dfd6d32c637751269a4bb48545.zip
r20407: the oMObjectClass values are not padded to 10 bytes!
metze (This used to be commit f860dd2dca391edf55975d582dda0c1d01ddb6e3)
-rw-r--r--source4/dsdb/schema/schema_syntax.c23
-rw-r--r--source4/ldap_server/devdocs/AD-Syntaxes.txt8
2 files changed, 13 insertions, 18 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index c14c01873d..06ac51e417 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -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 @@ static const struct dsdb_syntax dsdb_syntaxes[] = {
.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",
}
};
diff --git a/source4/ldap_server/devdocs/AD-Syntaxes.txt b/source4/ldap_server/devdocs/AD-Syntaxes.txt
index 27b56c3086..4ac3f8874a 100644
--- a/source4/ldap_server/devdocs/AD-Syntaxes.txt
+++ b/source4/ldap_server/devdocs/AD-Syntaxes.txt
@@ -16,12 +16,12 @@ Generalized Time 1.3.6.1.4.1.1466.115.121.1.24 24 2.5.5.11 String(Genera
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)