]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-passwd/search.c
filter2bv can't de-normalize UUIDs, must do it explicitly for back-ldap
[openldap] / servers / slapd / back-passwd / search.c
index 76386d756b0d415c524ce8a15cc49e24a2d1bdb0..23a74ab53aedaa0ec8e49534cfd3b034654a97e8 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,7 @@ passwd_back_search(
     SlapReply  *rs )
 {
        struct passwd   *pw;
-       time_t          stoptime;
+       time_t          stoptime = (time_t)-1;
 
        LDAPRDN rdn = NULL;
        struct berval parent = BER_BVNULL;
@@ -324,10 +324,10 @@ pw2entry( Backend *be, struct passwd *pw, Entry *e )
                ber_str2bv( pw->pw_gecos, 0, 0, &val );
                attr_merge_normalize_one( e, ad_desc, &val, NULL );
 
-               s = strchr( val.bv_val, ',' );
+               s = ber_bvchr( &val, ',' );
                if ( s ) *s = '\0';
 
-               s = strchr( val.bv_val, '&' );
+               s = ber_bvchr( &val, '&' );
                if ( s ) {
                        char buf[1024];