summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl/ldomctl.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-11-28 11:17:24 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-11-28 11:17:24 +0000
commit6162feb2359918bf64d899c8cab4f2cc669f88d2 (patch)
tree92bf1f42723e0dc98aba8166dc10dd7e9fc87137 /usr.sbin/ldomctl/ldomctl.c
parentfdecf859371372ee0af0224891385c055068e20c (diff)
Prevent people from shooting themselves in the foot by not allowing them to
delete the factory-default configuration.
Diffstat (limited to 'usr.sbin/ldomctl/ldomctl.c')
-rw-r--r--usr.sbin/ldomctl/ldomctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ldomctl/ldomctl.c b/usr.sbin/ldomctl/ldomctl.c
index cb45d5688a9..d6cbf172d30 100644
--- a/usr.sbin/ldomctl/ldomctl.c
+++ b/usr.sbin/ldomctl/ldomctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldomctl.c,v 1.17 2012/11/24 17:04:03 kettenis Exp $ */
+/* $OpenBSD: ldomctl.c,v 1.18 2012/11/28 11:17:23 kettenis Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -319,6 +319,9 @@ delete(int argc, char **argv)
if (argc < 2)
usage();
+ if (strcmp(argv[1], "factory-default") == 0)
+ errx(1, "\"%s\" should not be deleted", argv[1]);
+
dc = ds_conn_open("/dev/spds", NULL);
ds_conn_register_service(dc, &mdstore_service);
while (TAILQ_EMPTY(&mdstore_sets))