summaryrefslogtreecommitdiff
path: root/sbin/fsck/fsck.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2010-11-17 11:22:43 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2010-11-17 11:22:43 +0000
commitac325431e0db0503afe9fd3418173ca432ee3c57 (patch)
tree24e1f83a44338e2f341bcffe678c6c41e9eea6ec /sbin/fsck/fsck.c
parent44ba07ebbcf9a9a7d37968605cf98455cc41547d (diff)
Try to determine file system type using readlabelfs(3) if fsck is given
a disklabel UID.
Diffstat (limited to 'sbin/fsck/fsck.c')
-rw-r--r--sbin/fsck/fsck.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c
index cbcff026c32..ed02336d9ce 100644
--- a/sbin/fsck/fsck.c
+++ b/sbin/fsck/fsck.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fsck.c,v 1.27 2009/10/27 23:59:32 deraadt Exp $ */
+/* $OpenBSD: fsck.c,v 1.28 2010/11/17 11:22:42 jsing Exp $ */
/* $NetBSD: fsck.c,v 1.7 1996/10/03 20:06:30 christos Exp $ */
/*
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
for (; argc--; argv++) {
char *spec, *type;
- if (strncmp(*argv, "/dev/", 5) == 0 &&
+ if ((strncmp(*argv, "/dev/", 5) == 0 || isduid(*argv, 0)) &&
(type = readlabelfs(*argv, 0))) {
spec = *argv;
} else if ((fs = getfsfile(*argv)) == NULL &&