]> git.sur5r.net Git - openldap/commitdiff
fix oidValidate() when a OID contains a single '0' (ITS#3211)
authorPierangelo Masarati <ando@openldap.org>
Mon, 28 Jun 2004 22:00:28 +0000 (22:00 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 28 Jun 2004 22:00:28 +0000 (22:00 +0000)
servers/slapd/schema_prep.c

index fa91ccdc31897937976c099d0fd2167ccef196f9..594338144cdc93ee9623be151482890021ad85a0 100644 (file)
@@ -62,7 +62,9 @@ oidValidate(
                                return LDAP_SUCCESS;
                        }
 
-                       if ( val.bv_val[0] == '0' ) {
+                       /* FIXME: the OID of 'dc' and other attributeTypes
+                        * starts with '0'! */
+                       if ( val.bv_val[0] == '0' && !OID_SEPARATOR( val.bv_val[1] ) ) {
                                break;
                        }