Bug#216911: Acknowledgement (mc: "view zip" hangs for .zip files with password.) (fwd)



----- Forwarded message from Roland Illig -----
δΑΤΑ: Tue, 21 Oct 2003 20:49:45 +0200
οΤ: Roland Illig <roland illig gmx de>
Message-ID: <20031021184945 GA6371 informatik uni-hamburg de>
λΟΝΥ: 216911 bugs debian org
τΕΝΑ: Bug#216911: Acknowledgement (mc: "view zip" hangs for .zip files with password.)

Well, I was a little quick when reporting the bug. Actually the program
unzip does not read the password from stdin but from /dev/tty, so
redirection does not work. But I wrote a little perl script that uses
the recipe on http://www.hawklord.uklinux.net/system/daemons/d3.htm to
make the file /dev/tty unaccessible to unzip. The unzip command line
thus could be:

perl notty.pl unzip $filename

The file notty.pl is the following perl script:

#!/usr/bin/perl -w
use strict;

use POSIX;

use vars qw($pid);

$pid = fork();
if ($pid > 0) {
  exit(0);
} elsif ($pid == -1) {
  die;
}

POSIX::setsid();

$pid = fork();
if ($pid > 0) {
  exit(0);
} elsif ($pid == -1) {
  die;
}

system(@ARGV);
__EOF__

Roland


----- end of forwarded message from Roland Illig -----

-- 
Regards,
Andrew V. Samoilov.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]