]> git.sur5r.net Git - openldap/commitdiff
ITS#4359,#2615 add slapi_pw_find()
authorHoward Chu <hyc@openldap.org>
Mon, 26 Jan 2009 22:36:36 +0000 (22:36 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 26 Jan 2009 22:36:36 +0000 (22:36 +0000)
servers/slapd/slapi/slapi_utils.c

index 3e1eb2269388337b5c21eadfc7a5087589da6116..ecf351d90dbe8324b77d831489fd87714123eddd 100644 (file)
@@ -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;
 }