login: turn off btmp, utmp, lastlog writing
authorChris Hofstaedtler <zeha@debian.org>
Mon, 5 Aug 2024 14:03:11 +0000 (16:03 +0200)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 9 Sep 2024 21:20:25 +0000 (23:20 +0200)
Should be done by PAM instead. login from src:shadow had turned it off, especially with --enable-logind.

Gbp-Pq: Topic debian
Gbp-Pq: Name login-turn-off-btmp-utmp-lastlog-writing.patch

login-utils/login.c

index 7ed325514c9e26bdbc88598d76363c7c8cf670a3..35e3cc3706f032bb41db306d15af4fad964bb8f7 100644 (file)
@@ -971,7 +971,6 @@ static void loginpam_auth(struct login_context *cxt)
                       cxt->username ? cxt->username : "(unknown)",
                       pam_strerror(pamh, rc));
 
-               log_btmp(cxt);
                log_audit(cxt, 0);
 
                if (!keep_username || rc == PAM_USER_UNKNOWN) {
@@ -1003,7 +1002,6 @@ static void loginpam_auth(struct login_context *cxt)
                               cxt->username ? cxt->username : "(unknown)",
                               pam_strerror(pamh, rc));
 
-               log_btmp(cxt);
                log_audit(cxt, 0);
 
                fprintf(stderr, _("\nLogin incorrect\n"));
@@ -1495,9 +1493,7 @@ int main(int argc, char **argv)
 
        endpwent();
 
-       log_utmp(&cxt);
        log_audit(&cxt, 1);
-       log_lastlog(&cxt);
 
        chown_tty(&cxt);