commit 857824fb08e3e7fdd5124342ba606305d2428d59
parent ced3092a89e7f01a034963804f6371f3da7a5007
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Thu, 31 Dec 2020 04:14:32 +0100
Fix check whether user is in "wheel" group before allowing root terminal for them.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/logincaps b/sbin/logincaps
@@ -68,7 +68,7 @@ check_wheel() {
local wheel_gid
wheel_gid=${${(s.:.)"$(getent group wheel)"}[3]} || return $?
[[ $wheel_gid == [1-9]* ]] || return 1
- WHEEL_GID=$wheel_gid s6-envuidgid ccx zsh -c 'echo ${${(s/,/)GIDLIST}[(I)$WHEEL_GID]}'
+ WHEEL_GID=$wheel_gid s6-envuidgid ccx zsh -c '(( ${${(s/,/)GIDLIST}[(I)$WHEEL_GID]} ))'
return $?
}
typeset -f -t check_wheel