]> git.baikalelectronics.ru Git - kernel.git/commit
TTY: fix atime/mtime regression
authorJiri Slaby <jslaby@suse.cz>
Fri, 26 Apr 2013 11:48:53 +0000 (13:48 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Apr 2013 14:59:23 +0000 (07:59 -0700)
commit4687116e2ae92ef0317aace114f62cc009bfe3f4
tree7e9b3cd8a5c5b10d6ee32dc8b85c5d5211fd5eeb
parente40f06a4bb8b7461c1c5c21559a37c8636102f2b
TTY: fix atime/mtime regression

In commit a2c1410fd460 ("TTY: do not update atime/mtime on read/write")
we removed timestamps from tty inodes to fix a security issue and waited
if something breaks.  Well, 'w', the utility to find out logged users
and their inactivity time broke.  It shows that users are inactive since
the time they logged in.

To revert to the old behaviour while still preventing attackers to
guess the password length, we update the timestamps in one-minute
intervals by this patch.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/tty/tty_io.c