kov changed libgksu/trunk/ChangeLog, libgksu/trunk/libgksu/libgksu.c
Gustavo Noronha
kov at costa.debian.org
Sun Oct 22 19:35:24 UTC 2006
Mensagem de log:
- make sure we notice ECHO disabled, and remove some uneeded waits
which will probably speedup using su with password, but probably
slow down su without password; this should avoid deadlocks when
su delays setting ECHO off.
-----
Modified: libgksu/trunk/ChangeLog
===================================================================
--- libgksu/trunk/ChangeLog 2006-10-15 03:34:03 UTC (rev 743)
+++ libgksu/trunk/ChangeLog 2006-10-22 19:35:23 UTC (rev 744)
@@ -1,3 +1,11 @@
+2006-10-22 Gustavo Noronha Silva <kov at debian.org>
+
+ * libgksu/libgksu.c:
+ - make sure we notice ECHO disabled, and remove some uneeded waits
+ which will probably speedup using su with password, but probably
+ slow down su without password; this should avoid deadlocks when
+ su delays setting ECHO off.
+
2006-10-15 Gustavo Noronha Silva <kov at debian.org>
* libgksuui/gksuui-dialog.c:
Modified: libgksu/trunk/libgksu/libgksu.c
===================================================================
--- libgksu/trunk/libgksu/libgksu.c 2006-10-15 03:34:03 UTC (rev 743)
+++ libgksu/trunk/libgksu/libgksu.c 2006-10-22 19:35:23 UTC (rev 744)
@@ -1871,16 +1871,21 @@
/* no need to ask for password if we're already root */
if (my_uid != target_uid && my_uid)
{
+ gint count;
struct termios tio;
- usleep (100);
read (fdpty, buf, 255);
if (context->debug)
fprintf (stderr, "gksu_context_run: buf: -%s-\n", buf);
- usleep (100);
-
+ /* make sure we notice that ECHO is turned off, if it gets
+ turned off */
tcgetattr (fdpty, &tio);
+ for (count = 0; (tio.c_lflag & ECHO) && count < 15; count++)
+ {
+ usleep (30);
+ tcgetattr (fdpty, &tio);
+ }
if (!(tio.c_lflag & ECHO))
{
@@ -1889,6 +1894,7 @@
gboolean prompt_grab;
prompt_grab = gconf_client_get_bool (context->gconf_client, BASE_PATH "prompt",
NULL);
+
if (prompt_grab)
gksu_prompt_grab (context);
@@ -1912,8 +1918,6 @@
return TRUE;
}
- usleep (100);
-
password = g_strdup_printf ("%s\n", tmp);
nullify_password (tmp);
More information about the gksu-commits
mailing list