mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
feat(auth): Boot-time login prompt; fix(configure): arch selection via dialog
Login: - Add console_login() (security/auth.c): an interactive boot-time username / password gate rendered on the framebuffer console before any session starts. It blocks until valid credentials are entered, masks the password, scrubs it from the stack, and sets the current user. Default account is SUB / SUB, shown as a hint. Wired into the boot handoff in kernel/main.c ahead of both the GUI desktop and the emergency TTY shell. Configure: - scripts/kconfig/menuconfig.py: fix the architecture (and optimization) picker. The lxdialog front-end used --radiolist, where <Enter> confirms the ORIGINAL choice and only <Space> moves the dot -- so highlighting a new architecture and pressing <Enter> appeared to do nothing. Single-choice groups now use --menu (with --default-item), where <Enter> selects the highlighted row directly. Also stop the unconditional save-on-exit from overriding an explicit "No" at the exit confirmation. Verified: SUB/SUB logs in (injected via QEMU monitor) -> "Login successful" -> desktop starts; the desktop stays blocked until login. dialog --menu selection of aarch64 persists to .config/autoconf.h and retargets `make`. Clean build on x86_64/aarch64/armv8i. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Fh5z6V7nGPbHvqVG5p4CXX
This commit is contained in:
1 parent
71ad6aca3d
commit
c982d6b538
5 files changed
+146
-44
No files matched your search
@@ -31,4 +31,9 @@ int auth_set_current_user(const char* username);
|
||||
size_t auth_get_user_count(void);
|
||||
const user_account_t* auth_get_user_by_index(size_t index);
|
||||
|
||||
/* Interactive boot-time login: prompts for a username and password on the
|
||||
* console and blocks until a valid pair is entered, then sets the current
|
||||
* user. Default account is SUB / SUB. */
|
||||
void console_login(void);
|
||||
|
||||
#endif // _SECURITY_AUTH_H
|
||||
Reference in new issue
Block a user