Thursday, March 31, 2016

[389-users] Syntax error in ldap/admin/src/scripts/ns-accountstatus.pl.in

diff --git a/ldap/admin/src/scripts/ns-accountstatus.pl.in b/ldap/admin/src/scripts/ns-accountstatus.pl.in
index db3224c..139160b 100644
--- a/ldap/admin/src/scripts/ns-accountstatus.pl.in
+++ b/ldap/admin/src/scripts/ns-accountstatus.pl.in
@@ -30,7 +30,7 @@ my $verbose = 0;
sub usage
{
print (STDERR "ns-accountstatus.pl [-Z serverID] [-D rootdn] { -w password | -w - | -j filename }\n");
- print (STDERR " [-p port] [-h host] [-P protocol] {-I DN | -b basedn -f filter [-s scope]}"
+ print (STDERR " [-p port] [-h host] [-P protocol] {-I DN | -b basedn -f filter [-s scope]}\n");
print (STDERR " [-i] [-g seconds]\n\n");
print (STDERR "May be used to get the status a user or a domain of users\n\n");
print (STDERR "Arguments:\n");
@@ -1035,4 +1035,4 @@ for(my $i = 0; $i <= $#entries; $i++){
}
exit 103;
}
-}
\ No newline at end of file
+}


Our build system detects syntax error in
ldap/admin/src/scripts/ns-accountstatus.pl.in:

String found where operator expected at
/usr/src/tmp/389-ds-base-buildroot/usr/sbin/ns-accountstatus.pl line 34,
near "STDERR " [-i] [-g seconds]\n\n""
(Do you need to predeclare STDERR?)
syntax error at
/usr/src/tmp/389-ds-base-buildroot/usr/sbin/ns-accountstatus.pl line 34,
near "print"

See attached patch to fix it.

Small note: ldap/admin/src/scripts/db2index.in use Bash4 syntax
construction (|&), but use interpreter /bin/sh
Not all Linux distributives have /bin/sh as symlink to /bin/bash4

--
Andrey Cherepanov
cas@altlinux.org

No comments:

Post a Comment