Hello community, here is the log from the commit of package mingetty for openSUSE:Factory checked in at Thu Dec 4 13:10:00 CET 2008. -------- --- mingetty/mingetty.changes 2008-12-04 12:26:53.000000000 +0100 +++ /mounts/work_src_done/STABLE/mingetty/mingetty.changes 2008-12-04 13:03:07.996486000 +0100 @@ -1,0 +2,5 @@ +Thu Dec 4 13:02:39 CET 2008 - werner@suse.de + +- Do open the terminal with O_NOCTTY (bnc#447289) + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mingetty.spec ++++++ --- /var/tmp/diff_new_pack.Ui7358/_old 2008-12-04 13:09:50.000000000 +0100 +++ /var/tmp/diff_new_pack.Ui7358/_new 2008-12-04 13:09:50.000000000 +0100 @@ -23,7 +23,7 @@ Group: System/Base AutoReqProv: on Version: 1.0.7s -Release: 91 +Release: 92 Summary: Minimal Getty for Virtual Consoles Only Provides: sysvinit:/sbin/mingetty BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -68,6 +68,8 @@ %changelog * Thu Dec 04 2008 werner@suse.de +- Do open the terminal with O_NOCTTY (bnc#447289) +* Thu Dec 04 2008 werner@suse.de - Get the controlling tty only if we do not have it (bnc#447289) * Mon Jul 21 2008 werner@suse.de - Use the enlarged buffer of last change ++++++ mingetty-1.0.7s-ctty.dif ++++++ --- /var/tmp/diff_new_pack.Ui7358/_old 2008-12-04 13:09:50.000000000 +0100 +++ /var/tmp/diff_new_pack.Ui7358/_new 2008-12-04 13:09:50.000000000 +0100 @@ -1,5 +1,5 @@ --- mingetty.c -+++ mingetty.c 2008-12-04 12:13:33.770687095 +0100 ++++ mingetty.c 2008-12-04 12:48:40.618608756 +0100 @@ -301,6 +301,7 @@ static void open_tty (void) sigset_t set; char buf[PATH_MAX+1]; @@ -8,7 +8,7 @@ gid_t gid = 0; struct group *gr = NULL; -@@ -328,32 +329,41 @@ static void open_tty (void) +@@ -328,32 +329,40 @@ static void open_tty (void) sa.sa_handler = sigquit_handler; sigaction (SIGQUIT, &sa, NULL); @@ -18,16 +18,16 @@ - tty to sane defaults, so we don't have to modify the tty device - for sane settings. We also get a SIGHUP/SIGCONT. - */ - if ((fd = open (buf, O_RDWR, 0)) < 0) +- if ((fd = open (buf, O_RDWR, 0)) < 0) ++ if ((fd = open (buf, O_RDWR|O_NOCTTY, 0)) < 0) error ("%s: cannot open tty: %s", buf, strerror(errno)); if (!isatty (fd)) error ("%s: not a tty", buf); - + if (((tid = tcgetsid(fd)) < 0) || (pid != tid)) { + if (ioctl (fd, TIOCSCTTY, 1) == -1) + error ("%s: cannot get controlling tty: %s", buf, strerror(errno)); + } -+ + if (nohangup == 0) { + /* vhangup() will replace all open file descriptors in the kernel + that point to our controlling tty by a dummy that will deny @@ -46,6 +46,7 @@ + (void)ioctl (fd, TIOCNOTTY); } +- if ((fd = open (buf, O_RDWR, 0)) < 0) + /* Get rid of the present stdout/stderr. */ + close (2); + close (1); @@ -53,11 +54,11 @@ + if (fd > 2) + close (fd); + - if ((fd = open (buf, O_RDWR, 0)) < 0) ++ if ((fd = open (buf, O_RDWR|O_NOCTTY, 0)) < 0) error ("%s: cannot open tty: %s", buf, strerror(errno)); - if (ioctl (fd, TIOCSCTTY, (void *)1) == -1) - error ("%s: cannot get controlling tty: %s", buf, strerror(errno)); -+ if ((nohangup == 0) && (((tid = tcgetsid(fd)) < 0) || (pid != tid))) { ++ if (((tid = tcgetsid(fd)) < 0) || (pid != tid)) { + if (ioctl (fd, TIOCSCTTY, 1) == -1) + error ("%s: cannot get controlling tty: %s", buf, strerror(errno)); + } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org