int
at_add(
LDAPAttributeType *at,
+ int user,
const char **err )
{
AttributeType *sat;
}
}
+ if ( !user )
+ sat->sat_flags |= SLAP_AT_HARDCODE;
+
if ( at->at_syntax_oid ) {
syn = syn_find(sat->sat_syntax_oid);
if ( syn == NULL ) {
return -1;
}
- code = at_add(at, &err);
+ code = at_add(at, 0, &err);
if ( code ) {
Debug( LDAP_DEBUG_ANY, "monitor_back_db_init: "
"%s in attributeType \"%s\"\n",
break;
case CFG_OID:
- if(parse_oidm(c->fname, c->lineno, c->argc, c->argv)) return(0);
+ if(parse_oidm(c->fname, c->lineno, c->argc, c->argv, 1)) return(0);
break;
case CFG_OC:
for (i=0; OidMacros[i].name; i++ ) {
argv[1] = OidMacros[i].name;
argv[2] = OidMacros[i].oid;
- parse_oidm( "slapd", i, 3, argv );
+ parse_oidm( "slapd", i, 3, argv, 0 );
}
bi->bi_cf_table = ct;
ct[i].attribute, ldap_scherr2str(code), err );
return code;
}
- code = at_add( at, &err );
+ code = at_add( at, 0, &err );
if ( code && code != SLAP_SCHERR_ATTR_DUP ) {
fprintf( stderr, "init_config_attrs: AttributeType \"%s\": %s, %s\n",
ct[i].attribute, scherr2str(code), err );
const char *fname,
int lineno,
int argc,
- char **argv )
+ char **argv,
+ int user )
{
char *oid;
OidMacro *om;
}
om->som_oid.bv_len = strlen( om->som_oid.bv_val );
+ if ( !user )
+ om->som_flags |= SLAP_OM_HARDCODE;
LDAP_SLIST_INSERT_HEAD( &om_list, om, som_next );
return 0;
return -1;
}
- code = at_add(at, &err);
+ code = at_add(at, 0, &err);
if ( code ) {
Debug( LDAP_DEBUG_ANY, "lastmod_init: "
"%s in attributeType '%s'\n",
ldap_scherr2str(code), err );
return code;
}
- code = at_add( at, &err );
+ code = at_add( at, 0, &err );
if ( !code ) {
slap_str2ad( at->at_names[0], &ad_queryid, &err );
}
ldap_scherr2str(code), err );
return code;
}
- code = at_add( at, &err );
+ code = at_add( at, 0, &err );
if ( !code ) {
slap_str2ad( at->at_names[0], pwd_OpSchema[i].ad, &err );
}
int pos, AttributeType ***listp ));
LDAP_SLAPD_F (int) at_schema_info LDAP_P(( Entry *e ));
LDAP_SLAPD_F (int) at_add LDAP_P((
- LDAPAttributeType *at, const char **err ));
+ LDAPAttributeType *at, int user, const char **err ));
LDAP_SLAPD_F (void) at_destroy LDAP_P(( void ));
LDAP_SLAPD_F (int) is_at_subtype LDAP_P((
LDAP_SLAPD_F (void) oidm_destroy LDAP_P(( void ));
LDAP_SLAPD_F (void) oidm_unparse LDAP_P(( BerVarray *bva ));
LDAP_SLAPD_F (int) parse_oidm LDAP_P((
- const char *fname, int lineno, int argc, char **argv ));
+ const char *fname, int lineno, int argc, char **argv, int user ));
/*
* operation.c
return LDAP_OTHER;
}
- code = at_add( at, &err );
+ code = at_add( at, 0, &err );
if ( code ) {
fprintf( stderr, "slap_schema_load: AttributeType "
"\"%s\": %s: \"%s\"\n",
return 1;
}
- code = at_add(at,&err);
+ code = at_add(at,1,&err);
if ( code ) {
fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
fname, lineno, scherr2str(code), err);
struct berval som_oid;
BerVarray som_names;
BerVarray som_subs;
+#define SLAP_OM_HARDCODE 0x10000U /* This is hardcoded schema */
+ int som_flags;
LDAP_SLIST_ENTRY(slap_oid_macro) som_next;
} OidMacro;
#define SLAP_AT_DYNAMIC 0x0400U /* dynamically generated */
#define SLAP_AT_ORDERED 0x0001U /* values are ordered */
+#define SLAP_AT_HARDCODE 0x10000U /* This is hardcoded schema */
slap_mask_t sat_flags;
#else
#define SLAP_OC_HIDE 0x8000
#endif
+#define SLAP_OC_HARDCODE 0x10000U /* This is hardcoded schema */
/*
* DIT content rule