summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-02-10 20:08:25 +0000
committerbde <bde@FreeBSD.org>1995-02-10 20:08:25 +0000
commitb05d6b2adca31b4fe6a2e29416dfa7a2bbbb7dfe (patch)
treee3bba650bc63132e6ec9020ebc915a7af1f8eae3 /etc
parent24a94d2bcd8805747d649e003a2a9a18ffca1504 (diff)
downloadFreeBSD-src-b05d6b2adca31b4fe6a2e29416dfa7a2bbbb7dfe.zip
FreeBSD-src-b05d6b2adca31b4fe6a2e29416dfa7a2bbbb7dfe.tar.gz
Add chowns for pty's, ttyv's and ttyd's. Correct the chown for lptctl's.
The group was wrong if MAKEDEV was run in a directory with group other than wheel. This may have messed up the group in recent SNAPs (sysinstall/obj should have group bin). Reset the umask to 77 after running MAKEDEV.local. Some cases depend on the 77 default. MAKEDEV.local and all cases should probably set the umask explictly and not depend on a default. Most cases already set it.
Diffstat (limited to 'etc')
-rw-r--r--etc/MAKEDEV30
-rw-r--r--etc/etc.i386/MAKEDEV30
2 files changed, 38 insertions, 22 deletions
diff --git a/etc/MAKEDEV b/etc/MAKEDEV
index 33c9205..2032aad 100644
--- a/etc/MAKEDEV
+++ b/etc/MAKEDEV
@@ -76,7 +76,7 @@
# tun Tunneling IP device
# spigot Video Spigot video aquisition card
#
-# $Id: MAKEDEV,v 1.65 1995/02/07 12:07:18 jkh Exp $
+# $Id: MAKEDEV,v 1.66 1995/02/09 11:10:02 jkh Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:
@@ -410,13 +410,18 @@ pty*)
0|1|2|3|4|5|6|7)
umask 0
eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \
- for (i = 0; i < 32; i++) { \
+ for (i = 0; i < 32; i++) {
c = substr("0123456789abcdefghijklmnopqrstuv", i + 1, 1); \
- printf("rm -f tty%s%s; mknod tty%s%s c 5 %d; \
- rm -f pty%s%s; mknod pty%s%s c 6 %d; ", \
- n, c, n, c, b+i, n, c, n, c, b+i); \
- } \
- }'`
+ printf("rm -f tty%s%s pty%s%s; \
+ mknod tty%s%s c 5 %d; \
+ mknod pty%s%s c 6 %d; \
+ chown root.wheel tty%s%s pty%s%s;", \
+ n, c, n, c, \
+ n, c, b+i, \
+ n, c, b+i, \
+ n, c, n, c); \
+ } \
+ }'`
umask 77
;;
esac
@@ -512,7 +517,7 @@ lpt*)
mknod lpt$unit c 16 $unit
mknod lpctl$unit c 16 `expr $unit + 128`
chown root.wheel lpt$unit
- chown root.wheel lpt$unit
+ chown root.wheel lpctl$unit
;;
tw*)
@@ -530,8 +535,9 @@ vty*)
units=`expr $i : 'vty\(.*\)'`
eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
for (i = 0; i < n; i++)
- printf("rm -f ttyv%01x; mknod ttyv%01x c %d %d;", \
- i, i, c, i); }'`
+ printf("rm -f ttyv%01x; mknod ttyv%01x c %d %d; \
+ chown root.wheel ttyv%01x;", \
+ i, i, c, i, i); }'`
ln -fs ttyv0 vga # XXX X still needs this pccons relic
;;
@@ -567,6 +573,7 @@ ttyd?|tty?)
mknod ttyd$unit c 28 $m
mknod ttyid$unit c 28 `expr $m + 32`
mknod ttyld$unit c 28 `expr $m + 64`
+ chown root.wheel tty*d$unit
;;
mse*)
@@ -716,8 +723,9 @@ tun?)
;;
local)
- umask 0
+ umask 0 # XXX should be elsewhere
sh MAKEDEV.local
+ umask 77
;;
*)
diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV
index 33c9205..2032aad 100644
--- a/etc/etc.i386/MAKEDEV
+++ b/etc/etc.i386/MAKEDEV
@@ -76,7 +76,7 @@
# tun Tunneling IP device
# spigot Video Spigot video aquisition card
#
-# $Id: MAKEDEV,v 1.65 1995/02/07 12:07:18 jkh Exp $
+# $Id: MAKEDEV,v 1.66 1995/02/09 11:10:02 jkh Exp $
#
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:
@@ -410,13 +410,18 @@ pty*)
0|1|2|3|4|5|6|7)
umask 0
eval `echo $offset $name | awk ' { b=$1; n=$2 } END { \
- for (i = 0; i < 32; i++) { \
+ for (i = 0; i < 32; i++) {
c = substr("0123456789abcdefghijklmnopqrstuv", i + 1, 1); \
- printf("rm -f tty%s%s; mknod tty%s%s c 5 %d; \
- rm -f pty%s%s; mknod pty%s%s c 6 %d; ", \
- n, c, n, c, b+i, n, c, n, c, b+i); \
- } \
- }'`
+ printf("rm -f tty%s%s pty%s%s; \
+ mknod tty%s%s c 5 %d; \
+ mknod pty%s%s c 6 %d; \
+ chown root.wheel tty%s%s pty%s%s;", \
+ n, c, n, c, \
+ n, c, b+i, \
+ n, c, b+i, \
+ n, c, n, c); \
+ } \
+ }'`
umask 77
;;
esac
@@ -512,7 +517,7 @@ lpt*)
mknod lpt$unit c 16 $unit
mknod lpctl$unit c 16 `expr $unit + 128`
chown root.wheel lpt$unit
- chown root.wheel lpt$unit
+ chown root.wheel lpctl$unit
;;
tw*)
@@ -530,8 +535,9 @@ vty*)
units=`expr $i : 'vty\(.*\)'`
eval `echo ${chr} ${units} | awk ' { c=$1; n=$2 } END {
for (i = 0; i < n; i++)
- printf("rm -f ttyv%01x; mknod ttyv%01x c %d %d;", \
- i, i, c, i); }'`
+ printf("rm -f ttyv%01x; mknod ttyv%01x c %d %d; \
+ chown root.wheel ttyv%01x;", \
+ i, i, c, i, i); }'`
ln -fs ttyv0 vga # XXX X still needs this pccons relic
;;
@@ -567,6 +573,7 @@ ttyd?|tty?)
mknod ttyd$unit c 28 $m
mknod ttyid$unit c 28 `expr $m + 32`
mknod ttyld$unit c 28 `expr $m + 64`
+ chown root.wheel tty*d$unit
;;
mse*)
@@ -716,8 +723,9 @@ tun?)
;;
local)
- umask 0
+ umask 0 # XXX should be elsewhere
sh MAKEDEV.local
+ umask 77
;;
*)
OpenPOWER on IntegriCloud