diff options
| author | 2012-11-28 11:17:23 +0000 | |
|---|---|---|
| committer | 2012-11-28 11:17:23 +0000 | |
| commit | 4948195d30a8d0e456865f00c426f9df8915400d (patch) | |
| tree | 8624f5001bb0fc9c1b1c3c350bc84951197963ef | |
| parent | Including ../../Makefile.inc was loop when npppd/obj is not a symbolic link. (diff) | |
| download | wireguard-openbsd-4948195d30a8d0e456865f00c426f9df8915400d.tar.xz wireguard-openbsd-4948195d30a8d0e456865f00c426f9df8915400d.zip | |
Prevent people from shooting themselves in the foot by not allowing them to
delete the factory-default configuration.
| -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)) |
