diff -u libgksu-2.0.13~pre1/debian/changelog libgksu-2.0.13~pre1/debian/changelog --- libgksu-2.0.13~pre1/debian/changelog +++ libgksu-2.0.13~pre1/debian/changelog @@ -1,3 +1,11 @@ +libgksu (2.0.13~pre1-1ubuntu4.2~tetet0) lucid; urgency=low + + * debian/patches/29_check-newline.patch: + - check if an empty line is really received before + ignoring it + + -- Torsten Spindler (Canonical) Wed, 14 Sep 2011 11:46:48 +0200 + libgksu (2.0.13~pre1-1ubuntu4.1) lucid-proposed; urgency=low * Add 27_sudo_wrong_pwd_check.patch: Be more careful when checking the only in patch2: unchanged: --- libgksu-2.0.13~pre1.orig/debian/patches/29_check_newline.patch +++ libgksu-2.0.13~pre1/debian/patches/29_check_newline.patch @@ -0,0 +1,33 @@ +## Description: Checks if buffer contains only newline before discarding it +## Origin/Author: Torsten Spindler (Canonical) +## Bug: http://pad.lv/298217 +diff -Nur -x '*.orig' -x '*~' libgksu-2.0.13~pre1//libgksu/libgksu.c libgksu-2.0.13~pre1.new//libgksu/libgksu.c +--- libgksu-2.0.13~pre1//libgksu/libgksu.c 2011-09-13 09:43:51.723178003 +0200 ++++ libgksu-2.0.13~pre1.new//libgksu/libgksu.c 2011-09-13 09:46:16.603182354 +0200 +@@ -2980,16 +2980,22 @@ + /* ignore the first newline that comes right after sudo receives + the password */ + fgets (buffer, 255, fdfile); +- /* this is the status we are interested in */ +- fgets (buffer, 255, fdfile); ++ if (!strcmp (buffer, "\n")) ++ { ++ /* this is the status we are interested in */ ++ fgets (buffer, 255, fdfile); ++ } + #else + 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 interested in */ +- fgets (buffer, 255, infile); ++ if (!strcmp (buffer, "\n")) ++ { ++ /* this is the status we are interested in */ ++ fgets (buffer, 255, infile); ++ } + #endif + } + else