entrypoint permission
Everyone,
What does the 'entrypoint' permission do? It seems to be related to
domains transfer and program execution, but not in an intuitive way.
Thanks,
Brad
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Brad Chapman
What does the 'entrypoint' permission do? It seems to be related to
domains transfer and program execution, but not in an intuitive way.From macros/global_macros.te:
# domain_trans(parent_domain, program_type, child_domain) #
# Permissions for transitioning to a new domain. #
define(domain_trans',
[...]
# Allow the new domain to be entered via the program. #
allow $3 $2:file entrypoint;
')
It allows a new domain (specified by $3 in this instance) to be entered by executing a file of type $2.
EG:
allow user_t shell_exec_t:file entrypoint;
The domain user_t can be entered by executing a file of type shell_exec_t (no great limitation). However some other domains are more restrictive, eg:
allow ntpd_t ntpd_exec_t:file entrypoint;ntpd_t can only be entered by executing the ntpd_exec_t files.
Signature · 3 lines
I do not get viruses because I do not use MS software. If you use Outlook then please do not put my email address in your address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line
From field.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 2 lines · Brad Chapman
What does the 'entrypoint' permission do? It seems to be related to
domains transfer and program execution, but not in an intuitive way.
As an aside, the meaning of each SELinux permission was originally described in the old technical report available from
http://www.nsa.gov/selinux/slinux-abs.html. Changes to the SELinux permissions for LSM are described in the module technical report available in selinux/doc/module or from http://www.nsa.gov/selinux/module-abs.html.
For the TE model, the entrypoint permission controls what program types can be executed to initially enter a given domain. It is typically granted via the domain_trans macro or domain_auto_trans macro, except for the special check performed by crond to deal with crontab files [since crontabs are "interpreted", not executed]. In the policy configuration, a distinct xxx_exec_t type is usually (but not always) defined for each domain and used as that domain's entrypoint type. This type should only be assigned to programs used to enter the domain, and should preferably be limited to a single program for each domain whenever possible. The entrypoint permission in combination with the process transition permission provides strong control over domain transitions based on the initial domain, the program type, and the new domain.
In contrast to entrypoint permission, the execute_no_trans permission controls what program types by a domain can be executed without transitioning to another domain. For example, although the login process can execute a user shell, it should always change its SID at the same time, so it does not need execute_no_trans permission to the shell program. The execute_no_trans permission is typically granted via the can_exec* macros. can_exec access for any kind of privileged domain should also be minimized when possible to reduce risk (e.g. it is preferable that daemons not be able to execute shells without at least changing to another domain).
The execute permission is checked whenever Linux would perform an execute check via the kernel permission() function, as well as in mmap or mprotect when execute access is requested (e.g. for shared libraries). This permission provides coarse-grained control over the full set of types that can be executed by a domain.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.