• J
    TTY: fix atime/mtime regression · 37b7f3c7
    Jiri Slaby 提交于
    In commit b0de59b5 ("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: NJiri Slaby <jslaby@suse.cz>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    37b7f3c7
tty_io.c 86.9 KB