]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Make LD session options optional.
authorKurt Zeilenga <kurt@openldap.org>
Tue, 29 Dec 1998 05:47:33 +0000 (05:47 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 29 Dec 1998 05:47:33 +0000 (05:47 +0000)
clients/tools/ldapsearch.c

index f476af77f7082b6201ca1d07dcd84b8ff8c014b8..065dc790def37494edbbfa230798e16b3aa47430 100644 (file)
@@ -94,15 +94,16 @@ main( int argc, char **argv )
     LDAP               *ld;
 
     infile = NULL;
-    deref = verbose = allow_binary = not = kerberos = vals2tmp =
+    verbose = allow_binary = not = kerberos = vals2tmp =
            attrsonly = ldif = 0;
 #ifdef LDAP_REFERRALS
     ldap_options = LDAP_OPT_REFERRALS;
 #else /* LDAP_REFERRALS */
     ldap_options = 0;
 #endif /* LDAP_REFERRALS */
-    sizelimit = timelimit = 0;
-    scope = LDAP_SCOPE_SUBTREE;
+
+    deref = sizelimit = timelimit = -1;
+       scope = LDAP_SCOPE_SUBTREE;
 
     while (( i = getopt( argc, argv,
 #ifdef HAVE_KERBEROS
@@ -260,9 +261,15 @@ main( int argc, char **argv )
        exit( 1 );
     }
 
-    ld->ld_deref = deref;
-    ld->ld_timelimit = timelimit;
-    ld->ld_sizelimit = sizelimit;
+       if(deref != -1) {
+       ld->ld_deref = deref;
+       }
+       if(timelimit != -1) {
+       ld->ld_timelimit = timelimit;
+       }
+       if(sizelimit != -1) {
+       ld->ld_sizelimit = sizelimit;
+       }
     ld->ld_options = ldap_options;
 
     if ( !kerberos ) {