#!/bin/sh

genacl="read:source read read:staff read adm:source la write:sipb all"
public="$genacl system:anyuser read"
fascist="$genacl system:anyuser l"
auth="$genacl system:anyuser l system:authuser read"

attach -h -n -q gnu
`athdir /mit/gnu bin`/gfind . -noleaf \
	-path ./athena/bin/lpr -prune -o \
	-path ./athena/bin/quota -prune -o \
	-path ./athena/bin/write -prune -o \
	-path ./athena/bin/voldump -prune -o \
	-path ./athena/etc/synctree -prune -o \
	-path ./athena/etc/snmp -prune -o \
	-path ./third/motif -prune -o \
	-path ./third/mwm -prune -o \
	-path ./third/transcript -prune -o \
	-type d -print | xargs fs sa -acl $public -clear -dir

find athena/bin/lpr -type d -print | xargs fs sa -acl $fascist -clear -dir
find athena/bin/quota -type d -print | xargs fs sa -acl $fascist -clear -dir
find athena/bin/write -type d -print | xargs fs sa -acl $fascist -clear -dir
find athena/bin/voldump -type d -print | xargs fs sa -acl $fascist -clear -dir
find athena/etc/synctree -type d -print | xargs fs sa -acl $auth -clear -dir
find athena/etc/snmp -type d -print | xargs fs sa -acl $auth -clear -dir
find third/motif -type d -print | xargs fs sa -acl $fascist -clear -dir
find third/mwm -type d -print | xargs fs sa -acl $fascist -clear -dir
find third/transcript -type d -print | xargs fs sa -acl $fascist -clear -dir
