From ed0e5393b48964fecc80a69a3283017492448223 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 5 Sep 1999 19:20:01 +0000 Subject: [PATCH] Disable REFERRALS. Should add -C/-CC/-R options (chase w/ prompting, chase w/o prompting, disable referrals). --- clients/tools/ldapdelete.c | 3 +++ clients/tools/ldapmodify.c | 2 ++ clients/tools/ldapmodrdn.c | 3 +++ clients/tools/ldappasswd.c | 2 ++ 4 files changed, 10 insertions(+) diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 694d7f8b61..c69bf02d86 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -157,6 +157,9 @@ main( int argc, char **argv ) ldap_set_option( ld, LDAP_OPT_DEREF, &deref ); } + /* don't chase referrals */ + ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF ); + if (want_bindpw) passwd = getpass("Enter LDAP Password: "); diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index bd6a0cb64a..8ad142745b 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -251,6 +251,8 @@ main( int argc, char **argv ) int deref = LDAP_DEREF_NEVER; ldap_set_option( ld, LDAP_OPT_DEREF, &deref); } + /* don't chase referrals */ + ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF ); if (want_bindpw) passwd = getpass("Enter LDAP Password: "); diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index 9e4556964c..7246d334d1 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -209,6 +209,9 @@ main(int argc, char **argv) int deref = LDAP_DEREF_NEVER; ldap_set_option( ld, LDAP_OPT_DEREF, &deref); } + /* don't chase referrals */ + ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF ); + if (want_bindpw) passwd = getpass("Enter LDAP Password: "); diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index f463b0379b..e9c51e3767 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -623,6 +623,8 @@ main (int argc, char *argv[]) int deref = LDAP_DEREF_NEVER; ldap_set_option( ld, LDAP_OPT_DEREF, &deref); } + /* don't chase referrals */ + ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_OFF ); if (version != -1 && ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version ) != LDAP_OPT_SUCCESS ) -- 2.39.5