mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-19 14:30:57 +08:00
Make LD session options optional.
This commit is contained in:
parent
9b52584550
commit
be8cef8a76
@ -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 ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user