]> git.karo-electronics.de Git - karo-tx-linux.git/commit
TTY: fix atime/mtime regression
authorJiri Slaby <jslaby@suse.cz>
Fri, 26 Apr 2013 11:48:53 +0000 (13:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 May 2013 16:46:00 +0000 (09:46 -0700)
commit7a015c0d2f4e96d7bdeeda016a52233c7743188f
tree0c72eb07d56ccc65b0cbe01b0a5850b2195a69ee
parentcb3ab89ba72b5bc7579c9d5194828245e2119c74
TTY: fix atime/mtime regression

commit 37b7f3c76595e23257f61bd80b223de8658617ee upstream.

In commit b0de59b5733d ("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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_io.c