Desktop apps interoperability

Stephen Smalley sds at tycho.nsa.gov
Mon Mar 28 19:46:06 UTC 2005


On Mon, 2005-03-28 at 20:54 +0100, Luke Kenneth Casson Leighton wrote:
>  ... there's nothing special needed? ... 
>  
>  oh - yes, i get it.  create filetype.
>  nothing to do with file_type_auto_trans itself.

file_type_auto_trans() is a macro that expands to file_type_trans() and
a type_transition rule specifying the default type for the new files.
file_type_trans() is a macro that expands to the set of allow rules
needed for the domain to create the file (including appropriate
permissions to the parent directory as well as to the file).  The allow
rules are always needed for such a file creation to occur.  The
type_transition rule specifies a default in the absence of anything
specified by the program via setfscreatecon(3).  The ability to use
setfscreatecon(3) does require that the domain have one additional
permission, setfscreate, but the permission checks governing the actual
file creation are the same.

This is a general principle in SELinux; the same set of permission
checks are applied for operations regardless of whether the type was
application-specified or a default value, so that you can always
determine what is permissible via the allow rules.  The same is true of
exec transitions for processes.  The set of permission checks doesn't
change; only the types involved change.
 
-- 
Stephen Smalley <sds at tycho.nsa.gov>
National Security Agency




More information about the fedora-selinux-list mailing list