зеркало из https://github.com/Azure/sonic-openssh.git
- (djm) Add option to gnome-ssh-askpass to stop it from grabbing the X
server. I have found this necessary to avoid server hangs with X input extensions (e.g. kinput2). Enable by setting the environment variable "GNOME_SSH_ASKPASS_NOGRAB"
This commit is contained in:
Родитель
366298c696
Коммит
faf2f6483a
|
@ -1,3 +1,9 @@
|
|||
20011221
|
||||
- (djm) Add option to gnome-ssh-askpass to stop it from grabbing the X
|
||||
server. I have found this necessary to avoid server hangs with X input
|
||||
extensions (e.g. kinput2). Enable by setting the environment variable
|
||||
"GNOME_SSH_ASKPASS_NOGRAB"
|
||||
|
||||
20011219
|
||||
- (stevesk) OpenBSD CVS sync X11 localhost display
|
||||
- stevesk@cvs.openbsd.org 2001/11/29 14:10:51
|
||||
|
@ -7025,4 +7031,4 @@
|
|||
- Wrote replacements for strlcpy and mkdtemp
|
||||
- Released 1.0pre1
|
||||
|
||||
$Id: ChangeLog,v 1.1692 2001/12/19 17:58:01 stevesk Exp $
|
||||
$Id: ChangeLog,v 1.1693 2001/12/20 23:28:07 djm Exp $
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000 Damien Miller. All rights reserved.
|
||||
* Copyright (c) 2000-2001 Damien Miller. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -22,6 +22,17 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is a simple GNOME SSH passphrase grabber. To use it, set the
|
||||
* environment variable SSH_ASKPASS to point to the location of
|
||||
* gnome-ssh-askpass before calling "ssh-add < /dev/null".
|
||||
*
|
||||
* There is only one run-time option: if you set the environment variable
|
||||
* "GNOME_SSH_ASKPASS_NOGRAB=true" then gnome-ssh-askpass will not grab
|
||||
* the X server. I have found this necessary to avoid server hangs with
|
||||
* X input extensions (e.g. kinput2) enabled. - djm
|
||||
*/
|
||||
|
||||
/*
|
||||
* Compile with:
|
||||
*
|
||||
|
@ -57,10 +68,11 @@ passphrase_dialog(char *message)
|
|||
{
|
||||
char *passphrase;
|
||||
char **messages;
|
||||
int result, i;
|
||||
|
||||
int result, i, grab_server;
|
||||
GtkWidget *dialog, *entry, *label;
|
||||
|
||||
grab_server = (getenv("GNOME_SSH_ASKPASS_NOGRAB") == NULL);
|
||||
|
||||
dialog = gnome_dialog_new("OpenSSH", GNOME_STOCK_BUTTON_OK,
|
||||
GNOME_STOCK_BUTTON_CANCEL, NULL);
|
||||
|
||||
|
@ -89,6 +101,7 @@ passphrase_dialog(char *message)
|
|||
gtk_widget_show_all(dialog);
|
||||
|
||||
/* Grab focus */
|
||||
if (grab_server)
|
||||
XGrabServer(GDK_DISPLAY());
|
||||
if (gdk_pointer_grab(dialog->window, TRUE, 0, NULL, NULL,
|
||||
GDK_CURRENT_TIME))
|
||||
|
@ -103,6 +116,7 @@ passphrase_dialog(char *message)
|
|||
result = gnome_dialog_run(GNOME_DIALOG(dialog));
|
||||
|
||||
/* Ungrab */
|
||||
if (grab_server)
|
||||
XUngrabServer(GDK_DISPLAY());
|
||||
gdk_pointer_ungrab(GDK_CURRENT_TIME);
|
||||
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
|
||||
|
@ -126,6 +140,7 @@ passphrase_dialog(char *message)
|
|||
nograbkb:
|
||||
gdk_pointer_ungrab(GDK_CURRENT_TIME);
|
||||
nograb:
|
||||
if (grab_server)
|
||||
XUngrabServer(GDK_DISPLAY());
|
||||
gnome_dialog_close(GNOME_DIALOG(dialog));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче