mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
utmpupdate: Add a program for updating /var/run/utmp
To keep track of ongoing terminal sessions, we now have a sort-of traditional /var/run/utmp file, like other Unix systems. Unlike other Unix systems however, ours is of course JSON. :^) The /bin/utmpupdate program is used to update the file, which is not writable by regular user accounts. This helper program is set-GID "utmp".
This commit is contained in:
parent
35b844ba4c
commit
dcd47655d0
4 changed files with 94 additions and 1 deletions
|
@ -6,6 +6,7 @@ wheel_gid=1
|
|||
tty_gid=2
|
||||
phys_gid=3
|
||||
audio_gid=4
|
||||
utmp_gid=5
|
||||
window_uid=13
|
||||
window_gid=13
|
||||
|
||||
|
@ -51,11 +52,13 @@ chmod 4755 mnt/bin/ping
|
|||
chmod 4750 mnt/bin/reboot
|
||||
chmod 4750 mnt/bin/shutdown
|
||||
chmod 4750 mnt/bin/keymap
|
||||
chown 0:$utmp_gid mnt/bin/utmpupdate
|
||||
chmod 2755 mnt/bin/utmpupdate
|
||||
|
||||
echo "done"
|
||||
|
||||
printf "creating initial filesystem structure... "
|
||||
for dir in bin etc proc mnt tmp boot mod; do
|
||||
for dir in bin etc proc mnt tmp boot mod var/run; do
|
||||
mkdir -p mnt/$dir
|
||||
done
|
||||
chmod 700 mnt/boot
|
||||
|
@ -63,6 +66,12 @@ chmod 700 mnt/mod
|
|||
chmod 1777 mnt/tmp
|
||||
echo "done"
|
||||
|
||||
printf "creating utmp file... "
|
||||
touch mnt/var/run/utmp
|
||||
chown 0:$utmp_gid mnt/var/run/utmp
|
||||
chmod 664 mnt/var/run/utmp
|
||||
echo "done"
|
||||
|
||||
printf "setting up device nodes... "
|
||||
mkdir -p mnt/dev
|
||||
mkdir -p mnt/dev/pts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue