]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/searchexample.sh
Do not return pointers into BerElement we do not own
[openldap] / servers / slapd / back-shell / searchexample.sh
index 26b70fefbd39ebf75758749cabe635098f495fa4..f975486f930d44d8d3da685d4a15be9be74e9de6 100644 (file)
@@ -1,4 +1,7 @@
-#!/bin/sh
+#! /bin/sh
+# $OpenLDAP$
+## Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
+## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
 
 while [ 1 ]; do
        read TAG VALUE
@@ -20,11 +23,13 @@ LOGIN=`echo $FILTER | sed -e 's/.*=\(.*\))/\1/'`
 
 PWLINE=`grep -i "^$LOGIN" /etc/passwd`
 
-sleep 60
+#sleep 60
 # if we found an entry that matches
 if [ $? = 0 ]; then
        echo $PWLINE | awk -F: '{
                printf("dn: cn=%s,%s\n", $1, base);
+               printf("objectclass: top\n");
+               printf("objectclass: person\n");
                printf("cn: %s\n", $1);
                printf("cn: %s\n", $5);
                printf("sn: %s\n", $1);