}
if ( at->at_collective ) {
-#ifdef SLAP_COLLECTIVE
if( at->at_usage ) {
/* collective attributes cannot be operational */
return SLAP_SCHERR_NOT_SUPPORTED;
}
+
if( at->at_single_value ) {
/* collective attributes cannot be single-valued */
return SLAP_SCHERR_NOT_SUPPORTED;
}
-#else
- return SLAP_SCHERR_NOT_SUPPORTED;
-#endif
}
sat = (AttributeType *) ch_calloc( 1, sizeof(AttributeType) );
is_entry_objectclass((e), slap_schema.si_oc_referral)
#define is_entry_subentry(e) \
is_entry_objectclass((e), slap_schema.si_oc_subentry)
+#define is_entry_collectiveAttributes(e) \
+ is_entry_objectclass((e), slap_schema.si_oc_collectiveAttributes)
#define is_entry_dynamicObject(e) \
is_entry_objectclass((e), slap_schema.si_oc_dynamicObject)
File Description
---- -----------
+collective.schema Collective attributes
corba.schema Corba Object (RFC 2714)
core.schema OpenLDAP "core"
cosine.schema COSINE Pilot
microsoft.schema Microsoft (FYI)
microsoft.std.schema Microsoft (FYI)
misc.schema misc (experimental)
-nadf.schema North American Directory Forum schema (obsolete)
+nadf.schema North American Directory Forum (obsolete)
nis.schema Network Information Service
openldap.schema OpenLDAP Project (FYI)
-vendor.schema Vendor Information (RFC 3045) schema
Additional "generally useful" schema definitions can be submitted
using the OpenLDAP Issue Tracking System <http://www.openldap.org/its/>.
# The c-l attribute type specifies a locality name for a collection of
# entries.
#
-objectClass ( 2.5.4.7.1 NAME 'c-l'
+attributeType ( 2.5.4.7.1 NAME 'c-l'
SUP l COLLECTIVE )
#
#
# The c-st attribute type specifies a state or province name for a
# collection of entries.
#
-objectClass ( 2.5.4.8.1 NAME 'c-st'
+attributeType ( 2.5.4.8.1 NAME 'c-st'
SUP st COLLECTIVE )
#
#
# The c-street attribute type specifies a street address for a
# collection of entries.
#
-objectClass ( 2.5.4.9.1 NAME 'c-street'
+attributeType ( 2.5.4.9.1 NAME 'c-street'
SUP street COLLECTIVE )
#
#
# The c-o attribute type specifies an organization name for a collection
# of entries.
#
-objectClass ( 2.5.4.10.1 NAME 'c-o'
+attributeType ( 2.5.4.10.1 NAME 'c-o'
SUP o COLLECTIVE )
#
#
# The c-ou attribute type specifies an organizational unit name for a
# collection of entries.
#
-objectClass ( 2.5.4.11.1 NAME 'c-ou'
+attributeType ( 2.5.4.11.1 NAME 'c-ou'
SUP ou COLLECTIVE )
#
#
# The c-PostalAddress attribute type specifies a postal address for a
# collection of entries.
#
-objectClass ( 2.5.4.16.1 NAME 'c-PostalAddress'
+attributeType ( 2.5.4.16.1 NAME 'c-PostalAddress'
SUP postalAddress COLLECTIVE )
#
#
# The c-PostalCode attribute type specifies a postal code for a
# collection of entries.
#
-objectClass ( 2.5.4.17.1 NAME 'c-PostalCode'
+attributeType ( 2.5.4.17.1 NAME 'c-PostalCode'
SUP postalCode COLLECTIVE )
#
#
# The c-PostOfficeBox attribute type specifies a post office box for a
# collection of entries.
#
-objectClass ( 2.5.4.18.1 NAME 'c-PostOfficeBox'
+attributeType ( 2.5.4.18.1 NAME 'c-PostOfficeBox'
SUP postOfficeBox COLLECTIVE )
#
#
# The c-PhysicalDeliveryOfficeName attribute type specifies a physical
# delivery office name for a collection of entries.
#
-objectClass ( 2.5.4.19.1 NAME 'c-PhysicalDeliveryOfficeName'
+attributeType ( 2.5.4.19.1 NAME 'c-PhysicalDeliveryOfficeName'
SUP physicalDeliveryOfficeName COLLECTIVE )
#
#
# The c-TelephoneNumber attribute type specifies a telephone number for
# a collection of entries.
#
-objectClass ( 2.5.4.20.1 NAME 'c-TelephoneNumber'
+attributeType ( 2.5.4.20.1 NAME 'c-TelephoneNumber'
SUP telephoneNumber COLLECTIVE )
#
#
# The c-TelexNumber attribute type specifies a telex number for a
# collection of entries.
#
-objectClass ( 2.5.4.19.1 NAME 'c-TelexNumber'
+attributeType ( 2.5.4.21.1 NAME 'c-TelexNumber'
SUP telexNumber COLLECTIVE )
#
#
# The c-FacsimileTelephoneNumber attribute type specifies a facsimile
# telephone number for a collection of entries.
#
-objectClass ( 2.5.4.23.1 NAME 'c-FacsimileTelephoneNumber'
+attributeType ( 2.5.4.23.1 NAME 'c-FacsimileTelephoneNumber'
SUP facsimileTelephoneNumber COLLECTIVE )
#
#
# The c-InternationalISDNNumber attribute type specifies an
# international ISDN number for a collection of entries.
#
-objectClass ( 2.5.4.25.1 NAME 'c-InternationalISDNNumber'
+attributeType ( 2.5.4.25.1 NAME 'c-InternationalISDNNumber'
SUP internationalISDNNumber COLLECTIVE )
# distinguishedNameSyntax
# ::= {pilotAttributeType 24}
#
-
## OBSOLETE
#attributetype ( 0.9.2342.19200300.100.1.24 NAME 'lastModifiedBy'
# DESC 'RFC1274: last modifier, replaced by modifiersName'
AttributeDescription *ad_objectClass
= slap_schema.si_ad_objectClass;
int extensible = 0;
+ int subentry = is_entry_subentry( e );
+ int collective = 0;
+
+ if( subentry) collective = is_entry_collectiveAttributes( e );
*text = textbuf;
/* misc attribute checks */
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
+ const char *type = a->a_desc->ad_cname.bv_val;
+
/* there should be at least one value */
assert( a->a_vals );
assert( a->a_vals[0].bv_val != NULL );
}
}
+ if( !collective && is_at_collective( a->a_desc->ad_type ) ) {
+ snprintf( textbuf, textlen, "attribute '%s' "
+ "may only appear in collectiveAttributes subentry",
+ type );
+ return LDAP_OBJECT_CLASS_VIOLATION;
+ }
+
/* if single value type, check for multiple values */
if( is_at_single_value( a->a_desc->ad_type ) &&
a->a_vals[1].bv_val != NULL )
{
- char *type = a->a_desc->ad_cname.bv_val;
-
snprintf( textbuf, textlen,
"attribute '%s' cannot have multiple values",
type );