From 63e63a88ce42fd10038a97d833d44f60c6f30b35 Mon Sep 17 00:00:00 2001 From: Lisa Milne Date: Mon, 18 Dec 2023 18:00:14 +1000 Subject: [PATCH] do not auto-login to guest if another non-root account exists with a password --- clite/core.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clite/core.js b/clite/core.js index e7f52f8..df7e9eb 100644 --- a/clite/core.js +++ b/clite/core.js @@ -1310,11 +1310,13 @@ cat -l /usr/share/introduction return d; } clite.user.hasAltLogin = function() { + let r = false; data.users.forEach(function(u) { + console.log(u.name+':'+u.pass); if (u.name != 'root' && u.pass != 'x') - return true; + r = true; }); - return false; + return r; } loadUsers();