summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/plugin.c
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2009-05-08 09:14:42 -0700
committerNathan Kinder <nkinder@redhat.com>2009-05-08 09:14:42 -0700
commitd19eafcd211d89cffdac1b2c3432087443e7d122 (patch)
tree26d2b7f956c2ceaa3f605a42552a113e156b5b30 /ldap/servers/slapd/plugin.c
parent5d3d883251dd15cf719181e33fb6954454869822 (diff)
downloadds-d19eafcd211d89cffdac1b2c3432087443e7d122.tar.gz
ds-d19eafcd211d89cffdac1b2c3432087443e7d122.tar.xz
ds-d19eafcd211d89cffdac1b2c3432087443e7d122.zip
Added capability to validate syntax of values being added to the database. Also added numericstring syntax support.
For more details, see the design doc at http://directory.fedoraproject.org/wiki/Syntax_Validation_Design
Diffstat (limited to 'ldap/servers/slapd/plugin.c')
-rw-r--r--ldap/servers/slapd/plugin.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c
index a7ad7dff..5ae63564 100644
--- a/ldap/servers/slapd/plugin.c
+++ b/ldap/servers/slapd/plugin.c
@@ -1878,35 +1878,37 @@ plugin_add_descriptive_attributes( Slapi_Entry *e, struct slapdplugin *plugin )
if ( NULL == plugin )
{
+ /* This can happen for things such as disabled syntax plug-ins. We
+ * just treat this as a warning to allow the description attributes
+ * to be set to a default value to avoid an objectclass violation. */
LDAPDebug(LDAP_DEBUG_PLUGIN,
- "Error: failed to add descriptive values for plugin %s"
- " (could not find plugin entry)\n",
+ "Warning: couldn't find plugin %s in global list. "
+ "Adding default descriptive values.\n",
slapi_entry_get_dn_const(e), 0, 0 );
- return 1; /* failure */
}
}
if (add_plugin_description(e, ATTR_PLUGIN_PLUGINID,
- plugin->plg_desc.spd_id))
+ plugin ? plugin->plg_desc.spd_id : NULL))
{
status = 1;
}
if (add_plugin_description(e, ATTR_PLUGIN_VERSION,
- plugin->plg_desc.spd_version))
+ plugin ? plugin->plg_desc.spd_version : NULL))
{
status = 1;
}
if (add_plugin_description(e, ATTR_PLUGIN_VENDOR,
- plugin->plg_desc.spd_vendor))
+ plugin ? plugin->plg_desc.spd_vendor: NULL))
{
status = 1;
}
if (add_plugin_description(e, ATTR_PLUGIN_DESC,
- plugin->plg_desc.spd_description))
+ plugin ? plugin->plg_desc.spd_description : NULL))
{
status = 1;
}