config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit 5163f48994f2b2500fa0d4d6e90779b346a1aecc
parent fbd344306f8f94a2ad4360103974fe53a2f4da99
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Wed, 25 Nov 2020 10:35:48 -0800

Fix doasroot shell function

In the previous version if the password was miss typed the command would
still be run.

Diffstat:
Mmodules/shell/.config/shell/main | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/modules/shell/.config/shell/main b/modules/shell/.config/shell/main @@ -16,7 +16,13 @@ include() { alias doas="doas -- " # only invoke doas if uid is not 0, define before including openbsd. -doasroot() { test `id -u` -ne 0 && doas $* || $*; } +doasroot() { + if test `id -u` -ne 0; then + doas $* + else + $* + fi +} # Must be included here for ncpu. include openbsd