]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/test.c
cleanup last commit, add commit
[openldap] / libraries / libldap / test.c
index 1d24586a5d556dee3c2ecab90f17e6354420a837..67b74616365262de22ec6bb9873d28e9c9b023a7 100644 (file)
@@ -1,7 +1,16 @@
 /* $OpenLDAP$ */
-/*
- * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2004 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>.
  */
 
 #include "portable.h"
@@ -578,7 +587,7 @@ main( int argc, char **argv )
                        get_line( dn, sizeof(dn), stdin, "searchbase? " );
                        strcat( dn, dnsuffix );
                        get_line( line, sizeof(line), stdin,
-                           "scope (0=Base, 1=One Level, 2=Subtree)? " );
+                           "scope (0=baseObject, 1=oneLevel, 2=subtree, 3=children)? " );
                        scope = atoi( line );
                        get_line( filter, sizeof(filter), stdin,
                            "search filter (e.g. sn=jones)? " );
@@ -627,9 +636,14 @@ main( int argc, char **argv )
                                    printf( " <%s>", ludp->lud_attrs[ i ] );
                                }
                            }
-                           printf( "\n\t scope: %s\n", ludp->lud_scope == LDAP_SCOPE_ONELEVEL ?
-                               "ONE" : ludp->lud_scope == LDAP_SCOPE_BASE ? "BASE" :
-                               ludp->lud_scope == LDAP_SCOPE_SUBTREE ? "SUB" : "**invalid**" );
+                           printf( "\n\t scope: %s\n",
+                                       ludp->lud_scope == LDAP_SCOPE_BASE ? "baseObject"
+                                       : ludp->lud_scope == LDAP_SCOPE_ONELEVEL ? "oneLevel"
+                                       : ludp->lud_scope == LDAP_SCOPE_SUBTREE ? "subtree"
+#ifdef LDAP_SCOPE_SUBORDINATE
+                                       : ludp->lud_scope == LDAP_SCOPE_SUBORDINATE ? "children"
+#endif
+                                       : "**invalid**" );
                            printf( "\tfilter: <%s>\n", ludp->lud_filter );
                            ldap_free_urldesc( ludp );
                        }