Section chmodIsSecure.
StartPSS.
inversion H.
unfold SecureState in |- *.
BreakSS.
split.
unfold DACSecureState in |- *.
simpl in |- *.
intros.
elim (OBJeq_dec o o0).
intro.
rewrite <- a.
cut (fsecmat (secmat s) o = None).
intro.
rewrite H6.
eauto.
unfold fsecmat in |- *.
auto.
intro.
cut
(match fsecmat (secmat s) o0 with
| Some y => set_In u0 (ActReaders y) -> PreDACRead s u0 o0
| None => True
end /\
match fsecmat (secmat s) o0 with
| Some y => set_In u0 (ActWriters y) -> PreDACWrite s u0 o0
| None => True
end).
elim (fsecmat (secmat s) o0).
unfold PreDACRead, PreDACWrite, chmod_acl in |- *.
simpl in |- *.
elim (facl (acl s) o).
intro.
replace
(facl
(set_add ACLeq_dec
(o,
acldata (owner a) (group a)
(ChangeUserR Sub (UsersReaders a) (ownerp perms))
(ChangeGroupR (AllGrp s) (groupp perms)
(ChangeGroupR (group a) (groupp perms) (GroupReaders a)))
(ChangeUserW Sub (UsersWriters a) (ownerp perms))
(ChangeGroupW (AllGrp s) (groupp perms)
(ChangeGroupW (group a) (groupp perms) (GroupWriters a)))
(UsersOwners a) (GroupOwners a))
(set_remove ACLeq_dec (o, a) (acl s))) o0) with
(facl (acl s) o0).
elim (facl (acl s) o0).
auto.
auto.
unfold facl in |- *.
auto.
auto.
tauto.
split.
apply ReadWriteImpRead.
auto.
apply ReadWriteImpWrite.
auto.
auto.
Qed.
StartPSP.
inversion H; auto.
Qed.

Lemma ChmodPCP : forall s t : SFSstate, PreservesControlProp s Chmod t.