diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2017-03-23 12:58:29 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2017-03-23 12:58:29 +0000 |
commit | de20ac70f750d3df1ecd4ee78e7629a31aca0b7d (patch) | |
tree | da67f3bfd3aac3e2013a183916f7c9af5262b0e4 /usr.sbin/acme-client/main.c | |
parent | 39886a666c196552c67bed369fd1682b59957c20 (diff) |
pull root check up, the parser will bomb out anyway
OK benno
Diffstat (limited to 'usr.sbin/acme-client/main.c')
-rw-r--r-- | usr.sbin/acme-client/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/acme-client/main.c b/usr.sbin/acme-client/main.c index dde8e8b638e..f8dc22c8756 100644 --- a/usr.sbin/acme-client/main.c +++ b/usr.sbin/acme-client/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.33 2017/01/24 13:32:55 jsing Exp $ */ +/* $Id: main.c,v 1.34 2017/03/23 12:58:28 florian Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -85,6 +85,9 @@ main(int argc, char *argv[]) goto usage; } + if (getuid() != 0) + errx(EXIT_FAILURE, "must be run as root"); + /* parse config file */ if ((conf = parse_config(conffile, popts)) == NULL) exit(EXIT_FAILURE); @@ -100,9 +103,6 @@ main(int argc, char *argv[]) argc--; argv++; - if (getuid() != 0) - errx(EXIT_FAILURE, "must be run as root"); - if (domain->cert != NULL) { if ((certdir = dirname(domain->cert)) != NULL) { if ((certdir = strdup(certdir)) == NULL) |