Skip to content

Commit

Permalink
Drop RHEL4 and RHEL5 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
pebenito authored and sjvermeu committed Oct 12, 2014
1 parent 63c4bba commit 465454f
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 148 deletions.
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ ifneq ($(DISTRO),)
M4PARAM += -D distro_$(DISTRO)
endif

# rhel4 also implies redhat
ifeq "$(DISTRO)" "rhel4"
M4PARAM += -D distro_redhat
endif

ifeq "$(DISTRO)" "ubuntu"
M4PARAM += -D distro_debian
endif
Expand Down
7 changes: 3 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ NAME String (optional). Sets the name of the policy; the
set, the policy type (TYPE) is used.

DISTRO String (optional). Enable distribution-specific policy.
Available options are redhat, rhel4, gentoo, debian,
and suse. This option controls distro_redhat,
distro_rhel4, distro_gentoo, distro_debian, and
distro_suse policy blocks.
Available options are redhat, gentoo, and debian.
This option controls distro_redhat, distro_gentoo, and
distro_debian build option policy blocks.

MONOLITHIC Boolean. If set, a monolithic policy is built,
otherwise a modular policy is built.
Expand Down
7 changes: 0 additions & 7 deletions Rules.monolithic
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,6 @@ $(fcpath): $(fc) $(loadpath) $(userpath)/system.users
$(verbose) $(INSTALL) -m 0644 $(fc) $(fcpath)
$(verbose) $(INSTALL) -m 0644 $(homedir_template) $(homedirpath)
$(verbose) $(UMASK) 022 ; $(genhomedircon) -d $(topdir) -t $(NAME) $(USEPWD)
ifeq "$(DISTRO)" "rhel4"
# Setfiles in RHEL4 does not look at file_contexts.homedirs.
$(verbose) cat [email protected] >> $@
# Delete the file_contexts.homedirs in case the toolchain has
# been updated, to prevent duplicate match errors.
$(verbose) rm -f [email protected]
endif

########################################
#
Expand Down
54 changes: 0 additions & 54 deletions policy/modules/admin/su.if
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,6 @@ template(`su_restricted_domain_template', `
')
')

ifdef(`distro_rhel4',`
domain_role_change_exemption($1_su_t)
domain_subj_id_change_exemption($1_su_t)
domain_obj_id_change_exemption($1_su_t)

selinux_get_fs_mount($1_su_t)
selinux_validate_context($1_su_t)
selinux_compute_access_vector($1_su_t)
selinux_compute_create_context($1_su_t)
selinux_compute_relabel_context($1_su_t)
selinux_compute_user_contexts($1_su_t)

seutil_read_config($1_su_t)
seutil_read_default_contexts($1_su_t)

# Only allow transitions to unprivileged user domains.
userdom_spec_domtrans_unpriv_users($1_su_t)
')

ifdef(`hide_broken_symptoms',`
# dontaudit leaked sockets from parent
dontaudit $1_su_t $2:socket_class_set { read write };
Expand Down Expand Up @@ -246,41 +227,6 @@ template(`su_role_template',`
')
')

ifdef(`distro_rhel4',`
domain_role_change_exemption($1_su_t)
domain_subj_id_change_exemption($1_su_t)
domain_obj_id_change_exemption($1_su_t)

selinux_get_fs_mount($1_su_t)
selinux_validate_context($1_su_t)
selinux_compute_create_context($1_su_t)
selinux_compute_relabel_context($1_su_t)
selinux_compute_user_contexts($1_su_t)

# Relabel ttys and ptys.
term_relabel_all_ttys($1_su_t)
term_relabel_all_ptys($1_su_t)
# Close and re-open ttys and ptys to get the fd into the correct domain.
term_use_all_ttys($1_su_t)
term_use_all_ptys($1_su_t)

seutil_read_config($1_su_t)
seutil_read_default_contexts($1_su_t)

if(secure_mode) {
# Only allow transitions to unprivileged user domains.
userdom_spec_domtrans_unpriv_users($1_su_t)
} else {
# Allow transitions to all user domains
userdom_spec_domtrans_all_users($1_su_t)
}

optional_policy(`
unconfined_domtrans($1_su_t)
unconfined_signal($1_su_t)
')
')

ifdef(`hide_broken_symptoms',`
# dontaudit leaked sockets from parent
dontaudit $1_su_t $3:socket_class_set { read write };
Expand Down
16 changes: 0 additions & 16 deletions policy/modules/kernel/kernel.if
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,6 @@ interface(`kernel_change_ring_buffer_level',`

allow $1 self:capability2 syslog;
allow $1 kernel_t:system syslog_console;

ifdef(`distro_rhel4',`
allow $1 self:capability sys_admin;
')

ifdef(`distro_rhel5',`
allow $1 self:capability sys_admin;
')
')

########################################
Expand All @@ -523,14 +515,6 @@ interface(`kernel_clear_ring_buffer',`

allow $1 self:capability2 syslog;
allow $1 kernel_t:system syslog_mod;

ifdef(`distro_rhel4',`
allow $1 self:capability sys_admin;
')

ifdef(`distro_rhel5',`
allow $1 self:capability sys_admin;
')
')

########################################
Expand Down
20 changes: 0 additions & 20 deletions policy/modules/kernel/selinux.if
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,6 @@ interface(`selinux_set_enforce_mode',`

if(!secure_mode_policyload) {
allow $1 security_t:security setenforce;

ifdef(`distro_rhel4',`
# needed for systems without audit support
auditallow $1 security_t:security setenforce;
')
}
')

Expand Down Expand Up @@ -366,11 +361,6 @@ interface(`selinux_load_policy',`

if(!secure_mode_policyload) {
allow $1 security_t:security load_policy;

ifdef(`distro_rhel4',`
# needed for systems without audit support
auditallow $1 security_t:security load_policy;
')
}
')

Expand Down Expand Up @@ -460,11 +450,6 @@ interface(`selinux_set_generic_booleans',`
allow $1 security_t:file rw_file_perms;

allow $1 security_t:security setbool;

ifdef(`distro_rhel4',`
# needed for systems without audit support
auditallow $1 security_t:security setbool;
')
')

########################################
Expand Down Expand Up @@ -504,11 +489,6 @@ interface(`selinux_set_all_booleans',`

allow $1 security_t:security setbool;

ifdef(`distro_rhel4',`
# needed for systems without audit support
auditallow $1 security_t:security setbool;
')

if(!secure_mode_policyload) {
allow $1 secure_mode_policyload_t:file write_file_perms;
}
Expand Down
10 changes: 0 additions & 10 deletions policy/modules/kernel/selinux.te
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,7 @@ allow selinux_unconfined_type { boolean_type -secure_mode_policyload_t }:file wr
# Access the security API.
allow selinux_unconfined_type security_t:security ~{ load_policy setenforce };

ifdef(`distro_rhel4',`
# needed for systems without audit support
auditallow selinux_unconfined_type security_t:security setbool;
')

if(!secure_mode_policyload) {
allow selinux_unconfined_type security_t:security { load_policy setenforce };
allow selinux_unconfined_type secure_mode_policyload_t:file write_file_perms;

ifdef(`distro_rhel4',`
# needed for systems without audit support
auditallow selinux_unconfined_type security_t:security { load_policy setenforce };
')
}
8 changes: 0 additions & 8 deletions policy/modules/services/xserver.te
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,6 @@ optional_policy(`
ifndef(`distro_redhat',`
allow xdm_t self:process { execheap execmem };
')

ifdef(`distro_rhel4',`
allow xdm_t self:process { execheap execmem };
')
')

optional_policy(`
Expand Down Expand Up @@ -749,10 +745,6 @@ userdom_rw_user_tmpfs_files(xserver_t)

xserver_use_user_fonts(xserver_t)

ifdef(`distro_rhel4',`
allow xserver_t self:process { execmem execheap execstack };
')

ifdef(`enable_mls',`
range_transition xserver_t xserver_tmp_t:sock_file s0 - mls_systemhigh;
range_transition xserver_t xserver_t:x_drawable s0 - mls_systemhigh;
Expand Down
24 changes: 0 additions & 24 deletions policy/modules/system/init.if
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,6 @@ interface(`init_domain',`
role system_r types $1;

domtrans_pattern(init_t, $2, $1)

ifdef(`hide_broken_symptoms',`
# RHEL4 systems seem to have a stray
# fds open from the initrd
ifdef(`distro_rhel4',`
kernel_dontaudit_use_fds($1)
')
')
')

########################################
Expand Down Expand Up @@ -253,14 +245,6 @@ interface(`init_daemon_domain',`
userdom_dontaudit_use_user_terminals($1)
')

ifdef(`hide_broken_symptoms',`
# RHEL4 systems seem to have a stray
# fds open from the initrd
ifdef(`distro_rhel4',`
kernel_dontaudit_use_fds($1)
')
')

optional_policy(`
nscd_use($1)
')
Expand Down Expand Up @@ -373,14 +357,6 @@ interface(`init_system_domain',`
role system_r types $1;

domtrans_pattern(initrc_t, $2, $1)

ifdef(`hide_broken_symptoms',`
# RHEL4 systems seem to have a stray
# fds open from the initrd
ifdef(`distro_rhel4',`
kernel_dontaudit_use_fds($1)
')
')
')

########################################
Expand Down

0 comments on commit 465454f

Please sign in to comment.