opendoas

A portable version of the OpenBSD `doas` command
git clone https://pi.duncano.de/git/opendoas.git
Log | Files | Refs | README | LICENSE

commit 5c60366f659313e46a5b22ad27f50a3ba3ab8f15
parent 60a2fcc332e2fb69e2c76a2eb9541c0947ca3ca3
Author: Nathan Holstein <nathan.holstein@gmail.com>
Date:   Wed,  5 Aug 2015 11:01:36 -0400

Merge doas.c 1.34 from OpenBSD CVS.

Diffstat:
doas.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doas.c b/doas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.c,v 1.32 2015/07/29 00:00:31 tedu Exp $ */ +/* $OpenBSD: doas.c,v 1.33 2015/07/30 17:04:33 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org> * @@ -332,6 +332,7 @@ main(int argc, char **argv, char **envp) int nflag = 0; uid = getuid(); + while ((ch = getopt(argc, argv, "C:nsu:")) != -1) { switch (ch) { case 'C': @@ -361,7 +362,6 @@ main(int argc, char **argv, char **envp) } else if ((!sflag && !argc) || (sflag && argc)) usage(); - uid = getuid(); pw = getpwuid(uid); if (!pw) err(1, "getpwuid failed");