From e8b2c7f3be8c8a7b8bdb1ba9416cdc42a74c9764 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 25 Jun 2004 01:05:49 +0000 Subject: [PATCH] Fix wrong error when using operative attribute in objectclass definition (ITS#3205) --- servers/slapd/oc.c | 3 ++- servers/slapd/schemaparse.c | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/servers/slapd/oc.c b/servers/slapd/oc.c index 78ebaa7c60..42fd967ec3 100644 --- a/servers/slapd/oc.c +++ b/servers/slapd/oc.c @@ -469,6 +469,7 @@ oc_add( } if ( code != 0 ) return code; + if( user && op ) return SLAP_SCHERR_CLASS_BAD_SUP; code = oc_create_required( soc, soc->soc_at_oids_must, &op, err ); if ( code != 0 ) return code; @@ -476,7 +477,7 @@ oc_add( code = oc_create_allowed( soc, soc->soc_at_oids_may, &op, err ); if ( code != 0 ) return code; - if( user && op ) return SLAP_SCHERR_CLASS_BAD_SUP; + if( user && op ) return SLAP_SCHERR_CLASS_BAD_USAGE; code = oc_insert(soc,err); return code; diff --git a/servers/slapd/schemaparse.c b/servers/slapd/schemaparse.c index d38fbfa1bb..630d7c3289 100644 --- a/servers/slapd/schemaparse.c +++ b/servers/slapd/schemaparse.c @@ -126,8 +126,7 @@ parse_cr( const char *fname, int lineno, char *line, - char **argv -) + char **argv ) { LDAPContentRule *cr; int code; @@ -165,8 +164,7 @@ parse_oc( const char *fname, int lineno, char *line, - char **argv -) + char **argv ) { LDAPObjectClass *oc; int code; @@ -247,8 +245,7 @@ parse_at( const char *fname, int lineno, char *line, - char **argv -) + char **argv ) { LDAPAttributeType *at; int code; -- 2.39.5