diff options
author | jkh <jkh@FreeBSD.org> | 1998-01-03 11:53:52 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1998-01-03 11:53:52 +0000 |
commit | 2b0bc076dfff8a231d88603becbe912a4c437899 (patch) | |
tree | 0571e545f06d43183608166dadf9902e998087ba /etc/etc.i386 | |
parent | 7ab71c4b6f42861870c6eed517fd7d7e2caa461b (diff) | |
download | FreeBSD-src-2b0bc076dfff8a231d88603becbe912a4c437899.zip FreeBSD-src-2b0bc076dfff8a231d88603becbe912a4c437899.tar.gz |
strengthen mknod().
Submitted by: bde
Diffstat (limited to 'etc/etc.i386')
-rw-r--r-- | etc/etc.i386/MAKEDEV | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/etc.i386/MAKEDEV b/etc/etc.i386/MAKEDEV index e919b9a..1da8fd9 100644 --- a/etc/etc.i386/MAKEDEV +++ b/etc/etc.i386/MAKEDEV @@ -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. |