(filecon "/bin/hostname" file (system_u object_r hostname_exec_t (systemlow systemlow)))
(type hostname_t)
(roletype object_r hostname_t)
(type hostname_exec_t)
(roletype object_r hostname_exec_t)
(roleattributeset cil_gen_require system_r)
(roletype system_r hostname_t)
(typeattributeset cil_gen_require initrc_t)
(typeattributeset cil_gen_require application_domain_type)
(typeattributeset application_domain_type (hostname_t ))
(typeattributeset cil_gen_require domain)
(typeattributeset domain (hostname_t ))
(typeattributeset cil_gen_require init_t)
(typeattributeset cil_gen_require sysfs_t)
(typeattributeset cil_gen_require application_exec_type)
(typeattributeset application_exec_type (hostname_exec_t ))
(typeattributeset cil_gen_require exec_type)
(typeattributeset exec_type (hostname_exec_t ))
(typeattributeset cil_gen_require file_type)
(typeattributeset file_type (hostname_exec_t ))
(typeattributeset cil_gen_require non_security_file_type)
(typeattributeset non_security_file_type (hostname_exec_t ))
(typeattributeset cil_gen_require non_auth_file_type)
(typeattributeset non_auth_file_type (hostname_exec_t ))
(typeattributeset cil_gen_require entry_type)
(typeattributeset entry_type (hostname_exec_t ))
(typeattributeset cil_gen_require proc_t)
(typeattributeset cil_gen_require unlabeled_t)
(typeattributeset cil_gen_require device_t)
(typeattributeset cil_gen_require privfd)
(typeattributeset cil_gen_require etc_t)
(typeattributeset cil_gen_require var_t)
(typeattributeset cil_gen_require fs_t)
(typeattributeset cil_gen_require autofs_t)
(typeattributeset cil_gen_require tmpfs_t)
(typeattributeset cil_gen_require console_device_t)
(typeattributeset cil_gen_require ttynode)
(typeattributeset cil_gen_require ptynode)
(typeattributeset cil_gen_require devpts_t)
(typeattributeset cil_gen_require initrc_devpts_t)
(typeattributeset cil_gen_require syslogd_t)
(typeattributeset cil_gen_require syslogd_var_run_t)
(typeattributeset cil_gen_require devlog_t)
(typeattributeset cil_gen_require init_var_run_t)
(typeattributeset cil_gen_require var_run_t)
(typeattributeset cil_gen_require locale_t)
(typeattributeset cil_gen_require usr_t)
(typeattributeset cil_gen_require dhcpc_t)
(typeattributeset cil_gen_require net_conf_t)
(typeattributeset cil_gen_require netlabel_peer_t)
(typeattributeset cil_gen_require netif_t)
(typeattributeset cil_gen_require node_t)
(typeattributeset cil_gen_require dns_port_t)
(typeattributeset cil_gen_require dns_client_packet_t)
(allow hostname_t hostname_exec_t (file (entrypoint)))
(allow hostname_t hostname_exec_t (file (ioctl read getattr lock execute open)))
(allow initrc_t hostname_exec_t (file (read getattr execute open)))
(allow initrc_t hostname_t (process (transition)))
(dontaudit initrc_t hostname_t (process (noatsecure siginh rlimitinh)))
(typetransition initrc_t hostname_exec_t process hostname_t)
(allow hostname_t initrc_t (fd (use)))
(allow hostname_t initrc_t (fifo_file (ioctl read write getattr lock append open)))
(allow hostname_t initrc_t (process (sigchld)))
(allow hostname_t self (process (sigchld sigkill sigstop signull signal)))
(allow hostname_t self (capability (sys_admin)))
(allow hostname_t self (unix_stream_socket (ioctl read write create getattr setattr append bind connect listen accept getopt setopt shutdown)))
(dontaudit hostname_t self (capability (sys_tty_config)))
(allow hostname_t proc_t (dir (getattr search open)))
(allow hostname_t proc_t (dir (ioctl read getattr lock search open)))
(allow hostname_t proc_t (dir (getattr search open)))
(allow hostname_t proc_t (lnk_file (read getattr)))
(dontaudit hostname_t unlabeled_t (dir (getattr search open)))
(allow hostname_t sysfs_t (dir (getattr search open)))
(allow hostname_t sysfs_t (file (ioctl read getattr lock open)))
(allow hostname_t sysfs_t (dir (getattr search open)))
(allow hostname_t sysfs_t (lnk_file (read getattr)))
(allow hostname_t sysfs_t (dir (getattr search open)))
(allow hostname_t sysfs_t (dir (ioctl read getattr lock search open)))
(dontaudit hostname_t device_t (chr_file (ioctl read write getattr lock append open)))
(allow hostname_t privfd (fd (use)))
(allow hostname_t etc_t (dir (ioctl read getattr lock search open)))
(allow hostname_t etc_t (dir (getattr search open)))
(allow hostname_t etc_t (file (ioctl read getattr lock open)))
(allow hostname_t etc_t (dir (getattr search open)))
(allow hostname_t etc_t (lnk_file (read getattr)))
(dontaudit hostname_t var_t (dir (getattr search open)))
(allow hostname_t fs_t (filesystem (getattr)))
(allow hostname_t autofs_t (dir (getattr search open)))
(dontaudit hostname_t tmpfs_t (dir (ioctl read getattr lock search open)))
(dontaudit hostname_t tmpfs_t (chr_file (ioctl read write getattr lock append open)))
(dontaudit hostname_t console_device_t (chr_file (ioctl read write getattr lock append open)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (dir (ioctl read getattr lock search open)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (lnk_file (read getattr)))
(allow hostname_t ttynode (chr_file (ioctl read write getattr lock append open)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (dir (ioctl read getattr lock search open)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (lnk_file (read getattr)))
(allow hostname_t devpts_t (dir (ioctl read getattr lock search open)))
(allow hostname_t ptynode (chr_file (ioctl read write getattr lock append open)))
(allow hostname_t init_t (fd (use)))
(allow hostname_t initrc_t (fd (use)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (dir (ioctl read getattr lock search open)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (lnk_file (read getattr)))
(allow hostname_t devpts_t (dir (ioctl read getattr lock search open)))
(allow hostname_t initrc_devpts_t (chr_file (ioctl read write getattr lock append open)))
(allow hostname_t devlog_t (sock_file (write getattr append open)))
(allow hostname_t var_run_t (lnk_file (read getattr)))
(allow hostname_t var_t (dir (getattr search open)))
(allow hostname_t var_run_t (dir (getattr search open)))
(allow hostname_t init_var_run_t (dir (getattr search open)))
(allow hostname_t syslogd_var_run_t (dir (getattr search open)))
(allow hostname_t syslogd_t (unix_dgram_socket (sendto)))
(allow hostname_t syslogd_t (unix_stream_socket (connectto)))
(allow hostname_t self (unix_dgram_socket (ioctl read write create getattr setattr append bind connect getopt setopt shutdown)))
(allow hostname_t self (unix_stream_socket (ioctl read write create getattr setattr append bind connect getopt setopt shutdown)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (dir (ioctl read getattr lock search open)))
(allow hostname_t device_t (dir (getattr search open)))
(allow hostname_t device_t (lnk_file (read getattr)))
(allow hostname_t console_device_t (chr_file (ioctl write getattr lock append open)))
(dontaudit hostname_t console_device_t (chr_file (ioctl read getattr lock open)))
(allow hostname_t etc_t (dir (getattr search open)))
(allow hostname_t etc_t (lnk_file (read getattr)))
(allow hostname_t usr_t (dir (getattr search open)))
(allow hostname_t locale_t (dir (ioctl read getattr lock search open)))
(allow hostname_t locale_t (dir (getattr search open)))
(allow hostname_t locale_t (file (ioctl read getattr lock open)))
(allow hostname_t locale_t (dir (getattr search open)))
(allow hostname_t locale_t (lnk_file (read getattr)))
(dontaudit hostname_t dhcpc_t (udp_socket (read write)))
(dontaudit hostname_t dhcpc_t (unix_stream_socket (read write)))
(allow hostname_t etc_t (dir (getattr search open)))
(allow hostname_t net_conf_t (file (ioctl read getattr lock open)))
(allow hostname_t self (tcp_socket (ioctl read write create getattr setattr append bind connect getopt setopt shutdown)))
(allow hostname_t self (udp_socket (ioctl read write create getattr setattr append bind connect getopt setopt shutdown)))
(allow hostname_t self (netlink_route_socket (ioctl read write create getattr setattr append bind connect getopt setopt shutdown nlmsg_read)))
(allow hostname_t unlabeled_t (tcp_socket (recvfrom)))
(allow hostname_t unlabeled_t (udp_socket (recvfrom)))
(allow hostname_t unlabeled_t (rawip_socket (recvfrom)))
(allow hostname_t unlabeled_t (peer (recv)))
(allow hostname_t unlabeled_t (association (sendto recvfrom)))
(allow hostname_t netlabel_peer_t (peer (recv)))
(allow hostname_t netlabel_peer_t (tcp_socket (recvfrom)))
(allow hostname_t netlabel_peer_t (udp_socket (recvfrom)))
(allow hostname_t netlabel_peer_t (rawip_socket (recvfrom)))
(allow hostname_t netif_t (netif (tcp_recv tcp_send ingress egress)))
(allow hostname_t netif_t (netif (udp_send egress)))
(allow hostname_t netif_t (netif (udp_recv ingress)))
(allow hostname_t node_t (node (tcp_recv tcp_send recvfrom sendto)))
(allow hostname_t node_t (node (udp_send sendto)))
(allow hostname_t node_t (node (udp_recv recvfrom)))
(allow hostname_t dns_port_t (tcp_socket (recv_msg send_msg)))
(allow hostname_t dns_port_t (udp_socket (send_msg)))
(allow hostname_t dns_port_t (udp_socket (recv_msg)))
(allow hostname_t dns_port_t (tcp_socket (name_connect)))
(allow hostname_t dns_client_packet_t (packet (send)))
(allow hostname_t dns_client_packet_t (packet (recv)))
(allow hostname_t etc_t (dir (getattr search open)))
(allow hostname_t net_conf_t (file (ioctl read getattr lock open)))
(optional hostname_optional_2
    (typeattributeset cil_gen_require init_t)
    (allow hostname_t init_t (process (sigchld)))
    (allow hostname_t init_t (process (signull)))
    (optional hostname_optional_3
        (typeattributeset cil_gen_require rpm_t)
        (allow hostname_t rpm_t (fd (use)))
        (allow hostname_t rpm_t (fifo_file (ioctl read getattr lock open)))
    )
    (optional hostname_optional_4
        (typeattributeset cil_gen_require security_t)
        (typeattributeset cil_gen_require sysfs_t)
        (dontaudit hostname_t security_t (filesystem (getattr)))
        (dontaudit hostname_t sysfs_t (filesystem (getattr)))
        (dontaudit hostname_t sysfs_t (dir (getattr search open)))
        (dontaudit hostname_t security_t (dir (getattr search open)))
        (dontaudit hostname_t security_t (file (ioctl read getattr lock open)))
    )
    (optional hostname_optional_5
        (typeattributeset cil_gen_require selinux_config_t)
        (dontaudit hostname_t selinux_config_t (dir (getattr search open)))
        (dontaudit hostname_t selinux_config_t (file (ioctl read getattr lock open)))
    )
    (optional hostname_optional_6
        (typeattributeset cil_gen_require var_t)
        (typeattributeset cil_gen_require var_run_t)
        (typeattributeset cil_gen_require avahi_t)
        (typeattributeset cil_gen_require avahi_var_run_t)
        (allow hostname_t var_run_t (lnk_file (read getattr)))
        (allow hostname_t var_t (dir (getattr search open)))
        (allow hostname_t var_run_t (dir (getattr search open)))
        (allow hostname_t avahi_var_run_t (dir (getattr search open)))
        (allow hostname_t avahi_var_run_t (sock_file (write getattr append open)))
        (allow hostname_t avahi_t (unix_stream_socket (connectto)))
    )
    (optional hostname_optional_7
        (typeattributeset cil_gen_require var_t)
        (typeattributeset cil_gen_require var_run_t)
        (typeattributeset cil_gen_require nscd_t)
        (typeattributeset cil_gen_require nscd_var_run_t)
        (booleanif (nscd_use_shm)
            (true
                (allow hostname_t nscd_var_run_t (sock_file (read getattr open)))
                (allow hostname_t nscd_var_run_t (dir (ioctl read getattr lock search open)))
                (dontaudit hostname_t nscd_var_run_t (file (ioctl read getattr lock open)))
                (allow hostname_t nscd_t (unix_stream_socket (connectto)))
                (allow hostname_t nscd_var_run_t (sock_file (write getattr append open)))
                (allow hostname_t nscd_var_run_t (dir (getattr search open)))
                (allow hostname_t var_run_t (dir (getattr search open)))
                (allow hostname_t var_t (dir (getattr search open)))
                (allow hostname_t var_run_t (lnk_file (read getattr)))
                (allow hostname_t nscd_t (fd (use)))
                (allow hostname_t nscd_t (nscd (getpwd getgrp gethost shmempwd shmemgrp shmemhost)))
                (allow hostname_t self (unix_stream_socket (ioctl read write create getattr setattr append bind connect listen accept getopt setopt shutdown)))
            )
            (false
                (allow nscd_t hostname_t (process (getattr)))
                (allow nscd_t hostname_t (lnk_file (read getattr)))
                (allow nscd_t hostname_t (file (ioctl read getattr lock open)))
                (allow nscd_t hostname_t (dir (ioctl read getattr lock search open)))
                (dontaudit hostname_t nscd_var_run_t (file (ioctl read getattr lock open)))
                (allow hostname_t nscd_t (unix_stream_socket (connectto)))
                (allow hostname_t nscd_var_run_t (sock_file (write getattr append open)))
                (allow hostname_t nscd_var_run_t (dir (getattr search open)))
                (allow hostname_t var_run_t (dir (getattr search open)))
                (allow hostname_t var_t (dir (getattr search open)))
                (allow hostname_t var_run_t (lnk_file (read getattr)))
                (dontaudit hostname_t nscd_t (nscd (shmempwd shmemgrp shmemhost getserv shmemserv)))
                (dontaudit hostname_t nscd_t (fd (use)))
                (allow hostname_t nscd_t (nscd (getpwd getgrp gethost)))
                (allow hostname_t self (unix_stream_socket (ioctl read write create getattr setattr append bind connect getopt setopt shutdown)))
            )
        )
    )
    (optional hostname_optional_8
        (typeattributeset cil_gen_require unlabeled_t)
        (typeattributeset cil_gen_require etc_t)
        (typeattributeset cil_gen_require net_conf_t)
        (typeattributeset cil_gen_require netlabel_peer_t)
        (typeattributeset cil_gen_require netif_t)
        (typeattributeset cil_gen_require node_t)
        (typeattributeset cil_gen_require var_yp_t)
        (typeattributeset cil_gen_require port_type)
        (typeattributeset cil_gen_require port_t)
        (typeattributeset cil_gen_require defined_port_type)
        (typeattributeset cil_gen_require reserved_port_type)
        (typeattributeset cil_gen_require portmap_port_t)
        (typeattributeset cil_gen_require reserved_port_t)
        (typeattributeset cil_gen_require portmap_client_packet_t)
        (typeattributeset cil_gen_require client_packet_t)
        (typeattributeset cil_gen_require server_packet_t)
        (booleanif (allow_ypbind)
            (true
                (allow hostname_t net_conf_t (file (ioctl read getattr lock open)))
                (allow hostname_t etc_t (dir (getattr search open)))
                (allow hostname_t server_packet_t (packet (recv)))
                (allow hostname_t server_packet_t (packet (send)))
                (allow hostname_t client_packet_t (packet (recv)))
                (allow hostname_t client_packet_t (packet (send)))
                (allow hostname_t portmap_client_packet_t (packet (recv)))
                (allow hostname_t portmap_client_packet_t (packet (send)))
                (dontaudit hostname_t port_type (tcp_socket (name_connect)))
                (allow hostname_t port_t (tcp_socket (name_connect)))
                (allow hostname_t reserved_port_t (tcp_socket (name_connect)))
                (allow hostname_t portmap_port_t (tcp_socket (name_connect)))
                (dontaudit hostname_t port_type (udp_socket (name_bind)))
                (dontaudit hostname_t port_type (tcp_socket (name_bind)))
                (dontaudit hostname_t reserved_port_type (udp_socket (name_bind)))
                (dontaudit hostname_t reserved_port_type (tcp_socket (name_bind)))
                (dontaudit hostname_t defined_port_type (udp_socket (name_bind)))
                (allow hostname_t port_t (udp_socket (name_bind)))
                (dontaudit hostname_t defined_port_type (tcp_socket (name_bind)))
                (allow hostname_t port_t (tcp_socket (name_bind)))
                (allow hostname_t node_t (udp_socket (node_bind)))
                (allow hostname_t node_t (tcp_socket (node_bind)))
                (allow hostname_t port_type (udp_socket (recv_msg)))
                (allow hostname_t port_type (udp_socket (send_msg)))
                (allow hostname_t port_type (tcp_socket (recv_msg send_msg)))
                (allow hostname_t node_t (node (udp_recv recvfrom)))
                (allow hostname_t node_t (node (udp_send sendto)))
                (allow hostname_t node_t (node (tcp_recv tcp_send recvfrom sendto)))
                (allow hostname_t netif_t (netif (udp_recv ingress)))
                (allow hostname_t netif_t (netif (udp_send egress)))
                (allow hostname_t netif_t (netif (tcp_recv tcp_send ingress egress)))
                (allow hostname_t netlabel_peer_t (tcp_socket (recvfrom)))
                (allow hostname_t netlabel_peer_t (udp_socket (recvfrom)))
                (allow hostname_t netlabel_peer_t (rawip_socket (recvfrom)))
                (allow hostname_t netlabel_peer_t (peer (recv)))
                (allow hostname_t unlabeled_t (association (sendto recvfrom)))
                (allow hostname_t unlabeled_t (peer (recv)))
                (allow hostname_t unlabeled_t (rawip_socket (recvfrom)))
                (allow hostname_t unlabeled_t (udp_socket (recvfrom)))
                (allow hostname_t unlabeled_t (tcp_socket (recvfrom)))
                (allow hostname_t var_yp_t (lnk_file (read getattr)))
                (allow hostname_t var_yp_t (file (ioctl read getattr lock open)))
                (allow hostname_t var_yp_t (dir (ioctl read getattr lock search open)))
                (allow hostname_t self (udp_socket (ioctl read write create getattr setattr append bind connect getopt setopt shutdown)))
                (allow hostname_t self (tcp_socket (ioctl read write create getattr setattr append bind connect listen accept getopt setopt shutdown)))
                (allow hostname_t self (capability (net_bind_service)))
            )
        )
    )
    (optional hostname_optional_9
        (typeattributeset cil_gen_require var_t)
        (typeattributeset cil_gen_require xend_var_log_t)
        (typeattributeset cil_gen_require var_log_t)
        (typeattributeset cil_gen_require xend_t)
        (allow hostname_t var_t (dir (getattr search open)))
        (allow hostname_t var_log_t (dir (getattr search open)))
        (allow hostname_t xend_var_log_t (dir (getattr search open)))
        (allow hostname_t xend_var_log_t (file (ioctl getattr lock append open)))
        (dontaudit hostname_t xend_var_log_t (file (write)))
        (dontaudit hostname_t xend_t (fd (use)))
    )
    (optional hostname_optional_10
        (typeattributeset cil_gen_require unconfined_t)
        (dontaudit hostname_t unconfined_t (fifo_file (ioctl read write getattr lock append open)))
    )
)
