From 42430e0f43bef8e5a0238fd86a58fce97b9e618b Mon Sep 17 00:00:00 2001 From: Chris Provenzano Date: Wed, 26 Apr 1995 11:22:13 +0000 Subject: [PATCH] * krlogind.c (doit()) : If TIOCOTTY is defined unset the controlling tty before setting it to another tty. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5493 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 5 +++++ src/appl/bsd/krlogind.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 2f51ddfce..c3c7a50f3 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,4 +1,9 @@ +Wed Apr 26 07:19:18 1995 Chris Provenzano (proven@mit.edu) + + * krlogind.c (doit()) : If TIOCOTTY is defined unset the + controlling tty before setting it to another tty. + Tue Apr 25 21:23:28 1995 Chris Provenzano (proven@mit.edu) * forward.c (rd_and_store_for_creds()) : Rewritten to use diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index 29a1b39ca..9c1c70eb0 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -602,6 +602,17 @@ void doit(f, fromp) } #endif /* VHANG_FIRST */ +#ifdef TIOCNOTTY + { + int con_fd; + /* Void tty association first */ + if ((con_fd = open("/dev/tty", O_RDWR)) >= 0) { + ioctl(con_fd, TIOCNOTTY, 0); + close(con_fd); + } + } +#endif + #ifdef HAVE_SETSID (void) setsid(); #endif -- 2.26.2