commit kdebase4-workspace for openSUSE:Factory
Hello community, here is the log from the commit of package kdebase4-workspace for openSUSE:Factory checked in at 2014-04-14 06:49:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdebase4-workspace (Old) and /work/SRC/openSUSE:Factory/.kdebase4-workspace.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kdebase4-workspace" Changes: -------- --- /work/SRC/openSUSE:Factory/kdebase4-workspace/kdebase4-workspace.changes 2014-04-04 16:35:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdebase4-workspace.new/kdebase4-workspace.changes 2014-04-14 06:49:12.000000000 +0200 @@ -1,0 +2,13 @@ +Thu Apr 10 12:09:26 UTC 2014 - wbauer@tmo.at + +- Added kdm-fix-resumption-from-console-mode.patch: + * fix resumption from console mode when monotonic clock is in use + (kde#312947, bnc#756198) +- Added screenlocker-always-show-password-dialog-when-needed.patch: + * password input dialog was not shown under certain circumstances + (kde#327947, kde#329076, bnc#864305) +- Added screenlocker-dont-leak-screensaver-processes.patch: + * screensaver processes might keep running in background when + unlocking the screen (kde#224200, bnc#809835) + +------------------------------------------------------------------- New: ---- kdm-fix-resumption-from-console-mode.patch screenlocker-always-show-password-dialog-when-needed.patch screenlocker-dont-leak-screensaver-processes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdebase4-workspace.spec ++++++ --- /var/tmp/diff_new_pack.UKa93i/_old 2014-04-14 06:49:14.000000000 +0200 +++ /var/tmp/diff_new_pack.UKa93i/_new 2014-04-14 06:49:14.000000000 +0200 @@ -103,6 +103,8 @@ # Patch is based on the changes within GDM to detect running plymouth # and issue a quit to the plymouth daemon Patch15: kdm_plymouth.patch +# PATCH-FIX-UPSTREAM kdm-fix-resumption-from-console-mode.patch (kde#312947, bnc#756198) +Patch16: kdm-fix-resumption-from-console-mode.patch ## Workspace patches # PATCH-FIX-OPENSUSE startkde.diff -- Injects branded startupconfigkeys to users $KDEHOME, and adds %datadir/kde4/env # to list of read enviroments @@ -139,6 +141,12 @@ Patch66: add-calculator-hotkey.patch # PATCH-FIX-OPENSUSE Remove the dependencies on strigi Patch67: remove_strigi.patch +# PATCH-FIX-UPSTREAM screenlocker-always-show-password-dialog-when-needed.patch -- password input dialog was not shown +# under certain circumstances (kde#327947, kde#329076, bnc#864305) +Patch68: screenlocker-always-show-password-dialog-when-needed.patch +# PATCH-FIX-UPSTREAM screenlocker-dont-leak-screensaver-processes.patch -- screensaver processes might keep running in +# background when unlocking the screen (kde#224200, bnc#809835) +Patch69: screenlocker-dont-leak-screensaver-processes.patch # Taken from fedora, additional changes resubmitted to fedora Patch71: kde-workspace-4.11.0-kdm-logind-multiseat.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -334,6 +342,7 @@ %patch13 %patch14 -p1 %patch15 -p1 +%patch16 -p1 ## Workspace patches %patch50 %patch51 @@ -351,6 +360,8 @@ %patch65 -p1 %patch66 -p1 %patch67 -p1 +%patch68 -p0 +%patch69 -p1 %if %{with_multiseat} %patch71 -p1 %endif ++++++ kdm-fix-resumption-from-console-mode.patch ++++++ commit 3b3f247f28b25e61a9d1820ea25f3c4a2b699a1d Author: Oswald Buddenhagen <ossi@kde.org> Date: Fri Mar 28 17:52:23 2014 +0100 fix resumption from console mode when monotonic clock is in use BUG: 312947 FIXED-IN: 4.11.8 diff --git a/kdm/backend/dm.c b/kdm/backend/dm.c index e0f1366..77a2ef7 100644 --- a/kdm/backend/dm.c +++ b/kdm/backend/dm.c @@ -74,8 +74,11 @@ static int stopping; SdRec sdRec = { 0, 0, 0, TO_INF, TO_INF, 0, 0, 0 }; time_t now; -#ifndef nowMonotonic +#if (_POSIX_MONOTONIC_CLOCK >= 0) +time_t nowWallDelta; +# ifndef nowMonotonic int nowMonotonic; +# endif #endif #if KDM_LIBEXEC_STRIP != -1 @@ -339,6 +342,11 @@ updateNow(void) clock_gettime(CLOCK_MONOTONIC, &ts); /* Linux' monotonic clock starts at zero, but this is assumed to mean "long ago". */ now = ts.tv_sec + 10000; + /* When we read wall clock dates (e.g. from UTMP), we need to map + them to the monotonic clock. Of course, such mapping defeats the + point of a monotonic clock in the first place, but we have little + choice. */ + nowWallDelta = time(0) - now; } else #endif time(&now); @@ -486,11 +494,14 @@ checkUtmp(void) utp->hadSess = True; utp->state = UtActive; } + nck = ut->ut_time - nowWallDelta; + if (nck > now) + nck = 0; /* Clock jumped. Time out immediately. */ #ifdef HAVE_VTS /* tty with latest activity wins */ - if (utp->time < ut->ut_time) + if (utp->time < nck) #endif - utp->time = ut->ut_time; + utp->time = nck; } #ifdef BSD_UTMP close(fd); diff --git a/kdm/backend/dm.h b/kdm/backend/dm.h index 64e106b..b2f8c61 100644 --- a/kdm/backend/dm.h +++ b/kdm/backend/dm.h @@ -406,12 +406,16 @@ int activateVT(int vt); #ifndef _POSIX_MONOTONIC_CLOCK # define _POSIX_MONOTONIC_CLOCK -1 #endif -#if (_POSIX_MONOTONIC_CLOCK > 0) -# define nowMonotonic 1 -#elif (_POSIX_MONOTONIC_CLOCK < 0) +#if (_POSIX_MONOTONIC_CLOCK < 0) # define nowMonotonic 0 +# define nowWallDelta 0 #else +# if (_POSIX_MONOTONIC_CLOCK > 0) +# define nowMonotonic 1 +# else extern int nowMonotonic; +# endif +extern time_t nowWallDelta; #endif void updateNow(void); ++++++ screenlocker-always-show-password-dialog-when-needed.patch ++++++ diff --git ksmserver/screenlocker/greeter/greeterapp.h ksmserver/screenlocker/greeter/greeterapp.h index 8b79188..895337e 100644 --- ksmserver/screenlocker/greeter/greeterapp.h +++ ksmserver/screenlocker/greeter/greeterapp.h @@ -44,6 +44,7 @@ public: void setTesting(bool enable); void setImmediateLock(bool immediateLock); + void switchToImmediateLock(); public Q_SLOTS: void desktopResized(); diff --git ksmserver/screenlocker/greeter/greeterapp.cpp ksmserver/screenlocker/greeter/greeterapp.cpp index c5e2f85..475d223 100644 --- ksmserver/screenlocker/greeter/greeterapp.cpp +++ ksmserver/screenlocker/greeter/greeterapp.cpp @@ -383,6 +383,12 @@ void UnlockApp::setImmediateLock(bool immediate) m_immediateLock = immediate; } +void UnlockApp::switchToImmediateLock() +{ + setImmediateLock(true); + setLockedPropertyOnViews(); +} + bool UnlockApp::eventFilter(QObject *obj, QEvent *event) { if (obj != this && event->type() == QEvent::Show) { diff --git ksmserver/screenlocker/greeter/main.cpp ksmserver/screenlocker/greeter/main.cpp index d898734..d5c6a2b 100644 --- ksmserver/screenlocker/greeter/main.cpp +++ ksmserver/screenlocker/greeter/main.cpp @@ -24,11 +24,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <iostream> +#include <signal.h> + #include "greeterapp.h" static const char description[] = I18N_NOOP( "Greeter for the KDE Plasma Workspaces Screen locker" ); static const char version[] = "0.1"; +ScreenLocker::UnlockApp *m_instance; + +static void signalhandler(int signum) +{ + m_instance->switchToImmediateLock(); +} + int main(int argc, char* argv[]) { KAboutData aboutData( "kscreenlocker_greet", 0, ki18n( "KScreenLocker Greeter" ), @@ -60,6 +77,7 @@ int main(int argc, char* argv[]) KCmdLineArgs::addCmdLineOptions(options); ScreenLocker::UnlockApp app; + m_instance = &app; KGlobal::locale()->insertCatalog(QLatin1String( "libkworkspace" )); app.disableSessionManagement(); // manually-started KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); @@ -75,5 +93,11 @@ int main(int argc, char* argv[]) // This allow ksmserver to know when the applicaion has actually finished setting itself up. // Crucial for blocking until it is ready, ensuring locking happens before sleep, e.g. std::cout << "Locked at " << QDateTime::currentDateTime().toTime_t() << std::endl; + + struct sigaction sa; + sa.sa_handler = signalhandler; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sigaction(SIGUSR1, &sa, 0); return app.exec(); } diff --git ksmserver/screenlocker/ksldapp.cpp ksmserver/screenlocker/ksldapp.cpp index 3dfcc9e..d43fde7 100644 --- ksmserver/screenlocker/ksldapp.cpp +++ ksmserver/screenlocker/ksldapp.cpp @@ -46,6 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <X11/Xlib.h> // other #include <unistd.h> +#include <signal.h> namespace ScreenLocker { @@ -174,6 +175,10 @@ void KSldApp::lock(bool immediateLock) // already locked or acquiring lock, no need to lock again // but make sure it's really locked endGraceTime(); + if (immediateLock) { + // signal the greeter to switch to immediateLock mode + kill(m_lockProcess->pid(), SIGUSR1); + } return; } ++++++ screenlocker-dont-leak-screensaver-processes.patch ++++++ diff -ur kde-workspace-4.11.8/ksmserver/screenlocker/greeter/main.cpp kde-workspace-4.11.8.new/ksmserver/screenlocker/greeter/main.cpp --- kde-workspace-4.11.8/ksmserver/screenlocker/greeter/main.cpp 2014-04-10 13:48:09.000000000 +0200 +++ kde-workspace-4.11.8.new/ksmserver/screenlocker/greeter/main.cpp 2014-04-10 13:50:10.000000000 +0200 @@ -35,7 +35,18 @@ static void signalhandler(int signum) { - m_instance->switchToImmediateLock(); + switch(signum) + { + case SIGTERM: + // exit gracefully to not leave behind screensaver processes (bug#224200) + // return exit code 1 to indicate that a valid password was not entered, + // to prevent circumventing the password input by sending a SIGTERM + m_instance->exit(1); + break; + case SIGUSR1: + m_instance->switchToImmediateLock(); + break; + } } int main(int argc, char* argv[]) @@ -90,6 +101,7 @@ sa.sa_handler = signalhandler; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; + sigaction(SIGTERM, &sa, 0); sigaction(SIGUSR1, &sa, 0); return app.exec(); } diff -ur kde-workspace-4.11.8/ksmserver/screenlocker/ksldapp.cpp kde-workspace-4.11.8.new/ksmserver/screenlocker/ksldapp.cpp --- kde-workspace-4.11.8/ksmserver/screenlocker/ksldapp.cpp 2014-04-10 13:48:09.000000000 +0200 +++ kde-workspace-4.11.8.new/ksmserver/screenlocker/ksldapp.cpp 2014-04-10 13:50:10.000000000 +0200 @@ -374,7 +374,7 @@ return; } s_graceTimeKill = true; - m_lockProcess->kill(); + m_lockProcess->terminate(); } void KSldApp::inhibit() -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de