diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-screensaver/LLockScreen.cpp | 9 |
1 files changed, 5 insertions, 4 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); |