Репозитории ALT
S: | 2.00-alt2 |
5.1: | 2.00-alt1 |
4.1: | 2.00-alt1 |
4.0: | 2.00-alt1 |
3.0: | |
+backports: | 2.00-alt0.M30.1 |
Группа :: Базы Данных
Пакет: ldapsh
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: ldapsh-2.00-alt-fix_parse.patch
Скачать
Скачать
Fix abnormal program end at empty string input
Fix parse error with empty input line
--- ./lib/Net/LDAP/Shell.pm 2006-06-27 12:01:32 +0400
+++ ./lib/Net/LDAP/Shell.pm 2006-06-27 12:05:32 +0400
@@ -492,10 +492,11 @@
sub run {
my $shell = shift or die error("run called without shell");
my $line;
+ $line="";
#while ($line = <STDIN>) {
#while ($line = $shell->{'TERM'}->readline($shell->prompt())) {
#print "prompt is '$str'\n";
- $line = $shell->{'TERM'}->readline($shell->prompt());
+ #$line = $shell->{'TERM'}->readline($shell->prompt());
#$shell->{'TERM'}->addhistory($line);
while (defined $line) {
if ($line) {
@@ -504,7 +505,10 @@
#chomp $line;
$shell->parse($line);
#$shell->prompt();
- $line = $shell->{'TERM'}->readline($shell->prompt());
+ unless(eval{$line = $shell->{'TERM'}->readline($shell->prompt());}) {
+ print "\n";
+ $line="";
+ }
}
$shell->{'CONFIG'}->{'ldap'}->unbind;
}
--- ./lib/Net/LDAP/Shell/Parse.pm 2004-11-24 09:07:44 +0300
+++ ./lib/Net/LDAP/Shell/Parse.pm 2006-06-15 01:20:23 +0400
@@ -108,7 +108,8 @@
my ($class,$obj,$objlist,$ref,$file,@lines,$comment,$refclass);
$line = shift;
-
+ return '' unless ($line);
+
#my $typehandle = new FileHandle $file, "r" or
# die "Could not open $file: $!\n";