kov changed libgksu/trunk/ChangeLog, libgksu/trunk/libgksu/libgksu.c
Gustavo Noronha
kov at costa.debian.org
Wed Aug 16 01:26:56 UTC 2006
Mensagem de log:
patch by Michael Vogt to fix sudo not noticing wrong password
-----
Modified: libgksu/trunk/ChangeLog
===================================================================
--- libgksu/trunk/ChangeLog 2006-08-11 11:10:34 UTC (rev 693)
+++ libgksu/trunk/ChangeLog 2006-08-16 01:26:55 UTC (rev 694)
@@ -1,3 +1,10 @@
+2006-08-15 Gustavo Noronha Silva <kov at debian.org>
+
+ * libgksu/libgksu.c:
+ - accepted patch by Michael Vogt to fix the detection of
+ sudo password failure by making the fd block while expecting
+ the line right after the password is sent to sudo
+
2006-08-06 Gustavo Noronha Silva <kov at debian.org>
* Release 1.9.8
Modified: libgksu/trunk/libgksu/libgksu.c
===================================================================
--- libgksu/trunk/libgksu/libgksu.c 2006-08-11 11:10:34 UTC (rev 693)
+++ libgksu/trunk/libgksu/libgksu.c 2006-08-16 01:26:55 UTC (rev 694)
@@ -2435,11 +2435,15 @@
nullify_password (password);
- /* ignore the newline that comes right after sudo receives
- the password
- */
+ /* turn NONBLOCK off */
+ fcntl(parent_pipe[0], F_SETFL, fcntl(parent_pipe[0], F_GETFL) & ~O_NONBLOCK);
+ /* ignore the first newline that comes right after sudo receives
+ the password */
fgets (buffer, 255, infile);
+ /* this is the status we are interessted in */
fgets (buffer, 255, infile);
+ /* turn it ON again */
+ fcntl(parent_pipe[0], F_SETFL, fcntl(parent_pipe[0], F_GETFL) | O_NONBLOCK);
}
else
{
More information about the gksu-commits
mailing list