summaryrefslogtreecommitdiff
path: root/ssh-askpass
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-08 15:30:59 +1100
committerDamien Miller <djm@mindrot.org>1999-11-08 15:30:59 +1100
commit356a0b004aad93ec570b134664522a3a925ba556 (patch)
tree3c7cddb50f71a838947d5fda204b569d879dc757 /ssh-askpass
parent0aa8e5395ca08c7fa927bccd8a763edc4ae61f7b (diff)
Lots of changes:
- Removed lots of unnecessary checks from autoconf - Added support and autoconf test for openpty() function (Unix98 pty support) - Fix for scp not finding ssh if not installed as /usr/bin/ssh - Added TODO file - Merged parts of Debian patch From Phil Hands <phil@hands.com>: - Added ssh-askpass program - Added ssh-askpass support to ssh-add.c - Create symlinks for slogin on install - Fix "distclean" target in makefile - Added example for ssh-agent to manpage - Added support for PAM_TEXT_INFO messages - Disable internal /etc/nologin support if PAM enabled - Merged latest OpenBSD CVS changes: - [sshd.c] don't send fail-msg but disconnect if too many authentication failures - [sshd.c] replace assert() with error, fatal or packet_disconnect - [sshd.c] remove unused argument. ok dugsong - [sshd.c] typo - [rsa.c] clear buffers used for encryption. ok: niels - [rsa.c] replace assert() with error, fatal or packet_disconnect - Fixed coredump after merge of OpenBSD rsa.c patch
Diffstat (limited to 'ssh-askpass')
-rwxr-xr-xssh-askpass38
1 files changed, 38 insertions, 0 deletions
diff --git a/ssh-askpass b/ssh-askpass
new file mode 100755
index 000000000..b1e23c514
--- /dev/null
+++ b/ssh-askpass
@@ -0,0 +1,38 @@
1#!/usr/bin/perl -w
2
3# Written by Tommi Virtanen <tv@debian.org>. Consider it public domain.
4
5use strict;
6use Tk;
7
8sub do_it($$;) {
9 my ($passphrase, $main) = @_;
10 print $passphrase->get(), "\n";
11 $main->destroy();
12}
13
14sub ask($;) {
15 my ($prompt)=@_;
16 my $main=MainWindow->new;
17 $main->Label(-text=>$prompt)->pack(-fill=>'x');
18 my $passphrase=$main->Entry(-show=>'*')->pack(-fill=>'x');
19 $passphrase->focus();
20 my $buttons=$main->Frame;
21 $buttons->pack(-side=>'right');
22 my $ok=$buttons->Button(-text=>'Ok',
23 -command=>sub {do_it $passphrase, $main}
24 )->pack(-side=>'left');
25 my $cancel=$buttons->Button(-text=>'Cancel', -command=>[$main=>'destroy'])
26 ->pack(-side=>'right');
27 $main->bind('Tk::Button', '<Return>' => 'invoke');
28 $main->bind('<Return>', [$ok => 'invoke']);
29 $main->bind('<Escape>', [$cancel => 'invoke']);
30 $main->bind('<Visibility>' => [$main => 'grabGlobal']);
31
32 MainLoop;
33}
34
35ask ($#ARGV==0
36 ? $ARGV[0]
37 : 'Please enter your authentication passphrase:');
38