Procházet zdrojové kódy

Ensure that the terminal is reset correctly after prompting for a password.

Thanks to Jonathan for reporting this!
Fixes #84
Sebastian Harl před 12 roky
rodič
revize
f4d9395adc

+ 1 - 0
check_junos_bgp.pl

@@ -168,6 +168,7 @@ if (! $plugin->opts->password) {
 	chomp($conf{'password'});
 
 	$term->setlflag($lflag | POSIX::ECHO);
+	$term->setattr(fileno(STDIN), TCSAFLUSH);
 	print "\n";
 }
 

+ 1 - 0
check_junos_vc.pl

@@ -170,6 +170,7 @@ if (! $plugin->opts->password) {
 	chomp($conf{'password'});
 
 	$term->setlflag($lflag | POSIX::ECHO);
+	$term->setattr(fileno(STDIN), TCSAFLUSH);
 	print "\n";
 }
 

+ 1 - 0
perl/lib/Nagios/Plugin/JUNOS.pm

@@ -346,6 +346,7 @@ sub connect
 		chomp($self->{'conf'}->{'password'});
 
 		$term->setlflag($lflag | POSIX::ECHO);
+		$term->setattr(fileno(STDIN), TCSAFLUSH);
 		print "\n";
 	}
 

+ 1 - 0
perl/lib/Nagios/Plugin/NetApp.pm

@@ -353,6 +353,7 @@ sub connect
 		chomp($self->{'conf'}->{'password'});
 
 		$term->setlflag($lflag | POSIX::ECHO);
+		$term->setattr(fileno(STDIN), TCSAFLUSH);
 		print "\n";
 	}