diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-11-28 11:17:24 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-11-28 11:17:24 +0000 |
commit | 6162feb2359918bf64d899c8cab4f2cc669f88d2 (patch) | |
tree | 92bf1f42723e0dc98aba8166dc10dd7e9fc87137 /usr.sbin/ldomctl/ldomctl.c | |
parent | fdecf859371372ee0af0224891385c055068e20c (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.c | 5 |
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)) |