mrrl-logincaps

MRRL version of logincaps
git clone https://ccx.te2000.cz/git/mrrl-logincaps
Log | Files | Refs

commit 6a1dbcd194ac206bbdc52584b023e2e4e549eafd
parent d70c82dbdbc79ad7f912ec3042c2e6ef2c629740
Author: ccx <ccx@te2000.cz>
Date:   Wed, 13 Mar 2024 07:07:55 +0000

Debug version of login

Diffstat:
Mlogin/login.c | 15+++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/login/login.c b/login/login.c @@ -24,6 +24,8 @@ config LOGIN -f login as USERNAME without authentication */ +#include <assert.h> + #define FOR_login #include "toys.h" @@ -70,7 +72,7 @@ void login_main(void) if (TT.username) username = TT.username; else username = *toys.optargs; for (count = 0; count < 3; count++) { - alarm(TT.login_timeout = 60); + //alarm(TT.login_timeout = 60); tcflush(0, TCIFLUSH); if (!username) { @@ -223,11 +225,8 @@ void login_main(void) syslog(LOG_INFO, "%s logged in on %s %s %s", pwd->pw_name, ttyname(tty), hh ? "from" : "", hh ? TT.hostname : ""); - if(use_loginexec) { - execl(LOGINEXEC_PATH, LOGINEXEC_PATH, loginexec, (char *)0); - } else { - // not using xexec(), login calls absolute path from filesystem so must exec() - execl(pwd->pw_shell, xmprintf("-%s", pwd->pw_shell), (char *)0); - perror_exit("exec shell '%s'", pwd->pw_shell); - } + assert(!use_loginexec); + // not using xexec(), login calls absolute path from filesystem so must exec() + execl(pwd->pw_shell, xmprintf("-%s", pwd->pw_shell), (char *)0); + perror_exit("exec shell '%s'", pwd->pw_shell); }