# fss-0002
# This removes world permissions for most files on the system, unless they are known to require certain world bits set (namely, execute)

main:
  if [[ -d /bin/ ]] ; then find /bin/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /sbin/ ]] ; then find /sbin/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /lib/ ]] ; then find /lib/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /share/ ]] ; then find /share/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /toolchain/ ]] ; then find /toolchain/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /modules/ ]] ; then find /modules/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /firmware/ ]] ; then find /firmware/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /checksums/ ]] ; then find /checksums/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /mnt/ ]] ; then find /mnt/ -mindepth 1 -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /boot/grub/ ]] ; then find /boot/grub/ -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /boot/live/ ]] ; then find /boot/live/ -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /boot/memtest/ ]] ; then find /boot/memtest/  -exec chmod o-rx '{}' ';' ; fi
  if [[ -d /boot/settings/ ]] ; then find /boot/settings/  -exec chmod o-rx '{}' ';' ; fi
