]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a regression that was introduced in r191882.
authorEd Schouten <ed@FreeBSD.org>
Sun, 17 Jan 2010 17:52:35 +0000 (17:52 +0000)
committerEd Schouten <ed@FreeBSD.org>
Sun, 17 Jan 2010 17:52:35 +0000 (17:52 +0000)
commit2c8d07a874b1a8151e15015e79327dc64ca96333
tree65fbe35bcaa21008118fc67cabff2018e28f9e94
parent79a7dbf11112e9705259f37a08ca5ee4a3cf6488
Fix a regression that was introduced in r191882.

I changed login_tty() to only work when the application is not a session
leader yet. This works fine for applications in the base system, but it
turns out various applications call this function after daemonizing,
which means they already use their own session.

If setsid() fails, just call tcsetsid() on the current session.
tcsetsid() will already perform proper security checks.

Reported by: Oliver Lehmann
MFC after: 1 week
lib/libutil/login_tty.c