]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
We shouldn't fork off a utmp helper subprocess when we aren't setuid,
authorSimon Tatham <anakin@pobox.com>
Mon, 19 Sep 2011 16:38:23 +0000 (16:38 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 19 Sep 2011 16:38:23 +0000 (16:38 +0000)
because (a) under that circumstance we won't be writing to utmp
anyway, and (b) if we aren't setuid, then we won't have created the
pty at the point we fork, so even if our subprocess _could_ have
written to utmp it wouldn't have done it right!

Spotted by valgrind (triggering on the access beyond the end of the
ttyname string in setup_utmp, clueing me in to it having been empty).

[originally from svn r9309]


No differences found