UTMP: Only account for getty processes

This patch removes accounting for all processes to instead implement the
traditional SysV getty accounting.  (Telnet/SSH et al maintain their own
accounding for UTMP.)

TODO: WTMP support

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-08-17 18:43:49 +02:00
1 parent b6bf8bf518
commit 5bab329178
3 files changed
+4 -11

No files matched your search

+4
View File
@@ -31,6 +31,7 @@
#include "conf.h"
#include "helpers.h"
#include "tty.h"
#include "utmp-api.h"
LIST_HEAD(, tty_node) tty_list = LIST_HEAD_INITIALIZER();
@@ -198,6 +199,9 @@ int tty_respawn(pid_t pid)
if (!entry)
return 0;
/* Set DEAD_PROCESS UTMP entry */
utmp_set_dead(pid);
/* Clear PID to be able to respawn it. */
entry->data.pid = 0;