summaryrefslogtreecommitdiffstats
path: root/patches/source/kdelibs/kdesu-allow_NOPASS_in_suauth.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2018-05-25 23:29:36 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 15:13:35 -0700
commit9097b9a1f29939d4996b0a685847517d02f7b5ad (patch)
treec74b091b97e2f7655593b7e011e8b37bcf1e8611 /patches/source/kdelibs/kdesu-allow_NOPASS_in_suauth.patch
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9097b9a1f29939d4996b0a685847517d02f7b5ad.tar.gz
current-9097b9a1f29939d4996b0a685847517d02f7b5ad.tar.xz
Fri May 25 23:29:36 UTC 201813.37
patches/packages/glibc-zoneinfo-2018e-noarch-2_slack13.37.txz: Rebuilt. Handle removal of US/Pacific-New timezone. If we see that the machine is using this, it will be automatically switched to US/Pacific.
Diffstat (limited to 'patches/source/kdelibs/kdesu-allow_NOPASS_in_suauth.patch')
-rw-r--r--patches/source/kdelibs/kdesu-allow_NOPASS_in_suauth.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/patches/source/kdelibs/kdesu-allow_NOPASS_in_suauth.patch b/patches/source/kdelibs/kdesu-allow_NOPASS_in_suauth.patch
new file mode 100644
index 000000000..64b4d5af2
--- /dev/null
+++ b/patches/source/kdelibs/kdesu-allow_NOPASS_in_suauth.patch
@@ -0,0 +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-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-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
+@@ -279,6 +272,13 @@
+ kDebug(900) << k_lineinfo << "Read line <" << more << ">";
+ }
+
++ // 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<len; i++)