artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c05fbe6
)
If only displaying the disklabel (the normal thing to do against potentially
author
deraadt
<deraadt@openbsd.org>
Sun, 11 Oct 2015 04:36:22 +0000
(
04:36
+0000)
committer
deraadt
<deraadt@openbsd.org>
Sun, 11 Oct 2015 04:36:22 +0000
(
04:36
+0000)
unknown disks...), after opening & reading the disklabel, pledge "stdio"
ok doug
sbin/disklabel/disklabel.c
patch
|
blob
|
history
diff --git
a/sbin/disklabel/disklabel.c
b/sbin/disklabel/disklabel.c
index
b012c7a
..
0634bdc
100644
(file)
--- a/
sbin/disklabel/disklabel.c
+++ b/
sbin/disklabel/disklabel.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: disklabel.c,v 1.20
8 2015/10/05 12:49:58 krw Exp $
*/
+/* $OpenBSD: disklabel.c,v 1.20
9 2015/10/11 04:36:22 deraadt Exp $
*/
/*
* Copyright (c) 1987, 1993
@@
-244,6
+244,10
@@
main(int argc, char *argv[])
if (argc != 1)
usage();
readlabel(f);
+
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if (tflag)
makedisktab(stdout, &lab);
else