From 274a99c5842ee8ec864ce5fcb23fb267debf44d9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 17 Jul 2021 11:40:51 +0300 Subject: [PATCH] misc: nit --- kiss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kiss b/kiss index 95513d1..88d4964 100755 --- a/kiss +++ b/kiss @@ -1115,15 +1115,13 @@ pkg_swap() { } file_rwx() { - # Grab the octal permissions from 'ls -l' so that we can retain - # directory permissions and strip setuid/setgid if found. - rwx=$(ls -ld "$1") oct='' o=0 - # Convert the output of 'ls' (rwxrwx---) to octal. This is simply # a 1-9 loop with the second digit being the value of the field. # # NOTE: This drops setgid/setuid permissions and does not include # them in the conversion. This is intentional. + rwx=$(ls -ld "$1") oct='' o=0 + for c in 14 22 31 44 52 61 74 82 91; do rwx=${rwx#?}