Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Jul 2014 10:20:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 191763] New: FreeBSD-EN-14:09.jail kind of breaks /etc/rc & /etc/rc.shutdown
Message-ID:  <bug-191763-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191763

            Bug ID: 191763
           Summary: FreeBSD-EN-14:09.jail kind of breaks /etc/rc &
                    /etc/rc.shutdown
           Product: Base System
           Version: 8.4-RELEASE
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: gemini@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
reported.

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
anyway.

Best regards,

   Uwe

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191763-8>