mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kwalletd: do not attempt to open wallet via PAM if wallet is disabled
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
fc7b2df492
commit
678dc2966e
1 changed files with 7 additions and 6 deletions
|
@ -38,6 +38,7 @@
|
|||
|
||||
static int pipefd = 0;
|
||||
static int socketfd = 0;
|
||||
|
||||
static bool isWalletEnabled()
|
||||
{
|
||||
KConfig cfg("kwalletrc");
|
||||
|
@ -144,6 +145,12 @@ char* checkPamModule(int argc, char **argv)
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// check if kwallet is disabled
|
||||
if (!isWalletEnabled()) {
|
||||
kDebug() << "kwalletd is disabled!";
|
||||
return (0);
|
||||
}
|
||||
|
||||
char *hash = NULL;
|
||||
if (getenv("PAM_KWALLET_LOGIN")) {
|
||||
hash = checkPamModule(argc, argv);
|
||||
|
@ -166,12 +173,6 @@ int main(int argc, char **argv)
|
|||
app.disableSessionManagement();
|
||||
app.setQuitOnLastWindowClosed( false );
|
||||
|
||||
// check if kwallet is disabled
|
||||
if (!isWalletEnabled()) {
|
||||
kDebug() << "kwalletd is disabled!";
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (!KUniqueApplication::start()) {
|
||||
kDebug() << "kwalletd is already running!";
|
||||
return (0);
|
||||
|
|
Loading…
Add table
Reference in a new issue