]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r202500:
authored <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 24 Jan 2010 14:30:57 +0000 (14:30 +0000)
committered <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 24 Jan 2010 14:30:57 +0000 (14:30 +0000)
commite219f88c18bf1565b632b505fcbea99e437fd3b2
treec79d086f48d4ffc192fc3a36339f37891765dd3e
parentf1c8747e5e8cfbaa6e218408fae1882a12d651aa
MFC r202500:

  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

git-svn-id: svn://svn.freebsd.org/base/stable/8@202929 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libutil/login_tty.c