From 42d65608dc312e0fa753841764ca8208a047e01a Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Jun 05 2015 18:39:50 +0000 Subject: 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]);