diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-04-27 13:26:04 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-03 03:27:16 +0200 |
commit | 3870dbe675124cea8970e86a595827ed50c9acb4 (patch) | |
tree | 4813abcff0939b26fb4d825dc48bc82c7d3d3636 /kdmlib | |
parent | 33f1ecab8492e686c4bd736419ca1ae33e2c6eea (diff) | |
download | tdebase-3870dbe675124cea8970e86a595827ed50c9acb4.tar.gz tdebase-3870dbe675124cea8970e86a595827ed50c9acb4.zip |
Check for tsak presence on lock engage
Fix tsak not exiting on request
Clean up build warnings
(cherry picked from commit 22d0a673d7d6049d388847b476df1e5b6f3d6b70)
Diffstat (limited to 'kdmlib')
-rw-r--r-- | kdmlib/kdmtsak.cpp | 14 | ||||
-rw-r--r-- | kdmlib/kgreet_pam.cpp | 1 | ||||
-rw-r--r-- | kdmlib/kgreet_winbind.cpp | 6 |
3 files changed, 16 insertions, 5 deletions
diff --git a/kdmlib/kdmtsak.cpp b/kdmlib/kdmtsak.cpp index 22f8a0b9a..c0be1106b 100644 --- a/kdmlib/kdmtsak.cpp +++ b/kdmlib/kdmtsak.cpp @@ -121,10 +121,14 @@ int main (int argc, char *argv[]) int verifier_result = tde_sak_verify_calling_process(); bool isdm = false; + bool checkonly = false; if (argc == 2) { if (strcmp(argv[1], "dm") == 0) { isdm = true; } + if (strcmp(argv[1], "check") == 0) { + checkonly = true; + } } if (!isdm) { @@ -139,6 +143,14 @@ int main (int argc, char *argv[]) // OK, the calling process is authorized to retrieve SAK data // First, flush the buffer mPipe_fd = open(FIFO_FILE, O_RDONLY | O_NONBLOCK); + if (checkonly) { + if (mPipe_fd < 0) { + return 6; // SAK not available + } + else { + return 0; + } + } numread = 1; while (numread > 0) { numread = read(mPipe_fd, readbuf, 6); @@ -177,4 +189,4 @@ int main (int argc, char *argv[]) else { return verifier_result; } -}
\ No newline at end of file +} diff --git a/kdmlib/kgreet_pam.cpp b/kdmlib/kgreet_pam.cpp index 41c7b2439..9b07869f8 100644 --- a/kdmlib/kgreet_pam.cpp +++ b/kdmlib/kgreet_pam.cpp @@ -354,7 +354,6 @@ KPamGreeter::textPrompt( const char *prompt, bool echo, bool nonBlocking ) } else if (m_themer) { kg_debug("themer found!"); - KdmItem *pw_label = 0; KdmLabel *kdmlabel = static_cast<KdmLabel*>(m_themer->findNode("pw-label")); if (kdmlabel) { diff --git a/kdmlib/kgreet_winbind.cpp b/kdmlib/kgreet_winbind.cpp index 3ab5bbaa8..90950a58c 100644 --- a/kdmlib/kgreet_winbind.cpp +++ b/kdmlib/kgreet_winbind.cpp @@ -607,14 +607,14 @@ KWinbindGreeter::slotEndDomainList() TQString current = domainCombo->currentText(); - for (int i = 0; i < domainList.count(); ++i) { - if (i < domainCombo->count()) + for (unsigned int i = 0; i < domainList.count(); ++i) { + if (i < (uint)domainCombo->count()) domainCombo->changeItem(domainList[i], i); else domainCombo->insertItem(domainList[i], i); } - while (domainCombo->count() > domainList.count()) + while ((uint)domainCombo->count() > domainList.count()) domainCombo->removeItem(domainCombo->count()-1); domainCombo->setCurrentItem( current ); |