From: Peter Hurley Date: Tue, 19 Nov 2013 13:46:27 +0000 (-0500) Subject: tty: Reset hupped state on open X-Git-Tag: v3.13-rc2~15^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4855e1fc03c2bb32dd64badf51cec5a2a26ab2a;p=pandora-kernel.git tty: Reset hupped state on open A common security idiom is to hangup the current tty (via vhangup()) after forking but before execing a root shell. This hangs up any existing opens which other processes may have and ensures subsequent opens have the necessary permissions to open the root shell tty/pty. Reset the TTY_HUPPED state after the driver has successfully returned the opened tty (perform the reset while the tty is locked to avoid racing with concurrent hangups). Reported-by: Heorhi Valakhanovich Signed-off-by: Peter Hurley Cc: stable # 3.12 Tested-by: Heorhi Valakhanovich Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed