]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Move utmpx handling out of init(8).
authored <ed@FreeBSD.org>
Sat, 11 Feb 2012 20:47:16 +0000 (20:47 +0000)
committered <ed@FreeBSD.org>
Sat, 11 Feb 2012 20:47:16 +0000 (20:47 +0000)
commit959ca16023aae7c8432edca09966fbccd16d5a90
treee19f43b12c30c0d24550c43ff6b9a4ea289111b3
parent51f3dcc0bd6e354eab16e3f6b3fb7228f1581047
Move utmpx handling out of init(8).

This has the following advantages:

- During boot, the BOOT_TIME record is now written right after the file
  systems become writable, but before users are allowed to log in. This
  means that they can't cause `hidden logins' by logging in right before
  init(8) kicks in.

- The pututxline(3) function may potentially block on file locking,
  though this is very rare to occur. By placing it in an rc script, the
  user can still kill it with ^C if needed.

- Most importantly: jails don't use init(8). This means that a force
  reboot of a system running jails will leave stale entries in the
  accounting database of the jails individually.
etc/rc.d/Makefile
etc/rc.d/cleanvar
etc/rc.d/utx [new file with mode: 0755]
sbin/init/init.8
sbin/init/init.c