summaryrefslogtreecommitdiff
authorclem <clem>2004-09-17 21:05:46 (UTC)
committer clem <clem>2004-09-17 21:05:46 (UTC)
commitdcb3342e9f310425ed1abeaa6c00a3132ec609b8 (patch) (side-by-side diff)
tree383be9477bc59940722094ca6854186afa80e7bd
parentf35f5bef4c8bad180a02b1804fe0ce8fd7c451bd (diff)
downloadopie-dcb3342e9f310425ed1abeaa6c00a3132ec609b8.zip
opie-dcb3342e9f310425ed1abeaa6c00a3132ec609b8.tar.gz
opie-dcb3342e9f310425ed1abeaa6c00a3132ec609b8.tar.bz2
if there are no configured plugins, we simply return 0 to let the user in
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiesecurity/multiauthcommon.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opiesecurity/multiauthcommon.cpp b/libopie2/opiesecurity/multiauthcommon.cpp
index d8e26d5..9de62d2 100644
--- a/libopie2/opiesecurity/multiauthcommon.cpp
+++ b/libopie2/opiesecurity/multiauthcommon.cpp
@@ -70,12 +70,21 @@ int runPlugins() {
oi = new SecOwnerDlg(0, 0, c, TRUE, TRUE);
}
Config config("Security");
config.setGroup("Plugins");
QStringList plugins = config.readListEntry("IncludePlugins", ',');
+ /* if there are no configured plugins, we simply return 0 to
+ * let the user in:
+ */
+ if (plugins.isEmpty() == true) {
+ owarn << "No authentication plugin has been configured yet!" << oendl;
+ odebug << "Letting the user in..." << oendl;
+ if(oi) delete oi;
+ return 0;
+ }
config.setGroup("Misc");
int nbSuccessMin = config.readNumEntry("nbSuccessMin", 1);
int nbSuccess = 0;
/* tries to launch successively each plugin in $OPIEDIR/plugins/security
* directory which file name is in Security.conf / [Misc] / IncludePlugins