opendoas

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

commit 3511e7798c17a7f6c73825f09a39a26aeaaad17d
parent 8457259ddd14ed896b8cf2b69d85c4f567bde5ce
Author: Vadim Zhukov <zhuk@openbsd.org>
Date:   Sun, 26 Jul 2015 19:49:11 +0000

Oops, CVS mismerged changes, resulting in compilable and mostly working,
but somewhat wrong code. Well, the CVS mismerged but I just missed.

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

diff --git a/doas.c b/doas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.c,v 1.23 2015/07/26 19:08:17 zhuk Exp $ */ +/* $OpenBSD: doas.c,v 1.24 2015/07/26 19:14:46 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org> * @@ -379,9 +379,7 @@ main(int argc, char **argv, char **envp) parseconfig("/etc/doas.conf", 1); /* cmdline is used only for logging, no need to abort on truncate */ - (void) strlcpy(cmdline, argv[0], sizeof(cmdline)) < sizeof(cmdline); - if (strlcpy(cmdline, argv[0], sizeof(cmdline)) >= sizeof(cmdline)) - errx(1, "command line too long"); + (void) strlcpy(cmdline, argv[0], sizeof(cmdline)); for (i = 1; i < argc; i++) { if (strlcat(cmdline, " ", sizeof(cmdline)) >= sizeof(cmdline)) break;