diff --git a/policycoreutils-gui.patch b/policycoreutils-gui.patch index 817b416..b1b5727 100644 --- a/policycoreutils-gui.patch +++ b/policycoreutils-gui.patch @@ -4553,8 +4553,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policyc + app.stand_alone() diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.31/gui/polgen.py --- nsapolicycoreutils/gui/polgen.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/polgen.py 2007-10-16 21:32:25.000000000 -0400 -@@ -0,0 +1,839 @@ ++++ policycoreutils-2.0.31/gui/polgen.py 2007-10-18 17:47:11.000000000 -0400 +@@ -0,0 +1,831 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information +# @@ -5114,16 +5114,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore + return newte + + def generate_user_if(self): -+ newif = "" -+ if self.type == USER: -+ newif += re.sub("TEMPLATETYPE", self.name, executable.if_user_program_rules) -+ -+ return newif -+ -+ def generate_terminal_if(self): + newif ="" -+ if self.use_terminal: -+ newif = re.sub("TEMPLATETYPE", self.name, executable.if_terminal_rules) ++ if self.use_terminal or self.type == USER: ++ newif = re.sub("TEMPLATETYPE", self.name, executable.if_user_program_rules) + return newif + + @@ -5144,7 +5137,6 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore + newif += self.generate_user_if() + newif += self.generate_dbus_if() + newif += self.generate_admin_if() -+ newif += self.generate_terminal_if() + + return newif + @@ -9828,7 +9820,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu + app.stand_alone() diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.31/gui/templates/boolean.py --- nsapolicycoreutils/gui/templates/boolean.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/boolean.py 2007-10-16 21:30:53.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/boolean.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,40 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -9872,7 +9864,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py + diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.31/gui/templates/etc_rw.py --- nsapolicycoreutils/gui/templates/etc_rw.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/etc_rw.py 2007-10-16 19:23:37.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/etc_rw.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,129 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -9965,7 +9957,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py + type TEMPLATETYPE_etc_rw_t; + ') + -+ manage_file_perms($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) ++ manage_files_pattern($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) + files_search_etc($1) +') + @@ -9984,9 +9976,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py + type TEMPLATETYPE_etc_rw_t; + ') + -+ manage_dir_perms($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) -+ manage_file_perms($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) -+ manage_lnk_file_perms($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) ++ manage_dirs_pattern($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) ++ manage_files_pattern($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) ++ manage_lnk_files_pattern($1,TEMPLATETYPE_etc_rw_t,TEMPLATETYPE_etc_rw_t) +') + +""" @@ -10005,8 +9997,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py +""" diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.31/gui/templates/executable.py --- nsapolicycoreutils/gui/templates/executable.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/executable.py 2007-10-16 19:24:01.000000000 -0400 -@@ -0,0 +1,365 @@ ++++ policycoreutils-2.0.31/gui/templates/executable.py 2007-10-18 17:46:44.000000000 -0400 +@@ -0,0 +1,331 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information +# @@ -10206,40 +10198,6 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable + +""" + -+if_terminal_rules=""" -+######################################## -+## -+## Execute TEMPLATETYPE programs in the TEMPLATETYPE domain. -+## -+## -+## -+## The type of the process performing this action. -+## -+## -+## -+## -+## The role to allow the TEMPLATETYPE domain. -+## -+## -+## -+## -+## The type of the terminal allow the TEMPLATETYPE domain to use. -+## -+## -+## -+# -+interface(`TEMPLATETYPE_run',` -+ gen_require(` -+ type TEMPLATETYPE_t; -+ ') -+ -+ TEMPLATETYPE_domtrans($1) -+ role $2 types TEMPLATETYPE_t; -+ allow TEMPLATETYPE_t $3:chr_file rw_term_perms; -+') -+ -+""" -+ +if_user_program_rules=""" +######################################## +## @@ -10374,7 +10332,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable + diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.31/gui/templates/__init__.py --- nsapolicycoreutils/gui/templates/__init__.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/__init__.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/__init__.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,18 @@ +# +# Copyright (C) 2007 Red Hat, Inc. @@ -10396,7 +10354,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.p + diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.31/gui/templates/network.py --- nsapolicycoreutils/gui/templates/network.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/network.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/network.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,80 @@ +te_port_types=""" +type TEMPLATETYPE_port_t; @@ -10480,7 +10438,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py + diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.31/gui/templates/rw.py --- nsapolicycoreutils/gui/templates/rw.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/rw.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/rw.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,128 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -10591,9 +10549,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py poli + type TEMPLATETYPE_rw_t; + ') + -+ manage_dir_perms($1,TEMPLATETYPE_rw_t,TEMPLATETYPE_rw_t) -+ manage_file_perms($1,TEMPLATETYPE_rw_t,TEMPLATETYPE_rw_t) -+ manage_lnk_file_perms($1,TEMPLATETYPE_rw_t,TEMPLATETYPE_rw_t) ++ manage_dirs_pattern($1,TEMPLATETYPE_rw_t,TEMPLATETYPE_rw_t) ++ manage_files_pattern($1,TEMPLATETYPE_rw_t,TEMPLATETYPE_rw_t) ++ manage_lnk_files_pattern($1,TEMPLATETYPE_rw_t,TEMPLATETYPE_rw_t) +') + +""" @@ -10612,7 +10570,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py poli +""" diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.31/gui/templates/script.py --- nsapolicycoreutils/gui/templates/script.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/script.py 2007-10-16 21:31:31.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/script.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,91 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -10707,7 +10665,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py +""" diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.31/gui/templates/semodule.py --- nsapolicycoreutils/gui/templates/semodule.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/semodule.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/semodule.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,41 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -10752,7 +10710,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.p + diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.31/gui/templates/tmp.py --- nsapolicycoreutils/gui/templates/tmp.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/tmp.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/tmp.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,97 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -10841,9 +10799,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py pol + type TEMPLATETYPE_tmp_t; + ') + -+ manage_dir_perms($1,TEMPLATETYPE_tmp_t,TEMPLATETYPE_tmp_t) -+ manage_file_perms($1,TEMPLATETYPE_tmp_t,TEMPLATETYPE_tmp_t) -+ manage_lnk_file_perms($1,TEMPLATETYPE_tmp_t,TEMPLATETYPE_tmp_t) ++ manage_dirs_pattern($1,TEMPLATETYPE_tmp_t,TEMPLATETYPE_tmp_t) ++ manage_files_pattern($1,TEMPLATETYPE_tmp_t,TEMPLATETYPE_tmp_t) ++ manage_lnk_files_pattern($1,TEMPLATETYPE_tmp_t,TEMPLATETYPE_tmp_t) +') +""" + @@ -10853,7 +10811,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py pol + diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.31/gui/templates/user.py --- nsapolicycoreutils/gui/templates/user.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/user.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/user.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,137 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -10994,7 +10952,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py po +""" diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.31/gui/templates/var_lib.py --- nsapolicycoreutils/gui/templates/var_lib.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/var_lib.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/var_lib.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,162 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -11113,9 +11071,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py + type TEMPLATETYPE_var_lib_t; + ') + -+ manage_dir_perms($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t) -+ manage_file_perms($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t) -+ manage_lnk_file_perms($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t) ++ manage_dirs_pattern($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t) ++ manage_files_pattern($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t) ++ manage_lnk_files_pattern($1,TEMPLATETYPE_var_lib_t,TEMPLATETYPE_var_lib_t) +') + +""" @@ -11160,7 +11118,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py +""" diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.31/gui/templates/var_log.py --- nsapolicycoreutils/gui/templates/var_log.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/var_log.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/var_log.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,112 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -11256,9 +11214,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py + type TEMPLATETYPE_log_t; + ') + -+ manage_dir_perms($1,TEMPLATETYPE_log_t,TEMPLATETYPE_log_t) -+ manage_file_perms($1,TEMPLATETYPE_log_t,TEMPLATETYPE_log_t) -+ manage_lnk_file_perms($1,TEMPLATETYPE_log_t,TEMPLATETYPE_log_t) ++ manage_dirs_pattern($1,TEMPLATETYPE_log_t,TEMPLATETYPE_log_t) ++ manage_files_pattern($1,TEMPLATETYPE_log_t,TEMPLATETYPE_log_t) ++ manage_lnk_files_pattern($1,TEMPLATETYPE_log_t,TEMPLATETYPE_log_t) +') +""" + @@ -11276,7 +11234,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py +""" diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.31/gui/templates/var_run.py --- nsapolicycoreutils/gui/templates/var_run.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/var_run.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/var_run.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,119 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -11352,9 +11310,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py + type TEMPLATETYPE_var_run_t; + ') + -+ manage_dir_perms($1,TEMPLATETYPE_var_run_t,TEMPLATETYPE_var_run_t) -+ manage_file_perms($1,TEMPLATETYPE_var_run_t,TEMPLATETYPE_var_run_t) -+ manage_lnk_file_perms($1,TEMPLATETYPE_var_run_t,TEMPLATETYPE_var_run_t) ++ manage_dirs_pattern($1,TEMPLATETYPE_var_run_t,TEMPLATETYPE_var_run_t) ++ manage_files_pattern($1,TEMPLATETYPE_var_run_t,TEMPLATETYPE_var_run_t) ++ manage_lnk_files_pattern($1,TEMPLATETYPE_var_run_t,TEMPLATETYPE_var_run_t) +') + +""" @@ -11399,7 +11357,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py + diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.31/gui/templates/var_spool.py --- nsapolicycoreutils/gui/templates/var_spool.py 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-2.0.31/gui/templates/var_spool.py 2007-10-15 16:55:03.000000000 -0400 ++++ policycoreutils-2.0.31/gui/templates/var_spool.py 2007-10-18 17:46:44.000000000 -0400 @@ -0,0 +1,131 @@ +# Copyright (C) 2007 Red Hat +# see file 'COPYING' for use and warranty information @@ -11513,9 +11471,9 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool. + type TEMPLATETYPE_spool_t; + ') + -+ manage_dir_perms($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t) -+ manage_file_perms($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t) -+ manage_lnk_file_perms($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t) ++ manage_dirs_pattern($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t) ++ manage_files_pattern($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t) ++ manage_lnk_files_pattern($1,TEMPLATETYPE_spool_t,TEMPLATETYPE_spool_t) +') + +""" diff --git a/policycoreutils.spec b/policycoreutils.spec index e97554f..267721f 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -6,7 +6,7 @@ Summary: SELinux policy core utilities Name: policycoreutils Version: 2.0.31 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -205,6 +205,9 @@ if [ "$1" -ge "1" ]; then fi %changelog +* Thu Oct 18 2007 Dan Walsh 2.0.31-6 +- Fix the generation templates + * Tue Oct 16 2007 Dan Walsh 2.0.31-5 - Fix enable/disable audit messages