logo

skeud

Simple and portable utilities to deal with user accounts (su, login)git clone https://anongit.hacktivis.me/git/skeud.git/
commit: 11a181fe759955661d9e476e434b67625ce766ec
parent 09815c82a7b003c2e3bb3a58e0a5e5841ae16ad7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 23 Sep 2025 11:23:57 +0200

login: use write() directly for the prompt

Diffstat:

Mlogin.c3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/login.c b/login.c @@ -97,7 +97,8 @@ main(int argc, char *argv[]) { size_t len = 0; - fputs("username: ", stdout); + const char *prompt = "username: "; + write(STDERR_FILENO, prompt, strlen(prompt)); ssize_t got = getline(&username_buf, &len, stdin); if(got < 0) {