summaryrefslogtreecommitdiffstats
path: root/etc/MAKEDEV
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-01-03 11:53:52 +0000
committerjkh <jkh@FreeBSD.org>1998-01-03 11:53:52 +0000
commit2b0bc076dfff8a231d88603becbe912a4c437899 (patch)
tree0571e545f06d43183608166dadf9902e998087ba /etc/MAKEDEV
parent7ab71c4b6f42861870c6eed517fd7d7e2caa461b (diff)
downloadFreeBSD-src-2b0bc076dfff8a231d88603becbe912a4c437899.zip
FreeBSD-src-2b0bc076dfff8a231d88603becbe912a4c437899.tar.gz
strengthen mknod().
Submitted by: bde
Diffstat (limited to 'etc/MAKEDEV')
-rw-r--r--etc/MAKEDEV8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/MAKEDEV b/etc/MAKEDEV
index e919b9a..1da8fd9 100644
--- a/etc/MAKEDEV
+++ b/etc/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.
OpenPOWER on IntegriCloud