From b76270bf9e6dd375e495fec92140a79a79415d27 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Wed, 19 May 2010 08:58:23 +0000 Subject: Slackware 13.1 Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy! --- .../kde/kdelibs/kdesu-allow_NOPASS_in_suauth.patch | 135 ++++++++------------- 1 file changed, 51 insertions(+), 84 deletions(-) (limited to 'source/kde/kdelibs/kdesu-allow_NOPASS_in_suauth.patch') diff --git a/source/kde/kdelibs/kdesu-allow_NOPASS_in_suauth.patch b/source/kde/kdelibs/kdesu-allow_NOPASS_in_suauth.patch index 8d2168c3a..64b4d5af2 100644 --- a/source/kde/kdelibs/kdesu-allow_NOPASS_in_suauth.patch +++ b/source/kde/kdelibs/kdesu-allow_NOPASS_in_suauth.patch @@ -1,94 +1,61 @@ diff -Naur kdesu/stub.cpp kdesu.new/stub.cpp --- kdesu/stub.cpp 2008-05-21 08:08:55.000000000 -0300 -+++ kdesu.new/stub.cpp 2009-08-06 04:06:43.000000000 -0300 -@@ -111,7 +111,7 @@ - if (line.isNull()) - return -1; - -- if (line == "kdesu_stub") -+ if ((line == "kdesu_stub")||(line == "Password authentication bypassed.")) - { - // This makes parsing a lot easier. ++++ kdesu.new/stub.cpp 2009-10-13 01:32:10.000000000 -0300 +@@ -105,6 +105,7 @@ + int StubProcess::ConverseStub(int check) + { + QByteArray line, tmp; ++ + while (1) + { + line = readLine(); +@@ -117,7 +118,17 @@ enableLocalEcho(false); + if (check) writeLine("stop"); + else writeLine("ok"); +- } else if (line == "display") { ++ break; ++ } ++ } ++ ++ while (1) ++ { ++ line = readLine(); ++ if (line.isNull()) ++ return -1; ++ ++ if (line == "display") { + writeLine(display()); + } else if (line == "display_auth") { + #ifdef Q_WS_X11 diff -Naur kdesu/su.cpp kdesu.new/su.cpp --- kdesu/su.cpp 2008-05-21 08:08:55.000000000 -0300 -+++ kdesu.new/su.cpp 2009-08-06 04:10:55.000000000 -0300 -@@ -163,7 +163,7 @@ - } - // kDebug(900) << k_lineinfo << "Done StubProcess::exec()"; - -- SuErrors ret = (SuErrors) ConverseSU(password); -+ SuErrors ret = (SuErrors) ConverseSU(password,check); - // kDebug(900) << k_lineinfo << "Conversation returned " << ret; - - if (ret == error) -@@ -172,6 +172,7 @@ - kError(900) << k_lineinfo << "Conversation with su failed\n"; - return ret; - } -+ - if (check == NeedPassword) - { - if (ret == killme) -@@ -235,10 +236,10 @@ - - /* - * Conversation with su: feed the password. --* Return values: -1 = error, 0 = ok, 1 = kill me, 2 not authorized -+* Return values: -1 = error, 0 = ok, 1 = kill me, 2 = not authorized - */ - --int SuProcess::ConverseSU(const char *password) -+int SuProcess::ConverseSU(const char *password, int check) - { - enum { WaitForPrompt, CheckStar, HandleStub } state = WaitForPrompt; - int colon; -@@ -265,6 +266,27 @@ - return ok; - } - -+ if (line == "Password authentication bypassed.") -+ { -+ if (check == 2) -+ { -+ unreadLine(line); -+ return ok; -+ } -+ else -+ { -+ if (checkPid(m_Pid)) -+ { -+ state=HandleStub; -+ } -+ else -+ { -+ return error; -+ } -+ } -+ break; -+ } -+ ++++ kdesu.new/su.cpp 2009-10-19 00:21:31.000000000 -0200 +@@ -258,13 +258,6 @@ + ////////////////////////////////////////////////////////////////////////// + case WaitForPrompt: + { +- // In case no password is needed. +- if (line == "kdesu_stub") +- { +- unreadLine(line); +- return ok; +- } +- while(waitMS(fd(),100)>0) { // There is more output available, so the previous line -@@ -293,7 +315,7 @@ +@@ -279,6 +272,13 @@ + kDebug(900) << k_lineinfo << "Read line <" << more << ">"; } - if ((colon == 1) && (line[j] == ':')) - { -- if (password == 0L) -+ if (password == 0L) - return killme; - if (!checkPid(m_Pid)) - { -diff -Naur kdesu/su.h kdesu.new/su.h ---- kdesu/su.h 2008-05-21 08:08:55.000000000 -0300 -+++ kdesu.new/su.h 2009-08-06 02:50:02.000000000 -0300 -@@ -62,7 +62,7 @@ - - private: - enum SuErrors { error=-1, ok=0, killme=1, notauthorized=2 } ; -- int ConverseSU(const char *password); -+ int ConverseSU(const char *password, int check=NoCheck); - protected: - virtual void virtual_hook( int id, void* data ); ++ // In case no password is needed. ++ if (line == "kdesu_stub") ++ { ++ unreadLine(line); ++ return ok; ++ } ++ + // Match "Password: " with the regex ^[^:]+:[\w]*$. + const uint len = line.length(); + for (i=0,j=0,colon=0; i