Branch '389-ds-base-1.2.11' - ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 1970a559bfd4e7484acea1b5dcef4e846d4a7b53
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu Aug 7 12:18:57 2014 -0400
Ticket 47862 - repl-monitor fails to convert "*" to default values
Bug Description: When specifying the "connection" parameters, you are
allowed to use asterisks to signify default values.
This was not properly checked in the script, and the
the default values were not applied.
Fix Description: Properly check for "*" for the bind dn, bind password,
and certdir.
https://fedorahosted.org/389/ticket/47862
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit a498525a76aaafc7d2979f577d4e7a93a3158d0b)
Conflicts:
ldap/admin/src/scripts/repl-monitor.pl.in
(cherry picked from commit 44c4221d5f6ec3c7e8ca5d3452b24870f7cccf62)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 9107c2d..4cb0bef 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -1008,7 +1008,10 @@ sub add_server
$hostnode = $1 if $host =~ /^(.+?)\./;
# new host:port
- if (!$binddn || $binddn eq "" || !$bindpwd || $bindpwd eq "" || !$bindcert || $bindcert eq "") {
+ if (!$binddn || $binddn eq "" || $binddn eq "*" ||
+ !$bindpwd || $bindpwd eq "" || $bindpwd eq "*" ||
+ !$bindcert || $bindcert eq "" || $bindcert eq "*" )
+ {
#
# Look up connection parameter in the order of
# host:port
@@ -1043,8 +1046,8 @@ sub add_server
$binddn = $d;
}
}
- if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq ""))){
- $bindpwd = passwdPrompt($h, $p);
+ if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq "" || $bindpwd eq "*"))){
+ $bindpwd = passwdPrompt($h, $p);
} elsif ($passwd ne ""){
$bindpwd = $passwd;
} else {
9 years, 8 months
Branch '389-ds-base-1.3.1' - ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 353ede5050cc32cbcffdfb5058726aa989e96d4f
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu Aug 7 12:18:57 2014 -0400
Ticket 47862 - repl-monitor fails to convert "*" to default values
Bug Description: When specifying the "connection" parameters, you are
allowed to use asterisks to signify default values.
This was not properly checked in the script, and the
the default values were not applied.
Fix Description: Properly check for "*" for the bind dn, bind password,
and certdir.
https://fedorahosted.org/389/ticket/47862
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit a498525a76aaafc7d2979f577d4e7a93a3158d0b)
Conflicts:
ldap/admin/src/scripts/repl-monitor.pl.in
(cherry picked from commit 44c4221d5f6ec3c7e8ca5d3452b24870f7cccf62)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 9107c2d..4cb0bef 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -1008,7 +1008,10 @@ sub add_server
$hostnode = $1 if $host =~ /^(.+?)\./;
# new host:port
- if (!$binddn || $binddn eq "" || !$bindpwd || $bindpwd eq "" || !$bindcert || $bindcert eq "") {
+ if (!$binddn || $binddn eq "" || $binddn eq "*" ||
+ !$bindpwd || $bindpwd eq "" || $bindpwd eq "*" ||
+ !$bindcert || $bindcert eq "" || $bindcert eq "*" )
+ {
#
# Look up connection parameter in the order of
# host:port
@@ -1043,8 +1046,8 @@ sub add_server
$binddn = $d;
}
}
- if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq ""))){
- $bindpwd = passwdPrompt($h, $p);
+ if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq "" || $bindpwd eq "*"))){
+ $bindpwd = passwdPrompt($h, $p);
} elsif ($passwd ne ""){
$bindpwd = $passwd;
} else {
9 years, 8 months
Branch '389-ds-base-1.3.2' - ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 44c4221d5f6ec3c7e8ca5d3452b24870f7cccf62
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu Aug 7 12:18:57 2014 -0400
Ticket 47862 - repl-monitor fails to convert "*" to default values
Bug Description: When specifying the "connection" parameters, you are
allowed to use asterisks to signify default values.
This was not properly checked in the script, and the
the default values were not applied.
Fix Description: Properly check for "*" for the bind dn, bind password,
and certdir.
https://fedorahosted.org/389/ticket/47862
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit a498525a76aaafc7d2979f577d4e7a93a3158d0b)
Conflicts:
ldap/admin/src/scripts/repl-monitor.pl.in
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 9107c2d..4cb0bef 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -1008,7 +1008,10 @@ sub add_server
$hostnode = $1 if $host =~ /^(.+?)\./;
# new host:port
- if (!$binddn || $binddn eq "" || !$bindpwd || $bindpwd eq "" || !$bindcert || $bindcert eq "") {
+ if (!$binddn || $binddn eq "" || $binddn eq "*" ||
+ !$bindpwd || $bindpwd eq "" || $bindpwd eq "*" ||
+ !$bindcert || $bindcert eq "" || $bindcert eq "*" )
+ {
#
# Look up connection parameter in the order of
# host:port
@@ -1043,8 +1046,8 @@ sub add_server
$binddn = $d;
}
}
- if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq ""))){
- $bindpwd = passwdPrompt($h, $p);
+ if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq "" || $bindpwd eq "*"))){
+ $bindpwd = passwdPrompt($h, $p);
} elsif ($passwd ne ""){
$bindpwd = $passwd;
} else {
9 years, 8 months
ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit a498525a76aaafc7d2979f577d4e7a93a3158d0b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu Aug 7 12:18:57 2014 -0400
Ticket 47862 - repl-monitor fails to convert "*" to default values
Bug Description: When specifying the "connection" parameters, you are
allowed to use asterisks to signify default values.
This was not properly checked in the script, and the
the default values were not applied.
Fix Description: Properly check for "*" for the bind dn, bind password,
and certdir.
https://fedorahosted.org/389/ticket/47862
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 0ded096..3b1cf30 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -1086,7 +1086,10 @@ sub add_server
$hostnode = $1 if $host =~ /^(.+?)\./;
# new host:port
- if (!$binddn || $binddn eq "" || !$bindpwd || $bindpwd eq "" || !$bindcert || $bindcert eq "") {
+ if (!$binddn || $binddn eq "" || $binddn eq "*" ||
+ !$bindpwd || $bindpwd eq "" || $bindpwd eq "*" ||
+ !$bindcert || $bindcert eq "" || $bindcert eq "*" )
+ {
#
# Look up connection parameter in the order of
# host:port
@@ -1120,7 +1123,7 @@ sub add_server
$binddn = $d;
}
}
- if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq ""))){
+ if($prompt eq "yes" && ($w eq "" || (!$bindpwd || $bindpwd eq "" || $bindpwd eq "*"))){
$bindpwd = passwdPrompt($h, $p);
} elsif ($passwd ne ""){
$bindpwd = $passwd;
9 years, 8 months
Branch '389-ds-base-1.2.11' - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/opshared.c | 17 ++++++++++-------
ldap/servers/slapd/pagedresults.c | 5 +++++
2 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit 96741952eff493cca968914346bab898a064a986
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Jul 8 17:40:00 2014 -0700
Ticket #47824 - paged results control is not working in some cases when we have a subsuffix.
Bug Description: When a simple paged result search is run against
multiple backends, subsuffix backends were not correctly set to the
next loop when crossing the backend boundary.
Fix Description: This patch changes the logic to detect the page
search finished and set the next backend correctly to the paged-
results handle. Also, when reusing the paged result handle in
pagedresults_parse_control_value, increment the refcnt.
https://fedorahosted.org/389/ticket/47824
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
(cherry picked from commit b116d7e2a7a8e7443be93ecb84efee1364b6ba86)
(cherry picked from commit 0bc9016541b7033916bc9ca6636f447a95d33c36)
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index 1689283..65fcea6 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -510,7 +510,6 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
err_code = slapi_mapping_tree_select_all(pb, be_list, referral_list, errorbuf);
if (((err_code != LDAP_SUCCESS) && (err_code != LDAP_OPERATIONS_ERROR) && (err_code != LDAP_REFERRAL))
|| ((err_code == LDAP_OPERATIONS_ERROR) && (be_list[0] == NULL)))
-
{
send_ldap_result(pb, err_code, NULL, errorbuf, 0, NULL);
rc = -1;
@@ -713,10 +712,6 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
curr_search_count = -1;
} else {
curr_search_count = pnentries;
- /* no more entries, but at least another backend */
- if (pagedresults_set_current_be(pb->pb_conn, next_be, pr_idx) < 0) {
- goto free_and_return;
- }
}
estimate = 0;
} else {
@@ -731,12 +726,20 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
pagedresults_set_search_result_set_size_estimate(pb->pb_conn,
operation,
estimate, pr_idx);
- next_be = NULL; /* to break the loop */
- if (curr_search_count == -1) {
+ if (PAGEDRESULTS_SEARCH_END == pr_stat) {
pagedresults_lock(pb->pb_conn, pr_idx);
slapi_pblock_set(pb, SLAPI_SEARCH_RESULT_SET, NULL);
pagedresults_free_one(pb->pb_conn, operation, pr_idx);
pagedresults_unlock(pb->pb_conn, pr_idx);
+ if (next_be) {
+ /* no more entries, but at least another backend */
+ if (pagedresults_set_current_be(pb->pb_conn, next_be, pr_idx) < 0) {
+ goto free_and_return;
+ }
+ }
+ next_be = NULL; /* to break the loop */
+ } else if (PAGEDRESULTS_PAGE_END == pr_stat) {
+ next_be = NULL; /* to break the loop */
}
} else {
/* be_suffix null means that we are searching the default backend
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
index edd76c6..d589708 100644
--- a/ldap/servers/slapd/pagedresults.c
+++ b/ldap/servers/slapd/pagedresults.c
@@ -136,6 +136,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
}
conn->c_pagedresults.prl_count++;
} else {
+ PagedResults *prp = NULL;
/* Repeated paged results request.
* PagedResults is already allocated. */
char *ptr = slapi_ch_malloc(cookie.bv_len + 1);
@@ -143,6 +144,10 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
*(ptr+cookie.bv_len) = '\0';
*index = strtol(ptr, NULL, 10);
slapi_ch_free_string(&ptr);
+ prp = conn->c_pagedresults.prl_list + *index;
+ if (!(prp->pr_search_result_set)) { /* freed and reused for the next backend. */
+ conn->c_pagedresults.prl_count++;
+ }
}
/* reset sizelimit */
op->o_pagedresults_sizelimit = -1;
9 years, 8 months
Branch '389-ds-base-1.3.2' - ldap/servers
by Noriko Hosoi
ldap/servers/slapd/opshared.c | 17 ++++++++++-------
ldap/servers/slapd/pagedresults.c | 5 +++++
2 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit 0bc9016541b7033916bc9ca6636f447a95d33c36
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Jul 8 17:40:00 2014 -0700
Ticket #47824 - paged results control is not working in some cases when we have a subsuffix.
Bug Description: When a simple paged result search is run against
multiple backends, subsuffix backends were not correctly set to the
next loop when crossing the backend boundary.
Fix Description: This patch changes the logic to detect the page
search finished and set the next backend correctly to the paged-
results handle. Also, when reusing the paged result handle in
pagedresults_parse_control_value, increment the refcnt.
https://fedorahosted.org/389/ticket/47824
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
(cherry picked from commit b116d7e2a7a8e7443be93ecb84efee1364b6ba86)
diff --git a/ldap/servers/slapd/opshared.c b/ldap/servers/slapd/opshared.c
index 3fb23fa..e222b05 100644
--- a/ldap/servers/slapd/opshared.c
+++ b/ldap/servers/slapd/opshared.c
@@ -510,7 +510,6 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
err_code = slapi_mapping_tree_select_all(pb, be_list, referral_list, errorbuf);
if (((err_code != LDAP_SUCCESS) && (err_code != LDAP_OPERATIONS_ERROR) && (err_code != LDAP_REFERRAL))
|| ((err_code == LDAP_OPERATIONS_ERROR) && (be_list[0] == NULL)))
-
{
send_ldap_result(pb, err_code, NULL, errorbuf, 0, NULL);
rc = -1;
@@ -713,10 +712,6 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
curr_search_count = -1;
} else {
curr_search_count = pnentries;
- /* no more entries, but at least another backend */
- if (pagedresults_set_current_be(pb->pb_conn, next_be, pr_idx) < 0) {
- goto free_and_return;
- }
}
estimate = 0;
} else {
@@ -731,12 +726,20 @@ op_shared_search (Slapi_PBlock *pb, int send_result)
pagedresults_set_search_result_set_size_estimate(pb->pb_conn,
operation,
estimate, pr_idx);
- next_be = NULL; /* to break the loop */
- if (curr_search_count == -1) {
+ if (PAGEDRESULTS_SEARCH_END == pr_stat) {
pagedresults_lock(pb->pb_conn, pr_idx);
slapi_pblock_set(pb, SLAPI_SEARCH_RESULT_SET, NULL);
pagedresults_free_one(pb->pb_conn, operation, pr_idx);
pagedresults_unlock(pb->pb_conn, pr_idx);
+ if (next_be) {
+ /* no more entries, but at least another backend */
+ if (pagedresults_set_current_be(pb->pb_conn, next_be, pr_idx) < 0) {
+ goto free_and_return;
+ }
+ }
+ next_be = NULL; /* to break the loop */
+ } else if (PAGEDRESULTS_PAGE_END == pr_stat) {
+ next_be = NULL; /* to break the loop */
}
} else {
/* be_suffix null means that we are searching the default backend
diff --git a/ldap/servers/slapd/pagedresults.c b/ldap/servers/slapd/pagedresults.c
index edd76c6..d589708 100644
--- a/ldap/servers/slapd/pagedresults.c
+++ b/ldap/servers/slapd/pagedresults.c
@@ -136,6 +136,7 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
}
conn->c_pagedresults.prl_count++;
} else {
+ PagedResults *prp = NULL;
/* Repeated paged results request.
* PagedResults is already allocated. */
char *ptr = slapi_ch_malloc(cookie.bv_len + 1);
@@ -143,6 +144,10 @@ pagedresults_parse_control_value( Slapi_PBlock *pb,
*(ptr+cookie.bv_len) = '\0';
*index = strtol(ptr, NULL, 10);
slapi_ch_free_string(&ptr);
+ prp = conn->c_pagedresults.prl_list + *index;
+ if (!(prp->pr_search_result_set)) { /* freed and reused for the next backend. */
+ conn->c_pagedresults.prl_count++;
+ }
}
/* reset sizelimit */
op->o_pagedresults_sizelimit = -1;
9 years, 8 months
Branch '389-ds-base-1.2.11' - ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
New commits:
commit c6ad00b236e748470345726dfc18dc5e240159f8
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Aug 5 10:53:03 2014 -0400
Ticket 47862 - Repl-monitor.pl ignores the provided connection parameters
Bug Description: The orignal fix for ticket 47538 was not correctly
ported to earlier branches (1.3.2. and down)
Fix Description: Added the missing "set_server_params" function.
https://fedorahosted.org/389/ticket/47862
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 7c5d8f2d31d804d516f0ff1cc85d381303582a2d)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 45d58a1..9107c2d 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -281,6 +281,7 @@ $prompt = "";
# Start with the given host and port
# The index names in %ld are defined in Mozilla::LDAP::Utils::ldapArgs()
+ &set_server_params();
&add_server ("$ld{host}:$ld{port}:$ld{bind}:$ld{pswd}:$ld{cert}");
$serveridx = 0;
@@ -325,6 +326,32 @@ sub validateArgs
return $rc;
}
+sub set_server_params
+{
+ my ($host, $port, $binddn, $bindpwd, $bindcert);
+
+ ($host, $port, $binddn, $bindpwd, $bindcert) = split (/:/, $allconnections[0]);
+ if($opt_p && $opt_p ne ""){
+ $ld{port} = $opt_p
+ } elsif(!$port || $port eq ""){
+ $ld{port} = "389";
+ } else {
+ $ld{port} = $port;
+ }
+ if($host && $host ne ""){
+ $ld{host} = $host;
+ }
+ if($binddn){
+ $ld{bind} = $binddn;
+ }
+ if($bindpwd){
+ $ld{pswd} = $bindpwd;
+ }
+ if($bindcert){
+ $ld{cert} = $bindcert;
+ }
+}
+
sub read_cfg_file
{
($fn) = @_;
9 years, 8 months
Branch '389-ds-base-1.3.1' - ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
New commits:
commit 0d7830106755a44255d135aeaf42ad62fb505fc3
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Aug 5 10:53:03 2014 -0400
Ticket 47862 - Repl-monitor.pl ignores the provided connection parameters
Bug Description: The orignal fix for ticket 47538 was not correctly
ported to earlier branches (1.3.2. and down)
Fix Description: Added the missing "set_server_params" function.
https://fedorahosted.org/389/ticket/47862
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit 7c5d8f2d31d804d516f0ff1cc85d381303582a2d)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 45d58a1..9107c2d 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -281,6 +281,7 @@ $prompt = "";
# Start with the given host and port
# The index names in %ld are defined in Mozilla::LDAP::Utils::ldapArgs()
+ &set_server_params();
&add_server ("$ld{host}:$ld{port}:$ld{bind}:$ld{pswd}:$ld{cert}");
$serveridx = 0;
@@ -325,6 +326,32 @@ sub validateArgs
return $rc;
}
+sub set_server_params
+{
+ my ($host, $port, $binddn, $bindpwd, $bindcert);
+
+ ($host, $port, $binddn, $bindpwd, $bindcert) = split (/:/, $allconnections[0]);
+ if($opt_p && $opt_p ne ""){
+ $ld{port} = $opt_p
+ } elsif(!$port || $port eq ""){
+ $ld{port} = "389";
+ } else {
+ $ld{port} = $port;
+ }
+ if($host && $host ne ""){
+ $ld{host} = $host;
+ }
+ if($binddn){
+ $ld{bind} = $binddn;
+ }
+ if($bindpwd){
+ $ld{pswd} = $bindpwd;
+ }
+ if($bindcert){
+ $ld{cert} = $bindcert;
+ }
+}
+
sub read_cfg_file
{
($fn) = @_;
9 years, 8 months
Branch '389-ds-base-1.3.2' - ldap/admin
by Mark Reynolds
ldap/admin/src/scripts/repl-monitor.pl.in | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
New commits:
commit 7c5d8f2d31d804d516f0ff1cc85d381303582a2d
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Aug 5 10:53:03 2014 -0400
Ticket 47862 - Repl-monitor.pl ignores the provided connection parameters
Bug Description: The orignal fix for ticket 47538 was not correctly
ported to earlier branches (1.3.2. and down)
Fix Description: Added the missing "set_server_params" function.
https://fedorahosted.org/389/ticket/47862
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/admin/src/scripts/repl-monitor.pl.in b/ldap/admin/src/scripts/repl-monitor.pl.in
index 45d58a1..9107c2d 100755
--- a/ldap/admin/src/scripts/repl-monitor.pl.in
+++ b/ldap/admin/src/scripts/repl-monitor.pl.in
@@ -281,6 +281,7 @@ $prompt = "";
# Start with the given host and port
# The index names in %ld are defined in Mozilla::LDAP::Utils::ldapArgs()
+ &set_server_params();
&add_server ("$ld{host}:$ld{port}:$ld{bind}:$ld{pswd}:$ld{cert}");
$serveridx = 0;
@@ -325,6 +326,32 @@ sub validateArgs
return $rc;
}
+sub set_server_params
+{
+ my ($host, $port, $binddn, $bindpwd, $bindcert);
+
+ ($host, $port, $binddn, $bindpwd, $bindcert) = split (/:/, $allconnections[0]);
+ if($opt_p && $opt_p ne ""){
+ $ld{port} = $opt_p
+ } elsif(!$port || $port eq ""){
+ $ld{port} = "389";
+ } else {
+ $ld{port} = $port;
+ }
+ if($host && $host ne ""){
+ $ld{host} = $host;
+ }
+ if($binddn){
+ $ld{bind} = $binddn;
+ }
+ if($bindpwd){
+ $ld{pswd} = $bindpwd;
+ }
+ if($bindcert){
+ $ld{cert} = $bindcert;
+ }
+}
+
sub read_cfg_file
{
($fn) = @_;
9 years, 8 months