[389-commits] admserv/newinst

Mark Reynolds mreynolds at fedoraproject.org
Fri Jun 5 18:40:15 UTC 2015


 admserv/newinst/src/register-ds-admin.pl.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 42d65608dc312e0fa753841764ca8208a047e01a
Author: Mark Reynolds <mreynolds at redhat.com>
Date:   Fri Jun 5 14:28:53 2015 -0400

    Ticket 47548 - register-ds-admin - silent file incorrectly processed
    
    Bug Description:  There was an improper check to see if any "instances"
                      were set in the INF file.  THis lead to an erroneous
                      error.
    
    FIx Description:  Check that the instance array actually has elements.
    
    https://fedorahosted.org/389/ticket/47548
    
    Reviewed by: nhosoi(Thanks!)

diff --git a/admserv/newinst/src/register-ds-admin.pl.in b/admserv/newinst/src/register-ds-admin.pl.in
index 04e936a..dd100d9 100644
--- a/admserv/newinst/src/register-ds-admin.pl.in
+++ b/admserv/newinst/src/register-ds-admin.pl.in
@@ -123,7 +123,7 @@ sub get_cred_from_inst
     # Check the remaining instances
     #
     my @insts = $mysetup->{inf}->{register}->{instance};
-    if (@insts){
+    if ($#insts){
         my $i = 0;
         for (; $i <= $#insts; $i++){
             my @inst_parts = split('::', $insts[$i]);
@@ -267,7 +267,7 @@ if ($setup->{inf}->{register}){
     # Add the other instances (if any)
     #
     @silent_instances = $setup->{inf}->{register}->{instance};
-    if (@silent_instances){
+    if ($#silent_instances){
         my $i = 0;
         for (; $i <= $#silent_instances; $i++){
             my @inst_parts = split('::', $silent_instances[$i]);




More information about the 389-commits mailing list