1
0
Эх сурвалжийг харах

openldap ldapsearch returns empty line at end of LDIF output

The script was looking for 1 and only 1 line returned by the ldapsearch
to see if the given entry is a role.  openldap ldapsearch returns an empty
line as the last line.  So just change the check to look for 1 or more lines.
Rich Megginson 15 жил өмнө
parent
commit
59ae6fe07d

+ 1 - 1
ldap/admin/src/scripts/template-ns-accountstatus.pl.in

@@ -505,7 +505,7 @@ if ( $retCode2 != 0 )
 	exit $retCode2;
 }
 
-if ( $nbLineRole == 1 )
+if ( $nbLineRole > 0 )
 {
 	debug("Groups of users\n");
 	$role=1;

+ 1 - 1
ldap/admin/src/scripts/template-ns-activate.pl.in

@@ -505,7 +505,7 @@ if ( $retCode2 != 0 )
 	exit $retCode2;
 }
 
-if ( $nbLineRole == 1 )
+if ( $nbLineRole > 0 )
 {
 	debug("Groups of users\n");
 	$role=1;

+ 1 - 1
ldap/admin/src/scripts/template-ns-inactivate.pl.in

@@ -505,7 +505,7 @@ if ( $retCode2 != 0 )
 	exit $retCode2;
 }
 
-if ( $nbLineRole == 1 )
+if ( $nbLineRole > 0 )
 {
 	debug("Groups of users\n");
 	$role=1;