strengthen mknod().
Submitted by: bde
This commit is contained in:
parent
8791c0511a
commit
432ce8f092
@ -106,7 +106,7 @@
|
||||
# perfmon CPU performance-monitoring counters
|
||||
# pci PCI configuration-space access from user mode
|
||||
#
|
||||
# $Id: MAKEDEV,v 1.146 1997/12/29 09:45:23 jkh Exp $
|
||||
# $Id: MAKEDEV,v 1.147 1998/01/02 22:16:15 jkh Exp $
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
|
||||
@ -147,11 +147,11 @@ dkminor()
|
||||
echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
|
||||
}
|
||||
|
||||
# call mknod with rm -f first.
|
||||
# Override mknod(2) to add extra handling to it.
|
||||
mknod() {
|
||||
rm -f "$1" || exit 1
|
||||
/sbin/mknod $* || die 2 "/sbin/mknod $* failed"
|
||||
chown root.wheel "$1"
|
||||
/sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
|
||||
chown root.wheel "$1" || exit 1
|
||||
}
|
||||
|
||||
# Convert the last character of a tty name to a minor number.
|
||||
|
@ -106,7 +106,7 @@
|
||||
# perfmon CPU performance-monitoring counters
|
||||
# pci PCI configuration-space access from user mode
|
||||
#
|
||||
# $Id: MAKEDEV,v 1.146 1997/12/29 09:45:23 jkh Exp $
|
||||
# $Id: MAKEDEV,v 1.147 1998/01/02 22:16:15 jkh Exp $
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin/:/usr/bin:/usr/sbin:$PATH
|
||||
@ -147,11 +147,11 @@ dkminor()
|
||||
echo $(($1 << 25 | ($2 / 32) << 21 | ($2 % 32) << 3 | $3 << 16 | $4))
|
||||
}
|
||||
|
||||
# call mknod with rm -f first.
|
||||
# Override mknod(2) to add extra handling to it.
|
||||
mknod() {
|
||||
rm -f "$1" || exit 1
|
||||
/sbin/mknod $* || die 2 "/sbin/mknod $* failed"
|
||||
chown root.wheel "$1"
|
||||
/sbin/mknod "$@" || die 2 "/sbin/mknod $@ failed"
|
||||
chown root.wheel "$1" || exit 1
|
||||
}
|
||||
|
||||
# Convert the last character of a tty name to a minor number.
|
||||
|
Loading…
Reference in New Issue
Block a user