We shouldn't fork off a utmp helper subprocess when we aren't setuid,
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 19 Sep 2011 16:38:23 +0000 (16:38 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 19 Sep 2011 16:38:23 +0000 (16:38 +0000)
commitdd5517cba1ca97e82bdca32a49186179c855c962
treef7a5e07392343c383b79aa4aec33cffc08caadd2
parentb473b52b4246ef404e9da6bdc306af5eff5ce58f
We shouldn't fork off a utmp helper subprocess when we aren't setuid,
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).

git-svn-id: svn://svn.tartarus.org/sgt/putty@9309 cda61777-01e9-0310-a592-d414129be87e
unix/uxpty.c