[Fedora-directory-commits] ldapserver/ldap/servers/slapd attrsyntax.c, 1.4, 1.4.2.1 dn.c, 1.6.2.2, 1.6.2.3 libslapd.def, 1.11.2.3, 1.11.2.4 slapi-plugin.h, 1.8.2.1, 1.8.2.2
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Fri Jan 11 20:52:48 UTC 2008
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10506/slapd
Modified Files:
Tag: Directory71RtmBranch
attrsyntax.c dn.c libslapd.def slapi-plugin.h
Log Message:
Resolves: #288321
Summary: ns-slapd aborts during updating attribute values which contain +
characters with nothing after them
Description: applied the patch to Directory71RtmBranch
Index: attrsyntax.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/attrsyntax.c,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -r1.4 -r1.4.2.1
--- attrsyntax.c 19 Apr 2005 22:07:36 -0000 1.4
+++ attrsyntax.c 11 Jan 2008 20:52:46 -0000 1.4.2.1
@@ -726,6 +726,22 @@
}
}
+/* Returns the oid of the syntax of the Slapi_Attr that's passed in.
+ * The caller must dispose of oid by calling slapi_ch_free_string(). */
+int
+slapi_attr_get_syntax_oid_copy( const Slapi_Attr *a, char **oidp )
+{
+ void *pi = NULL;
+
+ if (a && (slapi_attr_type2plugin(a->a_type, &pi) == 0)) {
+ *oidp = slapi_ch_strdup(plugin_syntax2oid(pi));
+ return( 0 );
+ } else {
+ *oidp = NULL;
+ return( -1 );
+ }
+}
+
#ifdef ATTR_LDAP_DEBUG
PRIntn
Index: dn.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dn.c,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -r1.6.2.2 -r1.6.2.3
--- dn.c 2 Mar 2006 01:12:25 -0000 1.6.2.2
+++ dn.c 11 Jan 2008 20:52:46 -0000 1.6.2.3
@@ -337,7 +337,13 @@
/*
* Track and sort attribute values within multivalued RDNs.
*/
- if ( rdn_av_count > 0 ) {
+ /* We may still be in an unexpected state, such as B4TYPE if
+ * we encountered something odd like a '+' at the end of the
+ * rdn. If this is the case, we don't want to add this bogus
+ * rdn to our list to sort. We should only be in the INVALUE
+ * or B4SEPARATOR state if we have a valid rdn component to
+ * be added. */
+ if ((rdn_av_count > 0) && ((state == INVALUE) || (state == B4SEPARATOR))) {
add_rdn_av( typestart, d, &rdn_av_count,
&rdn_avs, initial_rdn_av_stack );
}
@@ -347,7 +353,6 @@
if ( rdn_av_count > 0 ) {
reset_rdn_avs( &rdn_avs, &rdn_av_count );
}
-
/* Trim trailing spaces */
while ( d != dn && *(d - 1) == ' ' ) d--; /* XXX 518524 */
Index: libslapd.def
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/libslapd.def,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -u -r1.11.2.3 -r1.11.2.4
--- libslapd.def 19 Mar 2006 21:20:45 -0000 1.11.2.3
+++ libslapd.def 11 Jan 2008 20:52:46 -0000 1.11.2.4
@@ -1180,3 +1180,4 @@
sasl_map_done @1179
slapd_SECITEM_FreeItem @1180
slapi_op_type_to_string @1181
+ slapi_attr_get_syntax_oid_copy @1182
Index: slapi-plugin.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -r1.8.2.1 -r1.8.2.2
--- slapi-plugin.h 2 Mar 2006 01:12:25 -0000 1.8.2.1
+++ slapi-plugin.h 11 Jan 2008 20:52:46 -0000 1.8.2.2
@@ -391,6 +391,7 @@
int slapi_attr_type2plugin( const char *type, void **pi );
int slapi_attr_get_type( Slapi_Attr *attr, char **type );
int slapi_attr_get_oid_copy( const Slapi_Attr *attr, char **oidp );
+int slapi_attr_get_syntax_oid_copy( const Slapi_Attr *a, char **oidp );
int slapi_attr_get_flags( const Slapi_Attr *attr, unsigned long *flags );
int slapi_attr_flag_is_set( const Slapi_Attr *attr, unsigned long flag );
int slapi_attr_value_cmp( const Slapi_Attr *attr, const struct berval *v1, const struct berval *v2 );
More information about the Fedora-directory-commits
mailing list