diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2017-10-01 09:43:53 +0200 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2017-10-03 16:49:49 +0200 |
commit | 50bd014ad8ed0b0af1e9e8130779acd0473a6899 (patch) | |
tree | 276e4559bce018f36a89b7559df16862796660d3 | |
parent | 4743378ccf1defe5984ad71797283b98029aa920 (diff) |
chown before chmod
This prevents a malicious user logging out from calling
chmod while still owning /dev/console and thus by-passing
the '622' mode that is set here.
Issue reported by Tim Chase. Thanks.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | config/TakeConsole | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/TakeConsole b/config/TakeConsole index a4ac108..a1fdacf 100644 --- a/config/TakeConsole +++ b/config/TakeConsole @@ -2,5 +2,5 @@ # Reassign ownership of the console to root, this should disallow # assignment of console output to any random users's xterm # -chmod 622 /dev/console chown root /dev/console +chmod 622 /dev/console |