mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
fix yet another potential dereference of NULL op (caught by Coverity)
This commit is contained in:
parent
df2dcbcbe6
commit
f95fe8c756
1 changed files with 10 additions and 10 deletions
|
|
@ -3925,7 +3925,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
int i, ibase = -1, nocs, rc = 0;
|
int i, ibase = -1, nocs, rc = 0;
|
||||||
struct berval pdn;
|
struct berval pdn;
|
||||||
ConfigTable *ct;
|
ConfigTable *ct;
|
||||||
char *ptr;
|
char *ptr, *log_prefix = op ? op->o_log_prefix : "";
|
||||||
|
|
||||||
memset( ca, 0, sizeof(ConfigArgs));
|
memset( ca, 0, sizeof(ConfigArgs));
|
||||||
|
|
||||||
|
|
@ -3941,7 +3941,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
{
|
{
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" already exists\n",
|
"DN=\"%s\" already exists\n",
|
||||||
op->o_log_prefix, e->e_name.bv_val, 0 );
|
log_prefix, e->e_name.bv_val, 0 );
|
||||||
return LDAP_ALREADY_EXISTS;
|
return LDAP_ALREADY_EXISTS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3957,7 +3957,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
}
|
}
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" not child of DN=\"%s\"\n",
|
"DN=\"%s\" not child of DN=\"%s\"\n",
|
||||||
op ? op->o_log_prefix : "", e->e_name.bv_val,
|
log_prefix, e->e_name.bv_val,
|
||||||
last->ce_entry->e_name.bv_val );
|
last->ce_entry->e_name.bv_val );
|
||||||
return LDAP_NO_SUCH_OBJECT;
|
return LDAP_NO_SUCH_OBJECT;
|
||||||
}
|
}
|
||||||
|
|
@ -3973,7 +3973,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
{
|
{
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" no write access to \"children\" of parent\n",
|
"DN=\"%s\" no write access to \"children\" of parent\n",
|
||||||
op->o_log_prefix, e->e_name.bv_val, 0 );
|
log_prefix, e->e_name.bv_val, 0 );
|
||||||
return LDAP_INSUFFICIENT_ACCESS;
|
return LDAP_INSUFFICIENT_ACCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3982,7 +3982,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
if ( !oc_at ) {
|
if ( !oc_at ) {
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" no objectClass\n",
|
"DN=\"%s\" no objectClass\n",
|
||||||
op ? op->o_log_prefix : "", e->e_name.bv_val, 0 );
|
log_prefix, e->e_name.bv_val, 0 );
|
||||||
return LDAP_OBJECT_CLASS_VIOLATION;
|
return LDAP_OBJECT_CLASS_VIOLATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3998,7 +3998,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
if ( rc != LDAP_SUCCESS ) {
|
if ( rc != LDAP_SUCCESS ) {
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" no structural objectClass (%s)\n",
|
"DN=\"%s\" no structural objectClass (%s)\n",
|
||||||
op ? op->o_log_prefix : "", e->e_name.bv_val, text );
|
log_prefix, e->e_name.bv_val, text );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
attr_merge_one( e, slap_schema.si_ad_structuralObjectClass, &soc->soc_cname, NULL );
|
attr_merge_one( e, slap_schema.si_ad_structuralObjectClass, &soc->soc_cname, NULL );
|
||||||
|
|
@ -4007,7 +4007,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" no structural objectClass; "
|
"DN=\"%s\" no structural objectClass; "
|
||||||
"unable to merge computed class %s\n",
|
"unable to merge computed class %s\n",
|
||||||
op ? op->o_log_prefix : "", e->e_name.bv_val,
|
log_prefix, e->e_name.bv_val,
|
||||||
soc->soc_cname.bv_val );
|
soc->soc_cname.bv_val );
|
||||||
return LDAP_OBJECT_CLASS_VIOLATION;
|
return LDAP_OBJECT_CLASS_VIOLATION;
|
||||||
}
|
}
|
||||||
|
|
@ -4015,7 +4015,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" no structural objectClass; "
|
"DN=\"%s\" no structural objectClass; "
|
||||||
"computed objectClass %s merged\n",
|
"computed objectClass %s merged\n",
|
||||||
op ? op->o_log_prefix : "", e->e_name.bv_val,
|
log_prefix, e->e_name.bv_val,
|
||||||
soc->soc_cname.bv_val );
|
soc->soc_cname.bv_val );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4036,7 +4036,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
if ( coptr == NULL ) {
|
if ( coptr == NULL ) {
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" no structural objectClass in configuration table\n",
|
"DN=\"%s\" no structural objectClass in configuration table\n",
|
||||||
op ? op->o_log_prefix : "", e->e_name.bv_val, 0 );
|
log_prefix, e->e_name.bv_val, 0 );
|
||||||
return LDAP_OBJECT_CLASS_VIOLATION;
|
return LDAP_OBJECT_CLASS_VIOLATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4059,7 +4059,7 @@ config_add_internal( CfBackInfo *cfb, Entry *e, ConfigArgs *ca, SlapReply *rs,
|
||||||
if ( rc == LDAP_CONSTRAINT_VIOLATION ) {
|
if ( rc == LDAP_CONSTRAINT_VIOLATION ) {
|
||||||
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
Debug( LDAP_DEBUG_TRACE, "%s: config_add_internal: "
|
||||||
"DN=\"%s\" no structural objectClass add function\n",
|
"DN=\"%s\" no structural objectClass add function\n",
|
||||||
op ? op->o_log_prefix : "", e->e_name.bv_val, 0 );
|
log_prefix, e->e_name.bv_val, 0 );
|
||||||
return LDAP_OBJECT_CLASS_VIOLATION;
|
return LDAP_OBJECT_CLASS_VIOLATION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue