]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapi/slapi_utils.c
Fix compare op
[openldap] / servers / slapd / slapi / slapi_utils.c
index 06768345c396cf824a9ecdbc4836aba582d6425e..e6613e4d1259d76f2c51b1f8ee7df560a74dce8d 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2002-2008 The OpenLDAP Foundation.
+ * Copyright 2002-2009 The OpenLDAP Foundation.
  * Portions Copyright 1997,2002-2003 IBM Corporation.
  * All rights reserved.
  *
@@ -26,6 +26,7 @@
 #include <ac/stdarg.h>
 #include <ac/ctype.h>
 #include <ac/unistd.h>
+#include <lutil.h>
 
 #include <slap.h>
 #include <slapi.h>
@@ -1820,9 +1821,16 @@ slapi_pw_find(
        struct berval   **vals, 
        struct berval   *v ) 
 {
-       /*
-        * FIXME: what's the point?
-        */
+       int i;
+
+       if( ( vals == NULL ) || ( v == NULL ) )
+               return 1;
+
+       for ( i = 0; vals[i] != NULL; i++ ) {
+               if ( !lutil_passwd( vals[i], v, NULL, NULL ) )
+                       return 0;
+       }
+
        return 1;
 }
 
@@ -3109,7 +3117,7 @@ int slapi_entry_schema_check( Slapi_PBlock *pb, Slapi_Entry *e )
 
        pb->pb_op->o_bd = select_backend( &e->e_nname, 0 );
        if ( pb->pb_op->o_bd != NULL ) {
-               rc = entry_schema_check( pb->pb_op, e, NULL, 0, 0,
+               rc = entry_schema_check( pb->pb_op, e, NULL, 0, 0, NULL,
                        &text, textbuf, textlen );
        }
        pb->pb_op->o_bd = be_orig;