Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Provide a workaround for PR bin/12900.



details:   https://anonhg.NetBSD.org/src/rev/481c17d0a815
branches:  trunk
changeset: 555510:481c17d0a815
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Wed Nov 19 20:28:19 2003 +0000

description:
Provide a workaround for PR bin/12900.
When /dev is an fdesc, and /dev/tty is stat()ed without a controlling tty,
a "Device not configured" error is returned.

Filter mtree's stderr to ignore this error.

If fdesc is fixed to not behave in this fashion, this workaround can
be removed; bin/12900 should remain open until that time.

diffstat:

 etc/security |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 1349bac304be -r 481c17d0a815 etc/security
--- a/etc/security      Wed Nov 19 19:41:57 2003 +0000
+++ b/etc/security      Wed Nov 19 20:28:19 2003 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: security,v 1.86 2003/11/18 03:30:40 jhawk Exp $
+#      $NetBSD: security,v 1.87 2003/11/19 20:28:19 jhawk Exp $
 #      from: @(#)security      8.1 (Berkeley) 6/9/93
 #
 
@@ -757,7 +757,8 @@
        for file in $special_files; do
                [ ! -s $file ] && continue
                mtree -e -l -p / $check_mtree_flags -f $file
-       done > $OUTPUT
+       done 3>&1 >$OUTPUT 2>&3 |
+               grep -v '^mtree: dev/tty: Device not configured$' >&2
        if [ -s $OUTPUT ]; then
                printf "\nChecking special files and directories.\n"
                cat $OUTPUT



Home | Main Index | Thread Index | Old Index