aboutsummaryrefslogtreecommitdiff
path: root/sbin/quotacheck
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-07-20 08:50:54 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-07-20 08:50:54 +0000
commitbb7c1ea0a0d7e4a0b26fe85fecfcbc498f89e18d (patch)
tree0e9469c458c5907bab1a9b3cee3bf1e875e9fdec /sbin/quotacheck
parent9df36b4d0dbf7248372f310354bcd2c941965117 (diff)
downloadsrc-bb7c1ea0a0d7e4a0b26fe85fecfcbc498f89e18d.tar.gz
src-bb7c1ea0a0d7e4a0b26fe85fecfcbc498f89e18d.zip
Also check against chardevs when looking for root.
Notes
Notes: svn path=/head/; revision=48935
Diffstat (limited to 'sbin/quotacheck')
-rw-r--r--sbin/quotacheck/preen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/quotacheck/preen.c b/sbin/quotacheck/preen.c
index cc8bba6e1e66..ffae2c6de395 100644
--- a/sbin/quotacheck/preen.c
+++ b/sbin/quotacheck/preen.c
@@ -36,7 +36,7 @@
static const char sccsid[] = "@(#)preen.c 8.5 (Berkeley) 4/28/95";
#endif
static const char rcsid[] =
- "$Id: preen.c,v 1.9 1998/06/15 07:07:20 charnier Exp $";
+ "$Id: preen.c,v 1.11 1998/12/03 02:41:11 julian Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -320,6 +320,8 @@ retry:
return (origname);
}
if ((stchar.st_mode & S_IFMT) == S_IFCHR) {
+ if (stslash.st_dev == stchar.st_rdev)
+ hotroot++;
return (raw);
} else {
printf("%s is not a character device\n", raw);