summaryrefslogtreecommitdiff
path: root/source4/torture/ldap/schema.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-17 20:11:40 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:26 -0500
commit549b56b89d36103e6596945fe5d42351a354ab94 (patch)
tree4a70e8fa342e06774ccad30d9dc54d009f48ac51 /source4/torture/ldap/schema.c
parent2e8746cc14c75c8958ea15d82c7cfd982a3bb6e0 (diff)
downloadsamba-549b56b89d36103e6596945fe5d42351a354ab94.tar.gz
samba-549b56b89d36103e6596945fe5d42351a354ab94.tar.bz2
samba-549b56b89d36103e6596945fe5d42351a354ab94.zip
r20231: - add more oid => uint32 id mappings
- handle the case where mappings for 1.2.3.4. and 1.2.3.4.5. prefixes exist - extend test suite for the mappings metze (This used to be commit 3af0a9b2c490ed1e4cd0af7faf814823bc60c264)
Diffstat (limited to 'source4/torture/ldap/schema.c')
-rw-r--r--source4/torture/ldap/schema.c40
1 files changed, 38 insertions, 2 deletions
diff --git a/source4/torture/ldap/schema.c b/source4/torture/ldap/schema.c
index 60b27f6c72..207ca6f9a0 100644
--- a/source4/torture/ldap/schema.c
+++ b/source4/torture/ldap/schema.c
@@ -393,6 +393,24 @@ static BOOL test_dsdb_map(struct torture_context *torture)
DEBUG(0,("0x%08X => %s\n", id, oid));
}
+ oid = "1.2.840.113556.1.5.7000";
+ status = dsdb_map_oid2int(oid, &id);
+ if (!W_ERROR_IS_OK(status)) {
+ DEBUG(0,("%s => %s\n", oid, win_errstr(status)));
+ ret = False;
+ } else {
+ DEBUG(0,("%s => 0x%08X\n", oid, id));
+ }
+
+ oid = "1.2.840.113556.1.5.7000.5";
+ status = dsdb_map_oid2int(oid, &id);
+ if (!W_ERROR_IS_OK(status)) {
+ DEBUG(0,("%s => %s\n", oid, win_errstr(status)));
+ ret = False;
+ } else {
+ DEBUG(0,("%s => 0x%08X\n", oid, id));
+ }
+
oid = "1.2.840.113556.1.4.1716.";
status = dsdb_map_oid2int(oid, &id);
if (!W_ERROR_EQUAL(status, WERR_INVALID_PARAM)) {
@@ -402,7 +420,25 @@ static BOOL test_dsdb_map(struct torture_context *torture)
DEBUG(0,("%s => %s (ok!)\n", oid, win_errstr(status)));
}
- oid = "1.2.840.113556.1.4.1716.65536";
+ oid = "1.2.840.113556.1.4.65535.34";
+ status = dsdb_map_oid2int(oid, &id);
+ if (!W_ERROR_EQUAL(status, WERR_DS_NO_MSDS_INTID)) {
+ DEBUG(0,("%s => %s\n", oid, win_errstr(status)));
+ ret = False;
+ } else {
+ DEBUG(0,("%s => %s (ok!)\n", oid, win_errstr(status)));
+ }
+
+ oid = "1.2.840.113556.1.4..";
+ status = dsdb_map_oid2int(oid, &id);
+ if (!W_ERROR_EQUAL(status, WERR_INVALID_PARAM)) {
+ DEBUG(0,("%s => %s\n", oid, win_errstr(status)));
+ ret = False;
+ } else {
+ DEBUG(0,("%s => %s (ok!)\n", oid, win_errstr(status)));
+ }
+
+ oid = "1.2.840.113556.1.4.65536";
status = dsdb_map_oid2int(oid, &id);
if (!W_ERROR_EQUAL(status, WERR_INVALID_PARAM)) {
DEBUG(0,("%s => %s\n", oid, win_errstr(status)));
@@ -411,7 +447,7 @@ static BOOL test_dsdb_map(struct torture_context *torture)
DEBUG(0,("%s => %s (ok!)\n", oid, win_errstr(status)));
}
- oid = "5435.1.2.840.113556.1.4.1716.";
+ oid = "5435.1.2.840.113556.1.4.";
status = dsdb_map_oid2int(oid, &id);
if (!W_ERROR_EQUAL(status, WERR_DS_NO_MSDS_INTID)) {
DEBUG(0,("%s => %s\n", oid, win_errstr(status)));