summaryrefslogtreecommitdiff
path: root/source4/dsdb
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/dsdb
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/dsdb')
-rw-r--r--source4/dsdb/schema/schema_init.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 9dc87e31a9..05669f6171 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -41,9 +41,13 @@ static const struct {
_PREFIX(0x00150000, "0.9.2342.19200300.100.1."),
_PREFIX(0x00160000, "2.16.840.1.113730.3.1."),
_PREFIX(0x00170000, "1.2.840.113556.1.5.7000."),
+ _PREFIX(0x00180000, "2.5.21."),
+ _PREFIX(0x00190000, "2.5.18."),
_PREFIX(0x001A0000, "2.5.20."),
+ _PREFIX(0x001B0000, "1.3.6.1.4.1.1466.101.119."),
_PREFIX(0x001C0000, "2.16.840.1.113730.3.2."),
_PREFIX(0x001D0000, "1.3.6.1.4.1.250.1."),
+ _PREFIX(0x001E0000, "1.2.840.113549.1.9."),
_PREFIX(0x001F0000, "0.9.2342.19200300.100.4."),
};
@@ -68,8 +72,19 @@ WERROR dsdb_map_oid2int(const char *in, uint32_t *out)
return WERR_INVALID_PARAM;
}
+ /* two '.' chars are invalid */
+ if (val_str[0] == '.') {
+ return WERR_INVALID_PARAM;
+ }
+
val = strtoul(val_str, &end_str, 10);
- if (end_str[0] != '\0') {
+ if (end_str[0] == '.' && end_str[1] != '\0') {
+ /*
+ * if it's a '.' and not the last char
+ * then maybe an other mapping apply
+ */
+ continue;
+ } else if (end_str[0] != '\0') {
return WERR_INVALID_PARAM;
} else if (val > 0xFFFF) {
return WERR_INVALID_PARAM;