Skip to content

Commit

Permalink
Base: Add "tty" group and make /dev/tty* be root:tty mode 610
Browse files Browse the repository at this point in the history
This fixes an issue where anyone could snoop on the virtual consoles.
  • Loading branch information
awesomekling committed Jan 4, 2020
1 parent 4f4dc47 commit 20ac4e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Base/etc/group
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
root:x:0:
wheel:x:1:anon
tty:x:2:
users:x:100:anon
4 changes: 4 additions & 0 deletions Kernel/build-root-filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ mknod mnt/dev/ttyS0 c 4 64
mknod mnt/dev/ttyS1 c 4 65
mknod mnt/dev/ttyS2 c 4 66
mknod mnt/dev/ttyS3 c 4 67
for tty in 0 1 2 3 S0 S1 S2 S3; do
chmod 620 mnt/dev/tty$tty
chown 0:2 mnt/dev/tty$tty
done
mknod mnt/dev/random c 1 8
mknod mnt/dev/null c 1 3
mknod mnt/dev/zero c 1 5
Expand Down

0 comments on commit 20ac4e4

Please sign in to comment.