aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-screensaver
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-11-27 09:55:06 +0000
committerWeblate <noreply@weblate.org>2017-11-27 09:55:06 +0000
commit152a57c8c2844d63f95803128b216c8ab722e6e2 (patch)
tree0ce13eccbf6ef36df43d4c558657c9699f757d20 /src-qt5/core/lumina-desktop-unified/src-screensaver
parentTranslated using Weblate (Spanish) (diff)
parentremove file manager dev folder (diff)
downloadlumina-152a57c8c2844d63f95803128b216c8ab722e6e2.tar.gz
lumina-152a57c8c2844d63f95803128b216c8ab722e6e2.tar.bz2
lumina-152a57c8c2844d63f95803128b216c8ab722e6e2.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-screensaver')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp9
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp
index b791ffd2..2cfd0f4a 100644
--- a/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp
@@ -83,12 +83,13 @@ void LLockScreen::TryUnlock(){
bool ok = false;
if( TF->open() ){
QTextStream in(TF);
- in << pass;
- in.flush(); //make sure we push it to the file **right now** since we need to keep the file open
- ok = (LUtils::runCmd("lumina-checkpass", QStringList() << "-f" << TF->fileName() ) == 0);
+ in << pass.toUtf8()+"\0"; //make sure it is null-terminated
TF->close();
+ //qDebug() << "Trying to unlock session:" << TF->fileName() << LUtils::readFile(TF->fileName());
+ //qDebug() << "UserName:" << getlogin();
+ LUtils::runCommand(ok, "lumina-checkpass",QStringList() << "-f" << TF->fileName() );
}
- delete TF;
+ delete TF; //ensure the temporary file is removed **right now** for security purposes
if(ok){
emit ScreenUnlocked();
this->setEnabled(true);
diff --git a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
index 122307b3..7c098887 100644
--- a/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
+++ b/src-qt5/core/lumina-desktop-unified/src-screensaver/SSBaseWidget.cpp
@@ -7,7 +7,7 @@
#include "SSBaseWidget.h"
-#define DEBUG 1
+#define DEBUG 0
// ========
// PUBLIC
bgstack15