--- ssh-askpass-fullscreen-0.3.orig/debian/README.Debian +++ ssh-askpass-fullscreen-0.3/debian/README.Debian @@ -0,0 +1,10 @@ +ssh-askpass-fullscreen for Debian +--------------------------- + +I modified the name of the program (originally gtk2-ssh-askpass) to respect naming +convention of gtk apps. + +I take really a lot of hints from gnome-ssh-askpass by Colin Watson to +package this program. + + -- Marco Presi (Zufus) , Sat May 8 02:33:50 2004 --- ssh-askpass-fullscreen-0.3.orig/debian/changelog +++ ssh-askpass-fullscreen-0.3/debian/changelog @@ -0,0 +1,43 @@ +ssh-askpass-fullscreen (0.3-3.1build2) jammy; urgency=medium + + * No-change rebuild against latest gdk-pixbuf + + -- Jeremy Bicha Wed, 09 Mar 2022 16:07:48 -0500 + +ssh-askpass-fullscreen (0.3-3.1build1) bionic; urgency=high + + * No change rebuild to pick up -fPIE compiler default + + -- Balint Reczey Tue, 03 Apr 2018 12:44:47 +0000 + +ssh-askpass-fullscreen (0.3-3.1) unstable; urgency=low + + * Non-maintainer upload. + * debian/control + - add "Depends: libx11-dev" + * debian/patches + - add "03_fix_FTBFS_binutils-gold.patch", it specifies link to X11 library + (Closes: #556371) + + -- Hideki Yamane Sat, 07 Jan 2012 23:39:16 +0900 + +ssh-askpass-fullscreen (0.3-3) unstable; urgency=low + + * Added a patch to keep the application window on the top. (Closes: #545804) + * Modified patch to correctly grab the keyboard. (Closes: #519007) + + -- Marco Presi (Zufus) Sun, 27 Sep 2009 03:13:52 +0200 + +ssh-askpass-fullscreen (0.3-2) unstable; urgency=low + + * Modified grab procedure, adapted to the one followed by ssh-askpass-gnome + Closes: #261134. + + -- Marco Presi (Zufus) Sun, 13 Nov 2005 22:55:12 -0500 + +ssh-askpass-fullscreen (0.3-1) unstable; urgency=low + + * Initial Release. (Closes: #183839). + + -- Marco Presi (Zufus) Sun, 2 Mar 2003 11:52:19 +0100 + --- ssh-askpass-fullscreen-0.3.orig/debian/compat +++ ssh-askpass-fullscreen-0.3/debian/compat @@ -0,0 +1 @@ +7 --- ssh-askpass-fullscreen-0.3.orig/debian/control +++ ssh-askpass-fullscreen-0.3/debian/control @@ -0,0 +1,15 @@ +Source: ssh-askpass-fullscreen +Section: x11 +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Marco Presi (Zufus) +Build-Depends: debhelper (>= 7.0.50~), libgtk2.0-dev, cdbs, patchutils (>= 0.2.25), libx11-dev +Standards-Version: 3.8.3 + +Package: ssh-askpass-fullscreen +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Provides: ssh-askpass +Description: Under Gnome2, asks user for a passphrase for ssh-add + It does the same work that ssh-askpass and ssh-askpass-gnome do. It adds + shadowing and looks more beautiful under Gnome2. --- ssh-askpass-fullscreen-0.3.orig/debian/copyright +++ ssh-askpass-fullscreen-0.3/debian/copyright @@ -0,0 +1,23 @@ +This package was debianized by Marco Presi (Zufus) on +Sun, 2 Mar 2003 11:52:19 +0100. + +It was downloaded from http://www.cgabriel.org + +Upstream Author: Christopher R. Gabriel + +Copyright: +Copyright (C) 2002-2003 by Christopher R. Gabriel + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License may be found in `/usr/share/common-licenses/GPL-2'. + + --- ssh-askpass-fullscreen-0.3.orig/debian/dirs +++ ssh-askpass-fullscreen-0.3/debian/dirs @@ -0,0 +1 @@ +usr/bin --- ssh-askpass-fullscreen-0.3.orig/debian/docs +++ ssh-askpass-fullscreen-0.3/debian/docs @@ -0,0 +1 @@ +README --- ssh-askpass-fullscreen-0.3.orig/debian/manpages +++ ssh-askpass-fullscreen-0.3/debian/manpages @@ -0,0 +1 @@ +debian/ssh-askpass-fullscreen.1 --- ssh-askpass-fullscreen-0.3.orig/debian/patches/01_grab_fix.patch +++ ssh-askpass-fullscreen-0.3/debian/patches/01_grab_fix.patch @@ -0,0 +1,264 @@ +diff -Nur -x '*.orig' -x '*~' ssh-askpass-fullscreen-0.3/gtk2-ssh-askpass.c ssh-askpass-fullscreen-0.3.new/gtk2-ssh-askpass.c +--- ssh-askpass-fullscreen-0.3/gtk2-ssh-askpass.c 2009-09-27 02:59:10.000000000 +0200 ++++ ssh-askpass-fullscreen-0.3.new/gtk2-ssh-askpass.c 2009-09-27 02:59:37.000000000 +0200 +@@ -33,6 +33,9 @@ + * + */ + ++#define GRAB_TRIES 16 ++#define GRAB_WAIT 250 /* milliseconds */ ++ + #include + #include + #include +@@ -117,6 +120,30 @@ + + GtkWidget *window, *label, *entry; + gint result; ++gint grab_server, grab_pointer; ++ ++static void ++report_failed_grab (const char *what) ++{ ++ GtkWidget *err; ++ ++ err = gtk_message_dialog_new(NULL, 0, ++ GTK_MESSAGE_ERROR, ++ GTK_BUTTONS_CLOSE, ++ "Could not grab %s. " ++ "A malicious client may be eavesdropping " ++ "on your session.", what); ++ gtk_window_set_position(GTK_WINDOW(err), GTK_WIN_POS_CENTER); ++ gtk_label_set_line_wrap(GTK_LABEL((GTK_MESSAGE_DIALOG(err))->label), ++ TRUE); ++ ++ gtk_dialog_run(GTK_DIALOG(err)); ++ ++ gtk_widget_destroy(err); ++} ++ ++ ++ + + static GdkPixbuf * + create_tile_pixbuf (GdkPixbuf *dest_pixbuf, +@@ -187,12 +214,19 @@ + + void + enter_callback(GtkWidget *widget, +- GtkWidget *entryw) ++ GtkWidget *entryw) + { + const gchar *passphrase; + passphrase = gtk_entry_get_text(GTK_ENTRY(entryw)); ++ ++ if (grab_server) ++ XUngrabServer(GDK_DISPLAY()); ++ if (grab_pointer) ++ gdk_pointer_ungrab(GDK_CURRENT_TIME); ++ gdk_keyboard_ungrab(GDK_CURRENT_TIME); ++ gdk_flush(); + +- if (result == 0) ++ if (result == 0) /* result is always == 0, what this check is for? */ + puts(passphrase); + + memset((void*)passphrase, '\0', strlen(passphrase)); +@@ -205,34 +239,39 @@ + passphrase_dialog(char *message) + { + gchar **messages; +- gint grab_server, grab_pointer; ++ + GtkWidget *frame, *align, *vbox, *hbox; + GdkPixbuf *tmp_pixbuf, *pixbuf, *tile_pixbuf; + GdkPixmap *pixmap; + GdkRectangle rect; + GdkColor color; + gchar *str; ++ GdkGrabStatus status; ++ int kbd_grab_tries = 0; ++ int mouse_grab_tries = 0; ++ const char *failed; ++ + grab_server = (getenv("GNOME_SSH_ASKPASS_GRAB_SERVER") != NULL); + grab_pointer = (getenv("GNOME_SSH_ASKPASS_GRAB_POINTER") != NULL); + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + gtk_window_set_default_size(GTK_WINDOW(window), +- gdk_screen_width(), +- gdk_screen_height()); ++ gdk_screen_width(), ++ gdk_screen_height()); + + gtk_widget_set_app_paintable(GTK_WIDGET(window), TRUE); + gtk_widget_realize(GTK_WIDGET(window)); + + tmp_pixbuf = gdk_pixbuf_get_from_drawable(NULL, +- gdk_get_default_root_window(), +- gdk_colormap_get_system(), +- 0, +- 0, +- 0, +- 0, +- gdk_screen_width(), +- gdk_screen_height()); ++ gdk_get_default_root_window(), ++ gdk_colormap_get_system(), ++ 0, ++ 0, ++ 0, ++ 0, ++ gdk_screen_width(), ++ gdk_screen_height()); + + pixbuf = gdk_pixbuf_new_from_xpm_data(ocean_stripes); + +@@ -246,46 +285,46 @@ + color.green = 0; + + tile_pixbuf = create_tile_pixbuf(NULL, +- pixbuf, +- &rect, +- 155, +- &color); +- ++ pixbuf, ++ &rect, ++ 155, ++ &color); ++ + g_object_unref(pixbuf); + + gdk_pixbuf_composite(tile_pixbuf, +- tmp_pixbuf, +- 0, +- 0, +- gdk_screen_width(), +- gdk_screen_height(), +- 0, +- 0, +- 1, +- 1, +- GDK_INTERP_NEAREST, +- 200); ++ tmp_pixbuf, ++ 0, ++ 0, ++ gdk_screen_width(), ++ gdk_screen_height(), ++ 0, ++ 0, ++ 1, ++ 1, ++ GDK_INTERP_NEAREST, ++ 200); + + g_object_unref(tile_pixbuf); + + pixmap = gdk_pixmap_new(GTK_WIDGET(window)->window, +- gdk_screen_width(), +- gdk_screen_height(), +- -1); ++ gdk_screen_width(), ++ gdk_screen_height(), ++ -1); + + gdk_pixbuf_render_to_drawable_alpha(tmp_pixbuf, +- pixmap, +- 0, +- 0, +- 0, +- 0, +- gdk_screen_width(), +- gdk_screen_height(), +- GDK_PIXBUF_ALPHA_BILEVEL, +- 0, +- GDK_RGB_DITHER_NONE, +- 0, +- 0); ++ pixmap, ++ 0, ++ 0, ++ 0, ++ 0, ++ gdk_screen_width(), ++ gdk_screen_height(), ++ GDK_PIXBUF_ALPHA_BILEVEL, ++ 0, ++ GDK_RGB_DITHER_NONE, ++ 0, ++ 0); + + g_object_unref(tmp_pixbuf); + +@@ -336,21 +375,38 @@ + gtk_window_fullscreen(GTK_WINDOW(window)); + #endif + +- gtk_widget_show(GTK_WIDGET(window)); +- +- if (grab_server) +- XGrabServer(GDK_DISPLAY()); +- if (grab_pointer && gdk_pointer_grab(window->window, TRUE, 0, +- NULL, NULL, GDK_CURRENT_TIME)) +- goto nograb; +- +- if (gdk_keyboard_grab(window->window, FALSE, GDK_CURRENT_TIME)) +- goto nograbkb; ++ gtk_widget_show(GTK_WIDGET(window)); ++ ++ /* Grab focus */ ++ if (grab_pointer) { ++ for(;;) { ++ status = gdk_pointer_grab(window->window, TRUE, ++ 0, NULL, NULL, GDK_CURRENT_TIME); ++ if (status == GDK_GRAB_SUCCESS) ++ break; ++ usleep(GRAB_WAIT * 1000); ++ if (++mouse_grab_tries > GRAB_TRIES) { ++ failed = "mouse"; ++ goto nograb; ++ } ++ } ++ } + +- if (grab_server) +- XUngrabServer(GDK_DISPLAY()); +- if (grab_pointer) +- gdk_pointer_ungrab(GDK_CURRENT_TIME); ++ for(;;) { ++ status = gdk_keyboard_grab(gtk_widget_get_window(window), FALSE, ++ GDK_CURRENT_TIME); ++ if (status == GDK_GRAB_SUCCESS) ++ break; ++ usleep(GRAB_WAIT * 1000); ++ if (++kbd_grab_tries > GRAB_TRIES) { ++ failed = "keyboard"; ++ goto nograbkb; ++ } ++ } ++ if (grab_server) { ++ gdk_x11_grab_server(); ++ } ++ + + + return; +@@ -361,9 +417,14 @@ + nograb: + if (grab_server) + XUngrabServer(GDK_DISPLAY()); +- ++ ++ report_failed_grab(failed); ++ ++ gtk_main_quit(); + } + ++ ++ + int + main(int argc, char **argv) + { --- ssh-askpass-fullscreen-0.3.orig/debian/patches/02_keep_on_top.patch +++ ssh-askpass-fullscreen-0.3/debian/patches/02_keep_on_top.patch @@ -0,0 +1,12 @@ +diff -Nur -x '*.orig' -x '*~' ssh-askpass-fullscreen-0.3/gtk2-ssh-askpass.c ssh-askpass-fullscreen-0.3.new/gtk2-ssh-askpass.c +--- ssh-askpass-fullscreen-0.3/gtk2-ssh-askpass.c 2009-09-27 01:32:04.000000000 +0200 ++++ ssh-askpass-fullscreen-0.3.new/gtk2-ssh-askpass.c 2009-09-27 01:32:40.000000000 +0200 +@@ -375,6 +375,8 @@ + #endif + + gtk_widget_show(GTK_WIDGET(window)); ++ ++ gtk_window_set_keep_above(GTK_WIDGET(window), TRUE); + + /* Grab focus */ + if (grab_pointer) { --- ssh-askpass-fullscreen-0.3.orig/debian/patches/03_fix_FTBFS_binutils-gold.patch +++ ssh-askpass-fullscreen-0.3/debian/patches/03_fix_FTBFS_binutils-gold.patch @@ -0,0 +1,11 @@ +--- Makefile.orig 2012-01-07 23:34:33.269772649 +0900 ++++ Makefile 2012-01-07 23:34:47.025785534 +0900 +@@ -1,5 +1,5 @@ + all: +- gcc -o gtk2-ssh-askpass gtk2-ssh-askpass.c `pkg-config --libs gtk+-2.0` `pkg-config --cflags gtk+-2.0` ++ gcc -o gtk2-ssh-askpass gtk2-ssh-askpass.c -lX11 `pkg-config --libs gtk+-2.0` `pkg-config --cflags gtk+-2.0` + + clean: +- rm gtk2-ssh-askpass +\ ファイル末尾に改行がありません ++ rm gtk2-ssh-askpass --- ssh-askpass-fullscreen-0.3.orig/debian/postinst +++ ssh-askpass-fullscreen-0.3/debian/postinst @@ -0,0 +1,53 @@ +#! /bin/sh +# postinst script for ssh-askpass-gnome +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + update-alternatives --quiet \ + --install /usr/bin/ssh-askpass ssh-askpass \ + /usr/bin/ssh-askpass-fullscreen 30 \ + --slave /usr/share/man/man1/ssh-askpass.1.gz \ + ssh-askpass.1.gz /usr/share/man/man1/ssh-askpass-fullscreen.1.gz + + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- ssh-askpass-fullscreen-0.3.orig/debian/prerm +++ ssh-askpass-fullscreen-0.3/debian/prerm @@ -0,0 +1,41 @@ +#! /bin/sh +# prerm script for ssh-askpass-gnome +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/share/doc/packaging-manual/ + +case "$1" in + remove|deconfigure) + update-alternatives --quiet --remove ssh-askpass /usr/bin/ssh-askpass-fullscreen +# install-info --quiet --remove /usr/info/ssh-askpass.info.gz + ;; + upgrade) +# install-info --quiet --remove /usr/info/ssh-askpass.info.gz + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- ssh-askpass-fullscreen-0.3.orig/debian/rules +++ ssh-askpass-fullscreen-0.3/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses cdbs. Originaly written by Robert Millan. +# This file is public domain. +DEB_AUTO_CLEANUP_RCS := yes + +DEB_DH_INSTALL_ARGS := -v +# Add here any variable or target overrides you need + +include /usr/share/cdbs/1/rules/debhelper.mk +#include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/class/makefile.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +install/ssh-askpass-fullscreen:: + cp gtk2-ssh-askpass debian/ssh-askpass-fullscreen/usr/bin/ssh-askpass-fullscreen --- ssh-askpass-fullscreen-0.3.orig/debian/ssh-askpass-fullscreen.1 +++ ssh-askpass-fullscreen-0.3/debian/ssh-askpass-fullscreen.1 @@ -0,0 +1,79 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH SSH-ASKPASS-FULLSCREEN 1 "May 8 , 2004" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +ssh-askpass-fullscreen \- A simple replacement for ssh-askpass written with gtk2 +.SH SYNOPSIS +.B ssh-askpass-fullscreen + +.SH DESCRIPTION +This manual page was written for the Debian distribution +because the original program does not have a manual page. +.PP + +.B gnome-ssh-askpass +is a GNOME-based passphrase dialog for use with OpenSSH. It is +intended to be called by the +.B ssh-add(1) +program and not invoked directly. It allows +.B ssh-add(1) +to obtain a passphrase from a user, even if not connected to a terminal +(assuming that an X display is available). This happens auto-matically +in the case where +.B ssh-add +is invoked from one's +.B ~/.xsession or as one of the GNOME startup programs, for example. + +In order to be called automatically by +.B ssh-add, +.B ssh-askpass-fullscreen +should be installed as /usr/bin/ssh-askpass + + +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBssh-askpass-fullscreen\fP is a program that... +.SH ENVIRONMENT VARIABLES +The following environment variables are recognized: + +.TP +.IR "GNOME_SSH_ASKPASS_GRAB_SERVER" + Causes gnome-ssh-askpass to grab the X server before +asking for a passphrase. + +.TP +.IR "GNOME_SSH_ASKPASS_GRAB_POINTER" + Causes gnome-ssh-askpass to grab the mouse pointer will be +grabbed too. + +.PP +These may have some benefit to security if you don't trust your X +server. Keyboard is always grabbed. + +.TP + +.SH SEE ALSO +.BR ssh-add (1), +.BR ssh-askpass (1). +.br + +.SH AUTHOR +This manual page was written by Marco Presi (Zufus) , +for the Debian GNU/Linux system (but may be used by others) and it is +based on that for x11-ssh-askpass by Philip Hands and the one for +gnome-ssh-askpass by Colin Watson