summaryrefslogtreecommitdiffstats
path: root/bin/ykfde.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2016-05-03 16:03:36 +0200
committerGravatar Christian Hesse <mail@eworm.de>2016-05-03 16:03:36 +0200
commitbf1efdba13834414f1c222c902cd4e5f5f6cd499 (patch)
tree6463c0f50bdc2153ee1da563c2d03b0ca4f8c2c1 /bin/ykfde.c
parent7c34c05c6c40c1349cbccbcb04fa88fa006db613 (diff)
downloadmkinitcpio-ykfde-bf1efdba13834414f1c222c902cd4e5f5f6cd499.tar.gz
mkinitcpio-ykfde-bf1efdba13834414f1c222c902cd4e5f5f6cd499.tar.zst
warn when second factor is preocessed but not enabled in config
Diffstat (limited to 'bin/ykfde.c')
-rw-r--r--bin/ykfde.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/ykfde.c b/bin/ykfde.c
index 2f1e73a..59b958d 100644
--- a/bin/ykfde.c
+++ b/bin/ykfde.c
@@ -206,6 +206,11 @@ int main(int argc, char **argv) {
payload = strdup("");
}
+ /* warn when second factor is not enabled in config */
+ if ((*(char*)payload != 0 || new_2nd_factor != NULL) &&
+ iniparser_getboolean(ini, "general:" CONF2NDFACTOR, 0) == 0)
+ fprintf(stderr, "Warning: Processing second factor, but not enabled in config!\n");
+
/* get random number and limit to printable ASCII character (32 to 126) */
for(i = 0; i < CHALLENGELEN; i++)
challenge_new[i] = (rand() % (126 - 32)) + 32;