X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FConnector%2FLocalSudo.pm;h=6eed5e6dd04b75955c5407e2ad35dcdbe8f833b3;hp=c6bad11ff385c6c59d7ab31d0c63137d3c9ee04a;hb=dac97b35627e705e87c7b9130b1c60d8ef217334;hpb=7efea51f193cf42822232047403138ef98abcc32 diff --git a/lib/Object/Remote/Connector/LocalSudo.pm b/lib/Object/Remote/Connector/LocalSudo.pm index c6bad11..6eed5e6 100644 --- a/lib/Object/Remote/Connector/LocalSudo.pm +++ b/lib/Object/Remote/Connector/LocalSudo.pm @@ -36,6 +36,9 @@ sub _start_perl { unless $cb; print $foreign_stdin $cb->($line, @_), "\n"; chomp($line = <$sudo_stderr>); + die "sent password and expected newline from sudo, got ${line}" + if $line; + chomp($line = <$sudo_stderr>); die "sent password but next line was ${line}" unless $line eq "GO"; } else {