diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2016-04-28 04:48:57 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2016-04-28 04:48:57 +0000 |
commit | 8f9ab7d32481a83efaf5b210df49b79f93a2bea9 (patch) | |
tree | f9a5aa5e903ad17b2788085fb97e869e98c2e608 | |
parent | 20b313652b9a2a39c44e5fd14f3202c88fa2a0e9 (diff) |
set progname to doas so users can't create bizarro fake logs
-rw-r--r-- | usr.bin/doas/doas.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/doas/doas.c b/usr.bin/doas/doas.c index a0ab4c6e02c..662ae883ea4 100644 --- a/usr.bin/doas/doas.c +++ b/usr.bin/doas/doas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.c,v 1.51 2016/02/15 19:56:11 martijn Exp $ */ +/* $OpenBSD: doas.c,v 1.52 2016/04/28 04:48:56 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst <tedu@openbsd.org> * @@ -326,6 +326,8 @@ main(int argc, char **argv, char **envp) const char *cwd; char *login_style = NULL; + setprogname("doas"); + if (pledge("stdio rpath getpw tty proc exec id", NULL) == -1) err(1, "pledge"); |