trunk: add oident from dominick grift.

This commit is contained in:
Chris PeBenito 2008-10-06 14:01:59 +00:00
parent 6d8af27cad
commit 73edbc9101
4 changed files with 169 additions and 0 deletions

View File

@ -14,6 +14,7 @@
named pipe. Updated init_telinit() to match. named pipe. Updated init_telinit() to match.
- Added modules: - Added modules:
cyphesis (Dan Walsh) cyphesis (Dan Walsh)
oident (Dominick Grift)
w3c (Dan Walsh) w3c (Dan Walsh)
* Wed Jul 02 2008 Chris PeBenito <selinux@tresys.com> - 20080702 * Wed Jul 02 2008 Chris PeBenito <selinux@tresys.com> - 20080702

View File

@ -0,0 +1,10 @@
HOME_DIR/\.oidentd.conf gen_context(system_u:object_r:ROLE_oidentd_home_t, s0)
/etc/oidentd\.conf -- gen_context(system_u:object_r:oidentd_config_t, s0)
/etc/oidentd_masq\.conf -- gen_context(system_u:object_r:oidentd_config_t, s0)
/etc/rc\.d/init\.d/oidentd -- gen_context(system_u:object_r:oidentd_initrc_exec_t, s0)
/usr/sbin/oidentd -- gen_context(system_u:object_r:oidentd_exec_t, s0)

View File

@ -0,0 +1,85 @@
## <summary>SELinux policy for Oident daemon.</summary>
## <desc>
## <p>
## Oident daemon is a server that implements the TCP/IP
## standard IDENT user identification protocol as
## specified in the RFC 1413 document.
## </p>
## </desc>
#######################################
## <summary>
## The per role template for the Oidentd module.
## </summary>
## <desc>
## <p>
## This template creates derived domains which are used
## for Oident daemon.
## </p>
## <p>
## This template is invoked automatically for each user, and
## generally does not need to be invoked directly
## by policy writers.
## </p>
## </desc>
## <param name="userdomain_prefix">
## <summary>
## The prefix of the user domain (e.g., user
## is the prefix for user_t).
## </summary>
## </param>
## <param name="user_domain">
## <summary>
## The type of the user domain.
## </summary>
## </param>
## <param name="user_role">
## <summary>
## The role associated with the user domain.
## </summary>
## </param>
#
template(`oidentd_per_role_template', `
########################################
#
# Oident daemon shared declarations
#
gen_require(`
attribute oidentd_user_content_type;
')
type $1_oidentd_home_t, oidentd_user_content_type;
userdom_user_home_content($1, oidentd_$1_content_t)
typeattribute oidentd_$1_content_t oidentd_user_content_type;
########################################
#
# Oident daemon shared policy
#
allow $2 oidentd_$1_content_t:file manage_file_perms;
allow $2 oidentd_$1_content_t:file relabel_file_perms;
')
########################################
## <summary>
## Allow the specified domain to read
## Oidentd personal configuration files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`oidentd_read_all_user_content', `
gen_require(`
attribute oidentd_user_content_type;
')
allow $1 oidentd_user_content_type:file read_file_perms;
userdom_search_all_users_home_dirs($1)
')

View File

@ -0,0 +1,73 @@
policy_module(oident, 1.0.0)
########################################
#
# Oident daemon private declarations
#
attribute oidentd_user_content_type;
type oidentd_t;
type oidentd_exec_t;
init_daemon_domain(oidentd_t, oidentd_exec_t)
type oidentd_initrc_exec_t;
init_script_file(oidentd_initrc_exec_t)
type oidentd_config_t;
files_config_file(oidentd_config_t)
########################################
#
# Oident daemon private policy
#
allow oidentd_t self:capability { setuid setgid };
allow oidentd_t self:netlink_route_socket { write getattr read bind create nlmsg_read };
allow oidentd_t self:netlink_tcpdiag_socket { write read create nlmsg_read };
allow oidentd_t self:tcp_socket { setopt read bind create accept write getattr listen };
allow oidentd_t self:udp_socket { write read create connect getattr ioctl };
allow oidentd_t self:unix_dgram_socket { create connect };
allow oidentd_t oidentd_config_t:file read_file_perms;
corenet_all_recvfrom_unlabeled(oidentd_t)
corenet_all_recvfrom_netlabel(oidentd_t)
corenet_tcp_sendrecv_all_if(oidentd_t)
corenet_tcp_sendrecv_all_nodes(oidentd_t)
corenet_tcp_bind_all_nodes(oidentd_t)
corenet_tcp_bind_auth_port(oidentd_t)
corenet_sendrecv_auth_server_packets(oidentd_t)
files_read_etc_files(oidentd_t)
kernel_read_kernel_sysctls(oidentd_t)
kernel_read_network_state(oidentd_t)
kernel_read_network_state_symlinks(oidentd_t)
kernel_read_sysctl(oidentd_t)
libs_use_ld_so(oidentd_t)
libs_use_shared_libs(oidentd_t)
logging_send_syslog_msg(oidentd_t)
miscfiles_read_localization(oidentd_t)
sysnet_read_config(oidentd_t)
oidentd_read_all_user_content(oidentd_t)
optional_policy(`
nis_use_ypbind(oidentd_t)
')
tunable_policy(`use_samba_home_dirs', `
fs_list_cifs(oidentd_t)
fs_read_cifs_files(oidentd_t)
')
tunable_policy(`use_nfs_home_dirs', `
fs_list_nfs(oidentd_t)
fs_read_nfs_files(oidentd_t)
')