diff --git a/kdesktop/lock/sakdlg.cc b/kdesktop/lock/sakdlg.cc index 1647fb527..8b00e5408 100644 --- a/kdesktop/lock/sakdlg.cc +++ b/kdesktop/lock/sakdlg.cc @@ -96,8 +96,8 @@ SAKDlg::SAKDlg(LockProcess *parent) layStatus->addWidget( mStatusLabel ); frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); - frameLayout->addMultiCellWidget( theader, 0, 0, 0, 1, Qt::AlignTop | AlignHCenter ); - frameLayout->addMultiCellLayout( layStatus, 1, 1, 0, 1, AlignHCenter | AlignVCenter); + frameLayout->addMultiCellWidget( theader, 0, 0, 0, 1, AlignTop | AlignLeft ); + frameLayout->addMultiCellLayout( layStatus, 1, 1, 0, 1, AlignLeft | AlignVCenter); mStatusLabel->setText("" + i18n("Press Ctrl+Alt+Del to begin.") + "
" + i18n("This process helps keep your password secure.") + " " + i18n("This process helps keep your password secure.") + "
" + i18n("It prevents unauthorized users from emulating the login screen."));
diff --git a/kdesktop/lock/securedlg.cc b/kdesktop/lock/securedlg.cc
index bdebf4e13..6d6b6c3a0 100644
--- a/kdesktop/lock/securedlg.cc
+++ b/kdesktop/lock/securedlg.cc
@@ -118,7 +118,7 @@ SecureDlg::SecureDlg(LockProcess *parent)
layPBRow1->addWidget( mCancelButton );
frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
- frameLayout->addMultiCellWidget( theader, 0, 0, 0, 1, Qt::AlignTop | AlignLeft );
+ frameLayout->addMultiCellWidget( theader, 0, 0, 0, 1, AlignTop | AlignLeft );
frameLayout->addMultiCellLayout( layStatus, 1, 1, 0, 1, AlignLeft | AlignVCenter);
frameLayout->addMultiCellWidget( sep, 2, 2, 0, 1 );
frameLayout->addMultiCellLayout( layPBRow1, 3, 3, 0, 1, AlignLeft | AlignVCenter);
diff --git a/kdm/config.def b/kdm/config.def
index c7388471f..43e7f5971 100644
--- a/kdm/config.def
+++ b/kdm/config.def
@@ -2006,6 +2006,16 @@ Comment:
Description:
Specify the Xorg window manager. Currently only kwin is supported.
+Key: UseSAK
+Type: bool
+Default: true
+User: greeter
+Instance: #*/!
+Comment:
+ SAK
+Description:
+ If true then the SAK anti-spoofing dialog will be utilized
+
Key: UseAdminSession
Type: bool
Default: false
diff --git a/kdm/kfrontend/CMakeLists.txt b/kdm/kfrontend/CMakeLists.txt
index 22e017e46..aaff8085d 100644
--- a/kdm/kfrontend/CMakeLists.txt
+++ b/kdm/kfrontend/CMakeLists.txt
@@ -63,7 +63,7 @@ tde_add_executable( kdm_greet AUTOMOC
kdm_greet.c kdmconfig.cpp kdmclock.cpp kconsole.cpp
kfdialog.cpp kgdialog.cpp kchooser.cpp kgverify.cpp
kdmshutdown.cpp kdmadmindialog.cpp kgreeter.cpp
- kgapp.cpp
+ kgapp.cpp sakdlg.cc
LINK kdmthemer-static kdeui-shared Xtst krandr-shared
DESTINATION ${BIN_INSTALL_DIR}
)
diff --git a/kdm/kfrontend/kfdialog.cpp b/kdm/kfrontend/kfdialog.cpp
index 3d790f9f2..b834ca450 100644
--- a/kdm/kfrontend/kfdialog.cpp
+++ b/kdm/kfrontend/kfdialog.cpp
@@ -61,7 +61,7 @@ FDialog::FDialog( TQWidget *parent, bool framed )
} else
winFrame = 0;
- setCaption(i18n("Trinity Desktop Environment"));
+ setCaption(KDM_LOGIN_SCREEN_BASE_TITLE);
if (framed) {
if (m_wmTitle) setFixedSize(sizeHint());
@@ -158,11 +158,11 @@ FDialog::box( TQWidget *parent, TQMessageBox::Icon type, const TQString &text )
KFMsgBox::KFMsgBox( TQWidget *parent, TQMessageBox::Icon type, const TQString &text )
: inherited( parent, !is_themed )
{
- if (type == TQMessageBox::NoIcon) setCaption(i18n("TDE"));
- if (type == TQMessageBox::Question) setCaption(i18n("TDE") + " - " + i18n("Question"));
- if (type == TQMessageBox::Information) setCaption(i18n("TDE") + " - " + i18n("Information"));
- if (type == TQMessageBox::Warning) setCaption(i18n("TDE") + " - " + i18n("Warning"));
- if (type == TQMessageBox::Critical) setCaption(i18n("TDE") + " - " + i18n("Error"));
+ if (type == TQMessageBox::NoIcon) setCaption(KDM_LOGIN_SCREEN_BASE_TITLE);
+ if (type == TQMessageBox::Question) setCaption(KDM_LOGIN_SCREEN_BASE_TITLE + " - " + i18n("Question"));
+ if (type == TQMessageBox::Information) setCaption(KDM_LOGIN_SCREEN_BASE_TITLE + " - " + i18n("Information"));
+ if (type == TQMessageBox::Warning) setCaption(KDM_LOGIN_SCREEN_BASE_TITLE + " - " + i18n("Warning"));
+ if (type == TQMessageBox::Critical) setCaption(KDM_LOGIN_SCREEN_BASE_TITLE + " - " + i18n("Error"));
TQLabel *label1 = new TQLabel( this );
label1->setPixmap( TQMessageBox::standardIcon( type ) );
diff --git a/kdm/kfrontend/kfdialog.h b/kdm/kfrontend/kfdialog.h
index d433594a4..3537c7b57 100644
--- a/kdm/kfrontend/kfdialog.h
+++ b/kdm/kfrontend/kfdialog.h
@@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#define KDM_LOGIN_SCREEN_BASE_TITLE i18n("Login to TDE")
#ifndef FDIALOG_H
#define FDIALOG_H
diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp
index 0aaaa6e9b..ac99a4bc3 100644
--- a/kdm/kfrontend/kgapp.cpp
+++ b/kdm/kfrontend/kgapp.cpp
@@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifdef XDMCP
# include "kchooser.h"
#endif
+#include "sakdlg.h"
#include
" + i18n("It prevents unauthorized users from emulating the login screen."));
+
+ installEventFilter(this);
+
+ mSAKProcess = new KProcess;
+ *mSAKProcess << "kdmtsak";
+ connect(mSAKProcess, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
+ mSAKProcess->start();
+}
+
+void SAKDlg::slotSAKProcessExited()
+{
+ int retcode = mSAKProcess->exitStatus();
+ if (retcode != 0) trinity_desktop_lock_use_sak = false;
+ hide();
+}
+
+SAKDlg::~SAKDlg()
+{
+ if ((mSAKProcess) && (mSAKProcess->isRunning())) {
+ mSAKProcess->kill(SIGTERM);
+ delete mSAKProcess;
+ }
+ hide();
+}
+
+void SAKDlg::closeDialogForced()
+{
+ TQDialog::reject();
+}
+
+void SAKDlg::reject()
+{
+
+}
+
+void SAKDlg::updateLabel(TQString &txt)
+{
+ mStatusLabel->setPaletteForegroundColor(Qt::black);
+ mStatusLabel->setText("" + txt + "");
+}
+
+void SAKDlg::show()
+{
+ TQDialog::show();
+ TQApplication::flushX();
+}
+
+#include "sakdlg.moc"
diff --git a/kdm/kfrontend/sakdlg.h b/kdm/kfrontend/sakdlg.h
new file mode 100644
index 000000000..d94322f79
--- /dev/null
+++ b/kdm/kfrontend/sakdlg.h
@@ -0,0 +1,58 @@
+//===========================================================================
+//
+// This file is part of the KDE project
+//
+// Copyright (c) 2010 Timothy Pearson