]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/shell-backends/passwd-shell.c
address ITS#4332; might remove dynamicObject counting
[openldap] / servers / slapd / shell-backends / passwd-shell.c
index c62b5d058f88305881df1beeed883065251f3d90..77601fc30e613dac9b799bab860c9e15d78c531a 100644 (file)
@@ -1,16 +1,32 @@
-/*
- passwd-shell.c - /etc/passwd shell-based backend for standalone ldap server
-
- Copyright (c) 1995 Regents of the University of Michigan.
- All rights reserved.
-
- Redistribution and use in source and binary forms are permitted
- provided that this notice is preserved and that due credit is given
- to the University of Michigan at Ann Arbor. The name of the University
- may not be used to endorse or promote products derived from this
- software without specific prior written permission. This software
- is provided ``as is'' without express or implied warranty.
-*/
+/* passwd-shell.c - passwd(5) shell-based backend for slapd(8) */
+/* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2006 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* Portions Copyright (c) 1995 Regents of the University of Michigan.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of Michigan at Ann Arbor. The name of the University
+ * may not be used to endorse or promote products derived from this
+ * software without specific prior written permission. This software
+ * is provided ``as is'' without express or implied warranty.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This work was originally developed by the University of Michigan
+ * (as part of U-MICH LDAP).
+ */
 
 
 #include "portable.h"
@@ -28,8 +44,6 @@
 #include <ldap.h>
 
 #include "shellutil.h"
-#include "passwd-shell.h"
-
 
 static void pwdfile_search LDAP_P(( struct ldop *op, FILE *ofp ));
 static struct ldentry *pw2entry LDAP_P(( struct ldop *op, struct passwd *pw ));
@@ -111,8 +125,8 @@ pwdfile_search( struct ldop *op, FILE *ofp )
                    write_entry( op, entry, ofp );
                    break;
                }
-           } else if ( test_filter( op, entry )) {
-               write_entry( op, entry, ofp );
+           } else if ( test_filter( op, entry ) == LDAP_COMPARE_TRUE ) {
+                       write_entry( op, entry, ofp );
            }
            free_entry( entry );
        }