Library FSSecModel.write

Require Export DACandMAC.

Set Strict Implicit.
Unset Implicit Arguments.

Section Write.

Variable s : SFSstate.



Let t (o : OBJECT) (n : nat) (buf : FILECONT) : SFSstate :=
  mkSFS (groups s) (primaryGrp s) (subjectSC s) (AllGrp s)
    (RootGrp s) (SecAdmGrp s) (objectSC s) (acl s)
    (secmat s) (write_files o n buf) (directories s).



Inductive write (u : SUBJECT) (o : OBJECT) (n : nat)
(buf : FILECONT) : SFSstateProp :=
    WriteOK :
      ObjType o = File
      match fsecmat (secmat s) o with
      | NoneFalse
      | Some yset_In u (ActWriters y)
      endwrite u o n buf (t o n buf).

End Write.