The CDS Framework Toolkit dictionary is the means in which the framework policy is translated into the SELinux policy. Each of the resource definitions that can be assigned to a domain or a shared resource are defined here. Within the graphical policy, a read is indicated with an arrow from a resource to a domain and a write is indicated with an arrow from a domain to a resource. Readwrite is indicated with a double headed arrow between the resource and the domain. Readwrite indicates that a the domain can write to a the resource and read from that same resource. The dictionary will translate this graphical notation into the appropriate SELinux policy.
Included in every resource definition are the following:
Below is some sample code from the dictionary for the resource definition, “unnamedUnixSockets”:
Lines 1 - 2 give the keyword, rdef, the name of the resource definition and a brief description.
Lines 4 – 10 give the owner permissions. If there are permissions other than self permissions, the structure would be much like the self permissions except with the keyword resource in the place of self. (Line 14 shows the start of a resource block)
Lines 11 – 21 give information pertaining to the verb read. This refers to the type of access read. The default name and accompanying permissions that are confined within the resource block are given here.
Lines 22 – 37 give information pertaining to the verb write. An additional permission here is create. To translate, if an arrow is drawn graphically from a domain to a resource, this indicates a write. The dictionary will translate this write permission for unixStreamSockets into the permissions within the policy given above. In other words, the write permission will be translated into the write and create permissions given within their associated resource blocks.
Lines 38 – 46 give information pertaining to the verb new. The new verb is generally used when creating types at runtime. The transition keyword is used to denote which objects should be given type transition rules.
Lines 14, 25, 32 and 39 show the backflow levels for each access definition.
©2005 - 2009 Tresys Technology, LLC