[Bug 191763] New: FreeBSD-EN-14:09.jail kind of breaks /etc/rc & /etc/rc.shutdown

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jul 9 10:20:45 UTC 2014


            Bug ID: 191763
           Summary: FreeBSD-EN-14:09.jail kind of breaks /etc/rc &
           Product: Base System
           Version: 8.4-RELEASE
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: gemini at geminix.org

Created attachment 144537
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144537&action=edit
"stty" fix for /etc/rc and /etc/rc.shutdown

The errata patch FreeBSD-EN-14:09.jail changes the semantics of the jails
started from /etc/rc.d/jail in that stdin is now redirected to /dev/null. Which
is the correct thing to do in my eyes in order to detach the jail from the
host's console.

However, in /etc/rc and /etc/rc.shutdown there is an unconditional use of the
"stty" command, which requires a tty on stdin. In pre-jail times it probably
was okay to rely on always having a tty available in the context these scripts
were executed. But with the advent of jails this can no longer be relied on. As
a result, the first line in each jail's console log since said errata patch is:

  stty: stdin isn't a terminal

In my opinion it is good practice to run "stty" only on condition that there is
a tty on stdin. The "-t" test option can be used for that. So please find
attached two very simple patches for the two files that fix the problem

Perhaps this issue can become another errata entry to be released together with
the next security patches, that is, when you need to increment the patch level

Best regards,


You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list