[Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes string.c, 1.9.2.3, 1.9.2.4

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Aug 7 18:35:30 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14316

Modified Files:
      Tag: Directory_Server_8_0_Branch
	string.c 
Log Message:
Resolves: bug 458171
Description: string_filter_approx used to simply return the return value from
strcmp.  The value could be evaluated as LDAP RETURN CODE. 
string_filter_approx is a static function and it's called only from
string_filter_ava.  The function returns -1 when it fails. Thus, adjusting the
return value of string_filter_approx to the caller function.
Branch: Directory_Server_8_0_Branch



Index: string.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/string.c,v
retrieving revision 1.9.2.3
retrieving revision 1.9.2.4
diff -u -r1.9.2.3 -r1.9.2.4
--- string.c	18 Jul 2008 23:13:41 -0000	1.9.2.3
+++ string.c	7 Aug 2008 18:35:27 -0000	1.9.2.4
@@ -112,6 +112,10 @@
 	return( -1 );
 }
 
+/*
+ * return value:  0 -- approximately matched
+ *               -1 -- did not match
+ */
 static int
 string_filter_approx( struct berval *bvfilter, Slapi_Value **bvals,
 							 Slapi_Value **retVal)
@@ -179,6 +183,9 @@
 			break;
 		}
 	}
+	if (0 != rc) {
+		rc = -1;
+	}
 	LDAPDebug( LDAP_DEBUG_TRACE, "<= string_filter_approx %d\n",
 	    rc, 0, 0 );
 




More information about the Fedora-directory-commits mailing list