]> git.ipfire.org Git - people/stevee/selinux-policy.git/commitdiff
trunk: merge strict and targeted policies. merge shlib_t into lib_t.
authorChris PeBenito <cpebenito@tresys.com>
Tue, 2 Oct 2007 16:04:50 +0000 (16:04 +0000)
committerChris PeBenito <cpebenito@tresys.com>
Tue, 2 Oct 2007 16:04:50 +0000 (16:04 +0000)
299 files changed:
Changelog
Makefile
README
build.conf
config/appconfig-mcs/dbus_contexts [moved from config/appconfig-strict-mcs/dbus_contexts with 100% similarity]
config/appconfig-mcs/default_contexts [new file with mode: 0644]
config/appconfig-mcs/default_type [moved from config/appconfig-strict-mcs/default_type with 64% similarity]
config/appconfig-mcs/failsafe_context [moved from config/appconfig-strict-mcs/failsafe_context with 100% similarity]
config/appconfig-mcs/initrc_context [moved from config/appconfig-strict-mcs/initrc_context with 100% similarity]
config/appconfig-mcs/media [moved from config/appconfig-strict-mcs/media with 100% similarity]
config/appconfig-mcs/removable_context [moved from config/appconfig-strict-mcs/removable_context with 100% similarity]
config/appconfig-mcs/root_default_contexts [new file with mode: 0644]
config/appconfig-mcs/seusers [moved from config/appconfig-strict-mcs/seusers with 100% similarity]
config/appconfig-mcs/userhelper_context [moved from config/appconfig-strict-mcs/userhelper_context with 100% similarity]
config/appconfig-mls/dbus_contexts [moved from config/appconfig-strict-mls/dbus_contexts with 100% similarity]
config/appconfig-mls/default_contexts [new file with mode: 0644]
config/appconfig-mls/default_type [moved from config/appconfig-strict-mls/default_type with 77% similarity]
config/appconfig-mls/failsafe_context [moved from config/appconfig-strict-mls/failsafe_context with 100% similarity]
config/appconfig-mls/initrc_context [moved from config/appconfig-strict-mls/initrc_context with 100% similarity]
config/appconfig-mls/media [moved from config/appconfig-strict-mls/media with 100% similarity]
config/appconfig-mls/removable_context [moved from config/appconfig-strict-mls/removable_context with 100% similarity]
config/appconfig-mls/root_default_contexts [new file with mode: 0644]
config/appconfig-mls/seusers [moved from config/appconfig-strict-mls/seusers with 100% similarity]
config/appconfig-mls/userhelper_context [moved from config/appconfig-strict-mls/userhelper_context with 100% similarity]
config/appconfig-standard/dbus_contexts [moved from config/appconfig-strict/dbus_contexts with 100% similarity]
config/appconfig-standard/default_contexts [new file with mode: 0644]
config/appconfig-standard/default_type [moved from config/appconfig-strict/default_type with 64% similarity]
config/appconfig-standard/failsafe_context [moved from config/appconfig-strict/failsafe_context with 100% similarity]
config/appconfig-standard/initrc_context [moved from config/appconfig-strict/initrc_context with 100% similarity]
config/appconfig-standard/media [moved from config/appconfig-strict/media with 100% similarity]
config/appconfig-standard/removable_context [moved from config/appconfig-strict/removable_context with 100% similarity]
config/appconfig-standard/root_default_contexts [new file with mode: 0644]
config/appconfig-standard/seusers [moved from config/appconfig-strict/seusers with 100% similarity]
config/appconfig-standard/userhelper_context [moved from config/appconfig-strict/userhelper_context with 100% similarity]
config/appconfig-strict-mcs/default_contexts [deleted file]
config/appconfig-strict-mcs/root_default_contexts [deleted file]
config/appconfig-strict-mls/default_contexts [deleted file]
config/appconfig-strict-mls/root_default_contexts [deleted file]
config/appconfig-strict/default_contexts [deleted file]
config/appconfig-strict/root_default_contexts [deleted file]
config/appconfig-targeted-mcs/dbus_contexts [deleted file]
config/appconfig-targeted-mcs/default_contexts [deleted file]
config/appconfig-targeted-mcs/default_type [deleted file]
config/appconfig-targeted-mcs/failsafe_context [deleted file]
config/appconfig-targeted-mcs/initrc_context [deleted file]
config/appconfig-targeted-mcs/media [deleted file]
config/appconfig-targeted-mcs/removable_context [deleted file]
config/appconfig-targeted-mcs/root_default_contexts [deleted file]
config/appconfig-targeted-mcs/seusers [deleted file]
config/appconfig-targeted-mcs/userhelper_context [deleted file]
config/appconfig-targeted-mls/dbus_contexts [deleted file]
config/appconfig-targeted-mls/default_contexts [deleted file]
config/appconfig-targeted-mls/default_type [deleted file]
config/appconfig-targeted-mls/failsafe_context [deleted file]
config/appconfig-targeted-mls/initrc_context [deleted file]
config/appconfig-targeted-mls/media [deleted file]
config/appconfig-targeted-mls/removable_context [deleted file]
config/appconfig-targeted-mls/root_default_contexts [deleted file]
config/appconfig-targeted-mls/seusers [deleted file]
config/appconfig-targeted-mls/userhelper_context [deleted file]
config/appconfig-targeted/dbus_contexts [deleted file]
config/appconfig-targeted/default_contexts [deleted file]
config/appconfig-targeted/default_type [deleted file]
config/appconfig-targeted/failsafe_context [deleted file]
config/appconfig-targeted/initrc_context [deleted file]
config/appconfig-targeted/media [deleted file]
config/appconfig-targeted/removable_context [deleted file]
config/appconfig-targeted/root_default_contexts [deleted file]
config/appconfig-targeted/seusers [deleted file]
config/appconfig-targeted/userhelper_context [deleted file]
policy/constraints
policy/global_booleans
policy/global_tunables
policy/modules/admin/acct.te
policy/modules/admin/apt.te
policy/modules/admin/bootloader.te
policy/modules/admin/brctl.te
policy/modules/admin/consoletype.te
policy/modules/admin/dmesg.if
policy/modules/admin/dmesg.te
policy/modules/admin/dmidecode.te
policy/modules/admin/dpkg.te
policy/modules/admin/firstboot.te
policy/modules/admin/kudzu.te
policy/modules/admin/mrtg.te
policy/modules/admin/netutils.te
policy/modules/admin/portage.te
policy/modules/admin/prelink.if
policy/modules/admin/prelink.te
policy/modules/admin/quota.te
policy/modules/admin/readahead.te
policy/modules/admin/rpm.te
policy/modules/admin/su.if
policy/modules/admin/sxid.te
policy/modules/admin/tzdata.if
policy/modules/admin/tzdata.te
policy/modules/admin/updfstab.te
policy/modules/apps/ada.fc
policy/modules/apps/ada.if
policy/modules/apps/ada.te
policy/modules/apps/cdrecord.te
policy/modules/apps/ethereal.fc
policy/modules/apps/evolution.fc
policy/modules/apps/games.te
policy/modules/apps/gift.fc
policy/modules/apps/gnome.fc
policy/modules/apps/gpg.fc
policy/modules/apps/irc.fc
policy/modules/apps/java.if
policy/modules/apps/java.te
policy/modules/apps/loadkeys.if
policy/modules/apps/loadkeys.te
policy/modules/apps/mono.te
policy/modules/apps/mozilla.fc
policy/modules/apps/mozilla.if
policy/modules/apps/mozilla.te
policy/modules/apps/mplayer.fc
policy/modules/apps/mplayer.te
policy/modules/apps/screen.fc
policy/modules/apps/thunderbird.fc
policy/modules/apps/uml.fc
policy/modules/apps/uml.te
policy/modules/apps/vmware.fc
policy/modules/apps/vmware.te
policy/modules/apps/webalizer.te
policy/modules/apps/wine.te
policy/modules/kernel/corecommands.fc
policy/modules/kernel/corecommands.if
policy/modules/kernel/domain.if
policy/modules/kernel/domain.te
policy/modules/kernel/files.if
policy/modules/kernel/files.te
policy/modules/kernel/kernel.te
policy/modules/kernel/terminal.te
policy/modules/services/amavis.te
policy/modules/services/apache.fc
policy/modules/services/apache.te
policy/modules/services/apcupsd.te
policy/modules/services/apm.te
policy/modules/services/arpwatch.te
policy/modules/services/asterisk.te
policy/modules/services/audioentropy.te
policy/modules/services/automount.te
policy/modules/services/avahi.te
policy/modules/services/bind.te
policy/modules/services/bluetooth.if
policy/modules/services/bluetooth.te
policy/modules/services/canna.te
policy/modules/services/ccs.te
policy/modules/services/cipe.te
policy/modules/services/clamav.te
policy/modules/services/courier.if
policy/modules/services/cpucontrol.te
policy/modules/services/cron.if
policy/modules/services/cron.te
policy/modules/services/cups.te
policy/modules/services/cyrus.te
policy/modules/services/dante.te
policy/modules/services/dbus.if
policy/modules/services/dbus.te
policy/modules/services/dcc.te
policy/modules/services/ddclient.te
policy/modules/services/dhcp.te
policy/modules/services/dictd.te
policy/modules/services/distcc.te
policy/modules/services/dnsmasq.te
policy/modules/services/dovecot.te
policy/modules/services/fail2ban.te
policy/modules/services/fetchmail.te
policy/modules/services/finger.te
policy/modules/services/ftp.if
policy/modules/services/ftp.te
policy/modules/services/gatekeeper.te
policy/modules/services/gpm.te
policy/modules/services/hal.te
policy/modules/services/howl.te
policy/modules/services/i18n_input.te
policy/modules/services/imaze.te
policy/modules/services/inetd.te
policy/modules/services/inn.te
policy/modules/services/ircd.te
policy/modules/services/irqbalance.te
policy/modules/services/jabber.te
policy/modules/services/kerberos.te
policy/modules/services/ktalk.te
policy/modules/services/ldap.te
policy/modules/services/lpd.te
policy/modules/services/monop.te
policy/modules/services/mta.if
policy/modules/services/mta.te
policy/modules/services/munin.te
policy/modules/services/mysql.te
policy/modules/services/nagios.te
policy/modules/services/nessus.te
policy/modules/services/networkmanager.te
policy/modules/services/nis.te
policy/modules/services/nscd.te
policy/modules/services/nsd.te
policy/modules/services/ntop.te
policy/modules/services/ntp.te
policy/modules/services/oav.te
policy/modules/services/oddjob.te
policy/modules/services/openct.te
policy/modules/services/openvpn.te
policy/modules/services/pcscd.te
policy/modules/services/pegasus.te
policy/modules/services/perdition.te
policy/modules/services/portmap.te
policy/modules/services/portslave.te
policy/modules/services/postfix.if
policy/modules/services/postfix.te
policy/modules/services/postgresql.te
policy/modules/services/postgrey.te
policy/modules/services/ppp.te
policy/modules/services/privoxy.te
policy/modules/services/pxe.te
policy/modules/services/pyzor.fc
policy/modules/services/pyzor.if
policy/modules/services/pyzor.te
policy/modules/services/radius.te
policy/modules/services/radvd.te
policy/modules/services/razor.fc
policy/modules/services/rdisc.te
policy/modules/services/remotelogin.te
policy/modules/services/resmgr.te
policy/modules/services/rhgb.te
policy/modules/services/ricci.te
policy/modules/services/roundup.te
policy/modules/services/rpc.if
policy/modules/services/rpc.te
policy/modules/services/rshd.te
policy/modules/services/rwho.te
policy/modules/services/samba.if
policy/modules/services/samba.te
policy/modules/services/sasl.te
policy/modules/services/sendmail.te
policy/modules/services/setroubleshoot.te
policy/modules/services/slrnpull.te
policy/modules/services/smartmon.te
policy/modules/services/snmp.te
policy/modules/services/snort.te
policy/modules/services/soundserver.te
policy/modules/services/spamassassin.fc
policy/modules/services/spamassassin.if
policy/modules/services/spamassassin.te
policy/modules/services/speedtouch.te
policy/modules/services/squid.te
policy/modules/services/ssh.fc
policy/modules/services/ssh.te
policy/modules/services/stunnel.te
policy/modules/services/tftp.te
policy/modules/services/timidity.te
policy/modules/services/transproxy.te
policy/modules/services/uptime.te
policy/modules/services/uucp.te
policy/modules/services/uwimap.te
policy/modules/services/watchdog.te
policy/modules/services/xfs.te
policy/modules/services/xprint.te
policy/modules/services/xserver.fc
policy/modules/services/xserver.if
policy/modules/services/xserver.te
policy/modules/services/zabbix.te
policy/modules/services/zebra.te
policy/modules/system/authlogin.if
policy/modules/system/authlogin.te
policy/modules/system/clock.te
policy/modules/system/fstools.te
policy/modules/system/getty.te
policy/modules/system/hotplug.te
policy/modules/system/init.fc
policy/modules/system/init.if
policy/modules/system/init.te
policy/modules/system/ipsec.te
policy/modules/system/iptables.te
policy/modules/system/iscsi.te
policy/modules/system/libraries.fc
policy/modules/system/libraries.if
policy/modules/system/libraries.te
policy/modules/system/locallogin.te
policy/modules/system/logging.te
policy/modules/system/lvm.te
policy/modules/system/modutils.te
policy/modules/system/mount.if
policy/modules/system/mount.te
policy/modules/system/pcmcia.te
policy/modules/system/raid.te
policy/modules/system/selinuxutil.te
policy/modules/system/sysnetwork.te
policy/modules/system/udev.te
policy/modules/system/unconfined.fc
policy/modules/system/unconfined.if
policy/modules/system/unconfined.te
policy/modules/system/userdomain.if
policy/modules/system/userdomain.te
policy/modules/system/xen.te
policy/rolemap
policy/users
support/Makefile.devel

index 880d9aef31af2febf31e813f020180c0864a322b..2cba6d7f9c019c34df41c8f06ffcf24fb888db67 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,9 @@
+- Merge shlib_t into lib_t.
+- Merge strict and targeted policies.  The policy will now behave like the
+  strict policy if the unconfined module is not present.  If it is, it will
+  behave like the targeted policy.  Added an unconfined role to have a mix
+  of confined and unconfined users.
+
 * Fri Sep 28 2007 Chris PeBenito <selinux@tresys.com> - 20070928
 - Add support for setting the unknown permissions handling.
 - Fix XML building for external reference builds and headers builds.
index 2708a782962732315936bff991f756a60dfe3f2a..df6806ed44e8a16a7503018e45b36eff05b42839 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -158,18 +158,8 @@ modpkgdir = $(sharedir)/$(strip $(NAME))
 headerdir = $(modpkgdir)/include
 docsdir = $(prefix)/share/doc/$(PKGNAME)
 
-# compile strict policy if requested.
-ifneq ($(findstring strict,$(TYPE)),)
-       M4PARAM += -D strict_policy
-endif
-
-# compile targeted policy if requested.
-ifneq ($(findstring targeted,$(TYPE)),)
-       M4PARAM += -D targeted_policy
-endif
-
 # enable MLS if requested.
-ifneq ($(findstring -mls,$(TYPE)),)
+ifeq "$(TYPE)" "mls"
        M4PARAM += -D enable_mls
        CHECKPOLICY += -M
        CHECKMODULE += -M
@@ -177,7 +167,7 @@ ifneq ($(findstring -mls,$(TYPE)),)
 endif
 
 # enable MLS if MCS requested.
-ifneq ($(findstring -mcs,$(TYPE)),)
+ifeq "$(TYPE)" "mcs"
        M4PARAM += -D enable_mcs
        CHECKPOLICY += -M
        CHECKMODULE += -M
diff --git a/README b/README
index 6901c335ff96c7193f2a99bf3a5f1e7f03461f3a..f4d8b214ac8c40d1f6414ee8e824edfe1595b74c 100644 (file)
--- a/README
+++ b/README
@@ -83,13 +83,10 @@ restorelabels               Relabel the filesystem and report each file that is
 
 2) Reference Policy Build Options (build.conf)
 
-TYPE                   String.  Available options are strict, targeted,
-                       strict-mls, targeted-mls, strict-mcs, and targeted-mcs.
-                       This sets the policy type as strict or targeted, and
-                       optionally enables multi-leve security (MLS) or
+TYPE                   String.  Available options are standard, mls, and mcs.
+                       This optionally enables multi-level security (MLS) or
                        multi-category security (MCS) features.  This option
-                       controls strict_policy, targeted_policy, enable_mls,
-                       and enable_mcs policy blocks.
+                       controls enable_mls, and enable_mcs policy blocks.
 
 NAME                   String (optional).  Sets the name of the policy; the
                        NAME is used when installing files to e.g.,
@@ -136,8 +133,7 @@ Rules.modular               Makefile rules specific to building loadable module
 Rules.monolithic       Makefile rules specific to building monolithic policies.
 
 build.conf             Options which influence the building of the policy,
-                       such as the policy type (strict, targeted, etc.)
-                       and distribution.
+                       such as the policy type and distribution.
 
 config/appconfig-*     Application configuration files for all configurations
                        of the Reference Policy (targeted/strict with or without
index b824ee5055e801824defef9210a2a4e94151b332..7ebbb8b795e3e130752b84f913dc28daf1e809ad 100644 (file)
 #OUTPUT_POLICY = 18
 
 # Policy Type
-# strict, targeted,
-# strict-mls, targeted-mls,
-# strict-mcs, targeted-mcs
-TYPE = strict
+# standard, mls, mcs
+TYPE = standard
 
 # Policy Name
 # If set, this will be used as the policy
diff --git a/config/appconfig-mcs/default_contexts b/config/appconfig-mcs/default_contexts
new file mode 100644 (file)
index 0000000..c2b7a80
--- /dev/null
@@ -0,0 +1,15 @@
+system_r:crond_t:s0            user_r:user_crond_t:s0 staff_r:staff_crond_t:s0 sysadm_r:sysadm_crond_t:s0 system_r:system_crond_t:s0 unconfined_r:unconfined_crond_t:s0
+system_r:local_login_t:s0      user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0 unconfined_r:unconfined_t:s0
+system_r:remote_login_t:s0     user_r:user_t:s0 staff_r:staff_t:s0 unconfined_r:unconfined_t:s0
+system_r:sshd_t:s0             user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0 unconfined_r:unconfined_t:s0
+system_r:sulogin_t:s0          sysadm_r:sysadm_t:s0
+system_r:xdm_t:s0              user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0 unconfined_r:unconfined_t:s0
+
+staff_r:staff_su_t:s0          user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
+staff_r:staff_sudo_t:s0                sysadm_r:sysadm_t:s0 staff_r:staff_t:s0
+
+sysadm_r:sysadm_su_t:s0                user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
+sysadm_r:sysadm_sudo_t:s0      sysadm_r:sysadm_t:s0
+
+user_r:user_su_t:s0            user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
+user_r:user_sudo_t:s0          sysadm_r:sysadm_t:s0 user_r:user_t:s0
similarity index 64%
rename from config/appconfig-strict-mcs/default_type
rename to config/appconfig-mcs/default_type
index 5212ca400bb8012f96cad3e63087a83d519734e4..a39710f7a4075edacd2a241390199d4ccbed6c5e 100644 (file)
@@ -1,3 +1,4 @@
 sysadm_r:sysadm_t
 staff_r:staff_t
+unconfined_r:unconfined_t
 user_r:user_t
diff --git a/config/appconfig-mcs/root_default_contexts b/config/appconfig-mcs/root_default_contexts
new file mode 100644 (file)
index 0000000..7f4a125
--- /dev/null
@@ -0,0 +1,11 @@
+system_r:crond_t:s0            unconfined_r:unconfined_t:s0 sysadm_r:sysadm_crond_t:s0 staff_r:staff_crond_t:s0 user_r:user_crond_t:s0
+system_r:local_login_t:s0      unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+
+staff_r:staff_su_t:s0          unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+sysadm_r:sysadm_su_t:s0                unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+user_r:user_su_t:s0            unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+
+#
+# Uncomment if you want to automatically login as sysadm_r
+#
+#system_r:sshd_t:s0            unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
diff --git a/config/appconfig-mls/default_contexts b/config/appconfig-mls/default_contexts
new file mode 100644 (file)
index 0000000..c2b7a80
--- /dev/null
@@ -0,0 +1,15 @@
+system_r:crond_t:s0            user_r:user_crond_t:s0 staff_r:staff_crond_t:s0 sysadm_r:sysadm_crond_t:s0 system_r:system_crond_t:s0 unconfined_r:unconfined_crond_t:s0
+system_r:local_login_t:s0      user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0 unconfined_r:unconfined_t:s0
+system_r:remote_login_t:s0     user_r:user_t:s0 staff_r:staff_t:s0 unconfined_r:unconfined_t:s0
+system_r:sshd_t:s0             user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0 unconfined_r:unconfined_t:s0
+system_r:sulogin_t:s0          sysadm_r:sysadm_t:s0
+system_r:xdm_t:s0              user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0 unconfined_r:unconfined_t:s0
+
+staff_r:staff_su_t:s0          user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
+staff_r:staff_sudo_t:s0                sysadm_r:sysadm_t:s0 staff_r:staff_t:s0
+
+sysadm_r:sysadm_su_t:s0                user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
+sysadm_r:sysadm_sudo_t:s0      sysadm_r:sysadm_t:s0
+
+user_r:user_su_t:s0            user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
+user_r:user_sudo_t:s0          sysadm_r:sysadm_t:s0 user_r:user_t:s0
similarity index 77%
rename from config/appconfig-strict-mls/default_type
rename to config/appconfig-mls/default_type
index c3315feeece4e40ba259f314fe520939a4f363dd..33528d61fd64ebc9625dbccd0c6abb1f2645f681 100644 (file)
@@ -1,5 +1,6 @@
-sysadm_r:sysadm_t
+auditadm_r:auditadm_t
 secadm_r:secadm_t
+sysadm_r:sysadm_t
 staff_r:staff_t
+unconfined_r:unconfined_t
 user_r:user_t
-auditadm_r:auditadm_t
diff --git a/config/appconfig-mls/root_default_contexts b/config/appconfig-mls/root_default_contexts
new file mode 100644 (file)
index 0000000..7f4a125
--- /dev/null
@@ -0,0 +1,11 @@
+system_r:crond_t:s0            unconfined_r:unconfined_t:s0 sysadm_r:sysadm_crond_t:s0 staff_r:staff_crond_t:s0 user_r:user_crond_t:s0
+system_r:local_login_t:s0      unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+
+staff_r:staff_su_t:s0          unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+sysadm_r:sysadm_su_t:s0                unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+user_r:user_su_t:s0            unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
+
+#
+# Uncomment if you want to automatically login as sysadm_r
+#
+#system_r:sshd_t:s0            unconfined_r:unconfined_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
diff --git a/config/appconfig-standard/default_contexts b/config/appconfig-standard/default_contexts
new file mode 100644 (file)
index 0000000..4bb784d
--- /dev/null
@@ -0,0 +1,15 @@
+system_r:crond_t       user_r:user_crond_t staff_r:staff_crond_t sysadm_r:sysadm_crond_t system_r:system_crond_t unconfined_r:unconfined_crond_t
+system_r:local_login_t user_r:user_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t
+system_r:remote_login_t        user_r:user_t staff_r:staff_t unconfined_r:unconfined_t
+system_r:sshd_t                user_r:user_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t
+system_r:sulogin_t     sysadm_r:sysadm_t
+system_r:xdm_t         user_r:user_t staff_r:staff_t sysadm_r:sysadm_t unconfined_r:unconfined_t
+
+staff_r:staff_su_t     user_r:user_t staff_r:staff_t sysadm_r:sysadm_t
+staff_r:staff_sudo_t   sysadm_r:sysadm_t staff_r:staff_t
+
+sysadm_r:sysadm_su_t   user_r:user_t staff_r:staff_t sysadm_r:sysadm_t
+sysadm_r:sysadm_sudo_t sysadm_r:sysadm_t
+
+user_r:user_su_t       user_r:user_t staff_r:staff_t sysadm_r:sysadm_t
+user_r:user_sudo_t     sysadm_r:sysadm_t user_r:user_t
similarity index 64%
rename from config/appconfig-strict/default_type
rename to config/appconfig-standard/default_type
index 5212ca400bb8012f96cad3e63087a83d519734e4..a39710f7a4075edacd2a241390199d4ccbed6c5e 100644 (file)
@@ -1,3 +1,4 @@
 sysadm_r:sysadm_t
 staff_r:staff_t
+unconfined_r:unconfined_t
 user_r:user_t
diff --git a/config/appconfig-standard/root_default_contexts b/config/appconfig-standard/root_default_contexts
new file mode 100644 (file)
index 0000000..3806d33
--- /dev/null
@@ -0,0 +1,11 @@
+system_r:crond_t       unconfined_r:unconfined_t sysadm_r:sysadm_crond_t staff_r:staff_crond_t user_r:user_crond_t
+system_r:local_login_t  unconfined_r:unconfined_t sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
+
+staff_r:staff_su_t     unconfined_r:unconfined_t sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
+sysadm_r:sysadm_su_t   unconfined_r:unconfined_t sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
+user_r:user_su_t       unconfined_r:unconfined_t sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
+
+#
+# Uncomment if you want to automatically login as sysadm_r
+#
+#system_r:sshd_t       unconfined_r:unconfined_t sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
diff --git a/config/appconfig-strict-mcs/default_contexts b/config/appconfig-strict-mcs/default_contexts
deleted file mode 100644 (file)
index 7bf43ff..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-system_r:sulogin_t:s0  sysadm_r:sysadm_t:s0
-system_r:local_login_t:s0      staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0
-system_r:remote_login_t:s0     user_r:user_t:s0 staff_r:staff_t:s0
-system_r:sshd_t:s0             user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
-system_r:crond_t:s0    user_r:user_crond_t:s0 staff_r:staff_crond_t:s0 sysadm_r:sysadm_crond_t:s0 system_r:system_crond_t:s0 mailman_r:user_crond_t:s0
-system_r:xdm_t:s0              staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-staff_r:staff_su_t:s0  staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-sysadm_r:sysadm_su_t:s0        staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-user_r:user_su_t:s0    staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-sysadm_r:sysadm_sudo_t:s0      sysadm_r:sysadm_t:s0
-staff_r:staff_sudo_t:s0        sysadm_r:sysadm_t:s0 staff_r:staff_t:s0
-user_r:user_sudo_t:s0  sysadm_r:sysadm_t:s0 user_r:user_t:s0
diff --git a/config/appconfig-strict-mcs/root_default_contexts b/config/appconfig-strict-mcs/root_default_contexts
deleted file mode 100644 (file)
index e9d95e8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-system_r:local_login_t:s0  sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-system_r:crond_t:s0    sysadm_r:sysadm_crond_t:s0 staff_r:staff_crond_t:s0 user_r:user_crond_t:s0
-staff_r:staff_su_t:s0  sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-sysadm_r:sysadm_su_t:s0        sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-user_r:user_su_t:s0    sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-#
-# Uncomment if you want to automatically login as sysadm_r
-#
-#system_r:sshd_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
diff --git a/config/appconfig-strict-mls/default_contexts b/config/appconfig-strict-mls/default_contexts
deleted file mode 100644 (file)
index 7bf43ff..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-system_r:sulogin_t:s0  sysadm_r:sysadm_t:s0
-system_r:local_login_t:s0      staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0
-system_r:remote_login_t:s0     user_r:user_t:s0 staff_r:staff_t:s0
-system_r:sshd_t:s0             user_r:user_t:s0 staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
-system_r:crond_t:s0    user_r:user_crond_t:s0 staff_r:staff_crond_t:s0 sysadm_r:sysadm_crond_t:s0 system_r:system_crond_t:s0 mailman_r:user_crond_t:s0
-system_r:xdm_t:s0              staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-staff_r:staff_su_t:s0  staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-sysadm_r:sysadm_su_t:s0        staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-user_r:user_su_t:s0    staff_r:staff_t:s0 user_r:user_t:s0 sysadm_r:sysadm_t:s0 
-sysadm_r:sysadm_sudo_t:s0      sysadm_r:sysadm_t:s0
-staff_r:staff_sudo_t:s0        sysadm_r:sysadm_t:s0 staff_r:staff_t:s0
-user_r:user_sudo_t:s0  sysadm_r:sysadm_t:s0 user_r:user_t:s0
diff --git a/config/appconfig-strict-mls/root_default_contexts b/config/appconfig-strict-mls/root_default_contexts
deleted file mode 100644 (file)
index e9d95e8..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-system_r:local_login_t:s0  sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-system_r:crond_t:s0    sysadm_r:sysadm_crond_t:s0 staff_r:staff_crond_t:s0 user_r:user_crond_t:s0
-staff_r:staff_su_t:s0  sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-sysadm_r:sysadm_su_t:s0        sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-user_r:user_su_t:s0    sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
-#
-# Uncomment if you want to automatically login as sysadm_r
-#
-#system_r:sshd_t:s0 sysadm_r:sysadm_t:s0 staff_r:staff_t:s0 user_r:user_t:s0
diff --git a/config/appconfig-strict/default_contexts b/config/appconfig-strict/default_contexts
deleted file mode 100644 (file)
index 3ea48aa..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-system_r:sulogin_t     sysadm_r:sysadm_t
-system_r:local_login_t staff_r:staff_t user_r:user_t sysadm_r:sysadm_t
-system_r:remote_login_t        user_r:user_t staff_r:staff_t
-system_r:sshd_t                user_r:user_t staff_r:staff_t sysadm_r:sysadm_t
-system_r:crond_t               user_r:user_crond_t staff_r:staff_crond_t sysadm_r:sysadm_crond_t system_r:system_crond_t mailman_r:user_crond_t
-system_r:xdm_t         staff_r:staff_t user_r:user_t sysadm_r:sysadm_t 
-staff_r:staff_su_t     staff_r:staff_t user_r:user_t sysadm_r:sysadm_t 
-sysadm_r:sysadm_su_t   staff_r:staff_t user_r:user_t sysadm_r:sysadm_t 
-user_r:user_su_t               staff_r:staff_t user_r:user_t sysadm_r:sysadm_t 
-sysadm_r:sysadm_sudo_t sysadm_r:sysadm_t
-staff_r:staff_sudo_t   sysadm_r:sysadm_t staff_r:staff_t
-user_r:user_sudo_t     sysadm_r:sysadm_t user_r:user_t
diff --git a/config/appconfig-strict/root_default_contexts b/config/appconfig-strict/root_default_contexts
deleted file mode 100644 (file)
index acdcc08..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-system_r:local_login_t  sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
-system_r:crond_t       sysadm_r:sysadm_crond_t staff_r:staff_crond_t user_r:user_crond_t
-staff_r:staff_su_t     sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
-sysadm_r:sysadm_su_t   sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
-user_r:user_su_t       sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
-#
-# Uncomment if you want to automatically login as sysadm_r
-#
-#system_r:sshd_t sysadm_r:sysadm_t staff_r:staff_t user_r:user_t
diff --git a/config/appconfig-targeted-mcs/dbus_contexts b/config/appconfig-targeted-mcs/dbus_contexts
deleted file mode 100644 (file)
index 116e684..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-  <selinux>
-  </selinux>
-</busconfig>
diff --git a/config/appconfig-targeted-mcs/default_contexts b/config/appconfig-targeted-mcs/default_contexts
deleted file mode 100644 (file)
index b3dddce..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-system_r:crond_t:s0            system_r:unconfined_t:s0
-system_r:initrc_t:s0           system_r:unconfined_t:s0
-system_r:local_login_t:s0      system_r:unconfined_t:s0
-system_r:remote_login_t:s0     system_r:unconfined_t:s0
-system_r:rshd_t:s0             system_r:unconfined_t:s0
-system_r:sshd_t:s0             system_r:unconfined_t:s0
-system_r:sysadm_su_t:s0                system_r:unconfined_t:s0
-system_r:unconfined_t:s0       system_r:unconfined_t:s0
-system_r:xdm_t:s0              system_r:unconfined_t:s0
diff --git a/config/appconfig-targeted-mcs/default_type b/config/appconfig-targeted-mcs/default_type
deleted file mode 100644 (file)
index 7ba74a9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_r:unconfined_t
diff --git a/config/appconfig-targeted-mcs/failsafe_context b/config/appconfig-targeted-mcs/failsafe_context
deleted file mode 100644 (file)
index 30fd6c0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_r:unconfined_t:s0
diff --git a/config/appconfig-targeted-mcs/initrc_context b/config/appconfig-targeted-mcs/initrc_context
deleted file mode 100644 (file)
index f185cd4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-user_u:system_r:initrc_t:s0
diff --git a/config/appconfig-targeted-mcs/media b/config/appconfig-targeted-mcs/media
deleted file mode 100644 (file)
index 81f3463..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-cdrom system_u:object_r:removable_device_t:s0
-floppy system_u:object_r:removable_device_t:s0
-disk system_u:object_r:fixed_disk_device_t:s0
diff --git a/config/appconfig-targeted-mcs/removable_context b/config/appconfig-targeted-mcs/removable_context
deleted file mode 100644 (file)
index 7fcc56e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_u:object_r:removable_t:s0
diff --git a/config/appconfig-targeted-mcs/root_default_contexts b/config/appconfig-targeted-mcs/root_default_contexts
deleted file mode 100644 (file)
index 7326fba..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-system_r:unconfined_t:s0       system_r:unconfined_t:s0
-system_r:initrc_t:s0   system_r:unconfined_t:s0
diff --git a/config/appconfig-targeted-mcs/seusers b/config/appconfig-targeted-mcs/seusers
deleted file mode 100644 (file)
index ce614b4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-root:root:s0-mcs_systemhigh
-__default__:user_u:s0
diff --git a/config/appconfig-targeted-mcs/userhelper_context b/config/appconfig-targeted-mcs/userhelper_context
deleted file mode 100644 (file)
index 01f02a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_u:system_r:unconfined_t:s0      
diff --git a/config/appconfig-targeted-mls/dbus_contexts b/config/appconfig-targeted-mls/dbus_contexts
deleted file mode 100644 (file)
index 116e684..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-  <selinux>
-  </selinux>
-</busconfig>
diff --git a/config/appconfig-targeted-mls/default_contexts b/config/appconfig-targeted-mls/default_contexts
deleted file mode 100644 (file)
index b3dddce..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-system_r:crond_t:s0            system_r:unconfined_t:s0
-system_r:initrc_t:s0           system_r:unconfined_t:s0
-system_r:local_login_t:s0      system_r:unconfined_t:s0
-system_r:remote_login_t:s0     system_r:unconfined_t:s0
-system_r:rshd_t:s0             system_r:unconfined_t:s0
-system_r:sshd_t:s0             system_r:unconfined_t:s0
-system_r:sysadm_su_t:s0                system_r:unconfined_t:s0
-system_r:unconfined_t:s0       system_r:unconfined_t:s0
-system_r:xdm_t:s0              system_r:unconfined_t:s0
diff --git a/config/appconfig-targeted-mls/default_type b/config/appconfig-targeted-mls/default_type
deleted file mode 100644 (file)
index 7ba74a9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_r:unconfined_t
diff --git a/config/appconfig-targeted-mls/failsafe_context b/config/appconfig-targeted-mls/failsafe_context
deleted file mode 100644 (file)
index 30fd6c0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_r:unconfined_t:s0
diff --git a/config/appconfig-targeted-mls/initrc_context b/config/appconfig-targeted-mls/initrc_context
deleted file mode 100644 (file)
index 13645ea..0000000
+++ /dev/null
@@ -1 +0,0 @@
-user_u:system_r:initrc_t:s0-mls_systemhigh
diff --git a/config/appconfig-targeted-mls/media b/config/appconfig-targeted-mls/media
deleted file mode 100644 (file)
index 81f3463..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-cdrom system_u:object_r:removable_device_t:s0
-floppy system_u:object_r:removable_device_t:s0
-disk system_u:object_r:fixed_disk_device_t:s0
diff --git a/config/appconfig-targeted-mls/removable_context b/config/appconfig-targeted-mls/removable_context
deleted file mode 100644 (file)
index 7fcc56e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_u:object_r:removable_t:s0
diff --git a/config/appconfig-targeted-mls/root_default_contexts b/config/appconfig-targeted-mls/root_default_contexts
deleted file mode 100644 (file)
index 7326fba..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-system_r:unconfined_t:s0       system_r:unconfined_t:s0
-system_r:initrc_t:s0   system_r:unconfined_t:s0
diff --git a/config/appconfig-targeted-mls/seusers b/config/appconfig-targeted-mls/seusers
deleted file mode 100644 (file)
index 4e500b0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-root:root:s0-mls_systemhigh
-__default__:user_u:s0
diff --git a/config/appconfig-targeted-mls/userhelper_context b/config/appconfig-targeted-mls/userhelper_context
deleted file mode 100644 (file)
index 01f02a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_u:system_r:unconfined_t:s0      
diff --git a/config/appconfig-targeted/dbus_contexts b/config/appconfig-targeted/dbus_contexts
deleted file mode 100644 (file)
index 116e684..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-  <selinux>
-  </selinux>
-</busconfig>
diff --git a/config/appconfig-targeted/default_contexts b/config/appconfig-targeted/default_contexts
deleted file mode 100644 (file)
index d91373a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-system_r:crond_t               system_r:unconfined_t
-system_r:initrc_t              system_r:unconfined_t
-system_r:local_login_t         system_r:unconfined_t
-system_r:remote_login_t                system_r:unconfined_t
-system_r:rshd_t                        system_r:unconfined_t
-system_r:sshd_t                        system_r:unconfined_t
-system_r:sysadm_su_t           system_r:unconfined_t
-system_r:unconfined_t          system_r:unconfined_t
-system_r:xdm_t                 system_r:unconfined_t
diff --git a/config/appconfig-targeted/default_type b/config/appconfig-targeted/default_type
deleted file mode 100644 (file)
index 7ba74a9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_r:unconfined_t
diff --git a/config/appconfig-targeted/failsafe_context b/config/appconfig-targeted/failsafe_context
deleted file mode 100644 (file)
index 7ba74a9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_r:unconfined_t
diff --git a/config/appconfig-targeted/initrc_context b/config/appconfig-targeted/initrc_context
deleted file mode 100644 (file)
index 505f810..0000000
+++ /dev/null
@@ -1 +0,0 @@
-user_u:system_r:initrc_t
diff --git a/config/appconfig-targeted/media b/config/appconfig-targeted/media
deleted file mode 100644 (file)
index de2a652..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-cdrom system_u:object_r:removable_device_t
-floppy system_u:object_r:removable_device_t
-disk system_u:object_r:fixed_disk_device_t
diff --git a/config/appconfig-targeted/removable_context b/config/appconfig-targeted/removable_context
deleted file mode 100644 (file)
index d4921f0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_u:object_r:removable_t
diff --git a/config/appconfig-targeted/root_default_contexts b/config/appconfig-targeted/root_default_contexts
deleted file mode 100644 (file)
index 5e3e986..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-system_r:unconfined_t  system_r:unconfined_t
-system_r:initrc_t      system_r:unconfined_t
diff --git a/config/appconfig-targeted/seusers b/config/appconfig-targeted/seusers
deleted file mode 100644 (file)
index f7c5bd2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-root:root
-__default__:user_u
diff --git a/config/appconfig-targeted/userhelper_context b/config/appconfig-targeted/userhelper_context
deleted file mode 100644 (file)
index 4d47460..0000000
+++ /dev/null
@@ -1 +0,0 @@
-system_u:system_r:unconfined_t 
index c1cb375ea1fae3c7f8e58fcc9248d5282dbaaa93..2e58eada18ae3fa6082d1acd880d9f10166edb97 100644 (file)
 #
 # SELinux process identity change constraint:
 #
-ifdef(`strict_policy',`
-       constrain process transition
-       (
-               u1 == u2
-
-               or ( t1 == can_change_process_identity and t2 == process_user_target )
-
-               or ( t1 == cron_source_domain and ( t2 == cron_job_domain or u2 == system_u ) )
+constrain process transition
+(
+       u1 == u2
 
-               or ( t1 == can_system_change and u2 == system_u )
+       or ( t1 == can_change_process_identity and t2 == process_user_target )
 
-               or ( t1 == process_uncond_exempt )
-       );
-')
+               or ( t1 == cron_source_domain and ( t2 == cron_job_domain or u2 == system_u ) )
 
-ifdef(`targeted_policy',`
-       constrain process transition
-       (
-               u1 == u2
+       or ( t1 == can_system_change and u2 == system_u )
 
-               or t1 == can_change_process_identity
-       );
-')
+       or ( t1 == process_uncond_exempt )
+);
 
 #
 # SELinux process role change constraint:
 #
+constrain process transition 
+(
+       r1 == r2 
 
-ifdef(`strict_policy',`
-       constrain process transition 
-       (
-               r1 == r2 
-
-               or ( t1 == can_change_process_role and t2 == process_user_target )
-
-                       or ( t1 == cron_source_domain and t2 == cron_job_domain )
-
-               or ( t1 == can_system_change and r2 == system_r )
+       or ( t1 == can_change_process_role and t2 == process_user_target )
 
-               or ( t1 == process_uncond_exempt )
-       );
-')
+       or ( t1 == cron_source_domain and t2 == cron_job_domain )
 
-ifdef(`targeted_policy',`
-       constrain process transition 
-       (
-               r1 == r2 
+       or ( t1 == can_system_change and r2 == system_r )
 
-               or t1 == can_change_process_role
-       );
-')
+       or ( t1 == process_uncond_exempt )
+);
 
 #
 # SELinux dynamic transition constraint:
index 844fc7817e8a0293329f9dc7bc317b59dd45b27e..111d004caf3b79f25b7e799529be093546e5a981 100644 (file)
@@ -4,7 +4,6 @@
 # file should be used.
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Enabling secure mode disallows programs, such as
@@ -13,7 +12,6 @@ ifdef(`strict_policy',`
 ## </p>
 ## </desc>
 gen_bool(secure_mode,false)
-')
 
 ## <desc>
 ## <p>
index 9a44314798aad4017c69f7b64d33df47acce28fd..7a1d85dca38272b2b3e1738f8b80d7d3afb80e83 100644 (file)
@@ -4,11 +4,6 @@
 # file should be used.
 #
 
-########################################
-#
-# Common tunables
-#
-
 ## <desc>
 ## <p>
 ## Allow making the heap executable.
@@ -67,6 +62,15 @@ gen_tunable(allow_ypbind,false)
 ## </desc>
 gen_tunable(global_ssp,false)
 
+## <desc>
+## <p>
+## Allow email client to various content.
+## nfs, samba, removable devices, user temp
+## and untrusted content files
+## </p>
+## </desc>
+gen_tunable(mail_read_content,false)
+
 ## <desc>
 ## <p>
 ## Allow nfs to be exported read/write.
@@ -90,41 +94,26 @@ gen_tunable(read_default_t,false)
 
 ## <desc>
 ## <p>
-## Support NFS home directories
-## </p>
-## </desc>
-gen_tunable(use_nfs_home_dirs,false)
-
-## <desc>
-## <p>
-## Support SAMBA home directories
+## Allow applications to read untrusted content
+## If this is disallowed, Internet content has
+## to be manually relabeled for read access to be granted
 ## </p>
 ## </desc>
-gen_tunable(use_samba_home_dirs,false)
-
-########################################
-#
-# Strict policy specific
-#
+gen_tunable(read_untrusted_content,false)
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
-## Allow email client to various content.
-## nfs, samba, removable devices, user temp
-## and untrusted content files
+## Support NFS home directories
 ## </p>
 ## </desc>
-gen_tunable(mail_read_content,false)
+gen_tunable(use_nfs_home_dirs,false)
 
 ## <desc>
 ## <p>
-## Allow applications to read untrusted content
-## If this is disallowed, Internet content has
-## to be manually relabeled for read access to be granted
+## Support SAMBA home directories
 ## </p>
 ## </desc>
-gen_tunable(read_untrusted_content,false)
+gen_tunable(use_samba_home_dirs,false)
 
 ## <desc>
 ## <p>
@@ -143,4 +132,3 @@ gen_tunable(user_tcp_server,false)
 ## </p>
 ## </desc>
 gen_tunable(write_untrusted_content,false)
-')
index 0529bb813008a2192fe62414de7d5d86ef10fdf0..5e34a60b57b5a500955deb311d34a56a974070a4 100644 (file)
@@ -69,12 +69,6 @@ miscfiles_read_localization(acct_t)
 userdom_dontaudit_search_sysadm_home_dirs(acct_t)
 userdom_dontaudit_use_unpriv_user_fds(acct_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(acct_t)
-       term_dontaudit_use_generic_ptys(acct_t)
-       files_dontaudit_read_root_files(acct_t)
-')
-
 optional_policy(`
        optional_policy(`
                # for monthly cron job
index 15a6c9845aad22310fdd32815ea0f5808cc00d70..5d2144344b1757fbd1a5e814633dd370e0425114 100644 (file)
@@ -113,10 +113,6 @@ seutil_use_newrole_fds(apt_t)
 
 sysnet_read_config(apt_t)
 
-ifdef(`targeted_policy',`
-       unconfined_domain(apt_t)
-')
-
 # with boolean, for cron-apt and such?
 #optional_policy(`
 #      cron_system_entry(apt_t,apt_exec_t)
@@ -137,3 +133,7 @@ optional_policy(`
        rpm_read_db(apt_t)
        rpm_domtrans(apt_t)
 ')
+
+optional_policy(`
+       unconfined_domain(apt_t)
+')
index 308dce2ed61ed579231c7a5468143d8ae0c6b3cc..c93344dbbe3f10539c99b519c76f671102eb4e41 100644 (file)
@@ -174,11 +174,6 @@ ifdef(`distro_redhat',`
        mount_domtrans(bootloader_t)
 ')
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(bootloader_t)
-       term_use_generic_ptys(bootloader_t)
-')
-
 optional_policy(`
        fstools_exec(bootloader_t)
 ')
index 133cd2d020104853602454b85fecc2cb9fab21c9..98c54b54a6ceb6db358e676a47adc44baa36532c 100644 (file)
@@ -37,11 +37,6 @@ libs_use_shared_libs(brctl_t)
 
 miscfiles_read_localization(brctl_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(brctl_t)
-       term_dontaudit_use_generic_ptys(brctl_t)
-')
-
 optional_policy(`
        xen_append_log(brctl_t)
 ')
index 299f21f58db45b9becf59c9d4e607d1c5860cc31..400100d48ffda117b929b3c12c0e82586d9c173a 100644 (file)
@@ -10,14 +10,9 @@ type consoletype_t;
 type consoletype_exec_t;
 application_executable_file(consoletype_exec_t)
 init_domain(consoletype_t,consoletype_exec_t)
-mls_file_read_all_levels(consoletype_t)
-mls_file_write_all_levels(consoletype_t)
+init_system_domain(consoletype_t,consoletype_exec_t)
 role system_r types consoletype_t;
 
-ifdef(`targeted_policy',`',`
-       init_system_domain(consoletype_t,consoletype_exec_t)
-')
-
 ########################################
 #
 # Local declarations
@@ -44,6 +39,9 @@ fs_getattr_all_fs(consoletype_t)
 fs_search_auto_mountpoints(consoletype_t)
 fs_write_nfs_files(consoletype_t)
 
+mls_file_read_all_levels(consoletype_t)
+mls_file_write_all_levels(consoletype_t)
+
 term_use_console(consoletype_t)
 term_use_unallocated_ttys(consoletype_t)
 
@@ -60,10 +58,6 @@ files_list_usr(consoletype_t)
 libs_use_ld_so(consoletype_t)
 libs_use_shared_libs(consoletype_t)
 
-userdom_use_sysadm_terms(consoletype_t)
-userdom_use_sysadm_fds(consoletype_t)
-userdom_rw_sysadm_pipes(consoletype_t)
-
 ifdef(`distro_redhat',`
        fs_rw_tmpfs_chr_files(consoletype_t)
 ')
index dc2a3b635e92d328eda0b6a8df9a925928464e67..71081a8a092e87b22f7b25f11b5a5fe8dd80ce2c 100644 (file)
 ## </param>
 #
 interface(`dmesg_domtrans',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type dmesg_exec_t;
-               ')
-
-               # $0(): disabled in targeted policy as there
-               # is no dmesg domain.
-       ',`
-               gen_require(`
-                       type dmesg_t, dmesg_exec_t;
-               ')
-
-               corecmd_search_bin($1)
-               domain_auto_trans($1,dmesg_exec_t,dmesg_t)
-
-               allow $1 dmesg_t:fd use;
-               allow dmesg_t $1:fd use;
-               allow dmesg_t $1:fifo_file rw_file_perms;
-               allow dmesg_t $1:process sigchld;
+       gen_require(`
+               type dmesg_t, dmesg_exec_t;
        ')
+
+       corecmd_search_bin($1)
+       domtrans_pattern($1, dmesg_exec_t, dmesg_t)
 ')
 
 ########################################
@@ -45,16 +31,10 @@ interface(`dmesg_domtrans',`
 ## <rolecap/>
 #
 interface(`dmesg_exec',`
-       ifdef(`targeted_policy',`
-               # $0(): the dmesg program is an alias
-               # of generic bin programs.
-               corecmd_exec_bin($1)
-       ',`
-               gen_require(`
-                       type dmesg_exec_t;
-               ')
-
-               corecmd_search_bin($1)
-               can_exec($1,dmesg_exec_t)
+       gen_require(`
+               type dmesg_exec_t;
        ')
+
+       corecmd_search_bin($1)
+       can_exec($1,dmesg_exec_t)
 ')
index 150feec498f3880a6d5c3747096d58cd6fcf9c16..7d31ea088dd0b4b48f5746654f6f04a5b773cd5e 100644 (file)
@@ -6,69 +6,57 @@ policy_module(dmesg,1.0.0)
 # Declarations
 #
 
-ifdef(`strict_policy',`
-       type dmesg_t;
-       type dmesg_exec_t;
-       init_system_domain(dmesg_t,dmesg_exec_t)
-       role system_r types dmesg_t;
-')
-
-ifdef(`targeted_policy',`
-       # dmesg domain is disabled in the 
-       # targeted policy. for compatibility
-       # with strict:
-       corecmd_bin_alias(dmesg_exec_t)
-')
+type dmesg_t;
+type dmesg_exec_t;
+init_system_domain(dmesg_t,dmesg_exec_t)
 
 ########################################
 #
 # Local policy
 #
 
-ifdef(`strict_policy',`
-       allow dmesg_t self:capability sys_admin;
-       dontaudit dmesg_t self:capability sys_tty_config;
+allow dmesg_t self:capability sys_admin;
+dontaudit dmesg_t self:capability sys_tty_config;
 
-       allow dmesg_t self:process signal_perms;
+allow dmesg_t self:process signal_perms;
 
-       kernel_read_kernel_sysctls(dmesg_t)
-       kernel_read_ring_buffer(dmesg_t)
-       kernel_clear_ring_buffer(dmesg_t)
-       kernel_change_ring_buffer_level(dmesg_t)
-       kernel_list_proc(dmesg_t)
-       kernel_read_proc_symlinks(dmesg_t)
+kernel_read_kernel_sysctls(dmesg_t)
+kernel_read_ring_buffer(dmesg_t)
+kernel_clear_ring_buffer(dmesg_t)
+kernel_change_ring_buffer_level(dmesg_t)
+kernel_list_proc(dmesg_t)
+kernel_read_proc_symlinks(dmesg_t)
 
-       dev_read_sysfs(dmesg_t)
+dev_read_sysfs(dmesg_t)
 
-       fs_search_auto_mountpoints(dmesg_t)
+fs_search_auto_mountpoints(dmesg_t)
 
-       term_dontaudit_use_console(dmesg_t)
+term_dontaudit_use_console(dmesg_t)
 
-       domain_use_interactive_fds(dmesg_t)
+domain_use_interactive_fds(dmesg_t)
 
-       files_list_etc(dmesg_t)
-       # for when /usr is not mounted:
-       files_dontaudit_search_isid_type_dirs(dmesg_t)
+files_list_etc(dmesg_t)
+# for when /usr is not mounted:
+files_dontaudit_search_isid_type_dirs(dmesg_t)
 
-       init_use_fds(dmesg_t)
-       init_use_script_ptys(dmesg_t)
+init_use_fds(dmesg_t)
+init_use_script_ptys(dmesg_t)
 
-       libs_use_ld_so(dmesg_t)
-       libs_use_shared_libs(dmesg_t)
+libs_use_ld_so(dmesg_t)
+libs_use_shared_libs(dmesg_t)
 
-       logging_send_syslog_msg(dmesg_t)
-       logging_write_generic_logs(dmesg_t)
+logging_send_syslog_msg(dmesg_t)
+logging_write_generic_logs(dmesg_t)
 
-       miscfiles_read_localization(dmesg_t)
+miscfiles_read_localization(dmesg_t)
 
-       userdom_use_sysadm_terms(dmesg_t)
-       userdom_dontaudit_use_unpriv_user_fds(dmesg_t)
+userdom_use_sysadm_terms(dmesg_t)
+userdom_dontaudit_use_unpriv_user_fds(dmesg_t)
 
-       optional_policy(`
-               seutil_sigchld_newrole(dmesg_t)
-       ')
+optional_policy(`
+       seutil_sigchld_newrole(dmesg_t)
+')
 
-       optional_policy(`
-               udev_read_db(dmesg_t)
-       ')
+optional_policy(`
+       udev_read_db(dmesg_t)
 ')
index e7f5a84d6d99aa607b05f562abe1a3ce4e4873fd..1e170fc99311721bedbe481074a0632a22e24cfb 100644 (file)
@@ -31,8 +31,3 @@ libs_use_ld_so(dmidecode_t)
 libs_use_shared_libs(dmidecode_t)
 
 locallogin_use_fds(dmidecode_t)
-
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(dmidecode_t)
-       term_use_unallocated_ttys(dmidecode_t)
-')
index 170bb4f5a25f16fb76d4dcc5c7f35e27fb32be7b..829e2114955b05d7846bb16cb80c8c161356b919 100644 (file)
@@ -172,10 +172,6 @@ dpkg_domtrans_script(dpkg_t)
 # since the scripts aren't labeled correctly yet...
 allow dpkg_t dpkg_var_lib_t:file execute;
 
-ifdef(`targeted_policy',`
-       unconfined_domain(dpkg_t)
-')
-
 # TODO: allow?
 #optional_policy(`
 #      cron_system_entry(dpkg_t,dpkg_exec_t)
@@ -185,6 +181,10 @@ optional_policy(`
        nis_use_ypbind(dpkg_t)
 ')
 
+optional_policy(`
+       unconfined_domain(dpkg_t)
+')
+
 # TODO: the following was copied from dpkg_script_t, and could probably
 # be removed again when dpkg_script_t is actually used...
 domain_signal_all_domains(dpkg_t)
@@ -309,22 +309,14 @@ seutil_domtrans_setfiles(dpkg_script_t)
 
 userdom_use_all_users_fds(dpkg_script_t)
 
-ifdef(`distro_redhat',`
-       unconfined_domain(dpkg_script_t)
-')
-
-ifdef(`targeted_policy',`
-       unconfined_domain(dpkg_script_t)
-',`
-       optional_policy(`
-               bootloader_domtrans(dpkg_script_t)
-       ')
-')
-
 tunable_policy(`allow_execmem',`
        allow dpkg_script_t self:process execmem;
 ')
 
+optional_policy(`
+       bootloader_domtrans(dpkg_script_t)
+')
+
 optional_policy(`
        mta_send_mail(dpkg_script_t)
 ')
@@ -333,6 +325,10 @@ optional_policy(`
        nis_use_ypbind(dpkg_script_t)
 ')
 
+optional_policy(`
+       unconfined_domain(dpkg_script_t)
+')
+
 optional_policy(`
        usermanage_domtrans_groupadd(dpkg_script_t)
        usermanage_domtrans_useradd(dpkg_script_t)
index abde741f15b8fd8fa06d0bd126706a602987eb48..c61592b9323eb13ff30f56be213c61a448c8bbb5 100644 (file)
@@ -96,10 +96,6 @@ userdom_manage_generic_user_home_content_sockets(firstboot_t)
 userdom_home_filetrans_generic_user_home_dir(firstboot_t)
 userdom_generic_user_home_dir_filetrans_generic_user_home_content(firstboot_t,{ dir file lnk_file fifo_file sock_file })
 
-ifdef(`targeted_policy',`
-       unconfined_domtrans(firstboot_t)
-')
-
 optional_policy(`
        hal_dbus_chat(firstboot_t)
 ')
@@ -112,6 +108,10 @@ optional_policy(`
        samba_rw_config(firstboot_t)
 ')
 
+optional_policy(`
+       unconfined_domtrans(firstboot_t)
+')
+
 optional_policy(`
        usermanage_domtrans_chfn(firstboot_t)
        usermanage_domtrans_groupadd(firstboot_t)
index fb51cb35b302f4d94fd790b8a1ea53e7a3e0bccb..a9960437a0a14714e4e28784c4ae04726a343ffe 100644 (file)
@@ -125,19 +125,6 @@ sysnet_read_config(kudzu_t)
 userdom_search_sysadm_home_dirs(kudzu_t)
 userdom_dontaudit_use_unpriv_user_fds(kudzu_t)
 
-ifdef(`targeted_policy',`
-        term_dontaudit_use_unallocated_ttys(kudzu_t)
-        term_dontaudit_use_generic_ptys(kudzu_t)
-        files_dontaudit_read_root_files(kudzu_t)
-
-       # cjp: this was originally in the else block
-       # of ifdef userhelper.te, but it seems to
-       # make more sense here.  also, require
-       # blocks curently do not work in the
-       # else block of optionals
-       unconfined_domain(kudzu_t)
-')
-
 optional_policy(`
        gpm_getattr_gpmctl(kudzu_t)
 ')
@@ -154,6 +141,15 @@ optional_policy(`
         udev_read_db(kudzu_t)
 ')
 
+optional_policy(`
+       # cjp: this was originally in the else block
+       # of ifdef userhelper.te, but it seems to
+       # make more sense here.  also, require
+       # blocks curently do not work in the
+       # else block of optionals
+       unconfined_domain(kudzu_t)
+')
+
 ifdef(`TODO',`
 allow kudzu_t modules_conf_t:file unlink;
 optional_policy(`
index 4128ad5e938576180d57179ad35faa4491118608..b02a0d36e9c632338c1d7db14fa41cbbdf58dab1 100644 (file)
@@ -126,12 +126,6 @@ ifdef(`distro_redhat',`
        filetrans_pattern(mrtg_t,mrtg_etc_t,mrtg_lock_t,file)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(mrtg_t)
-       term_dontaudit_use_generic_ptys(mrtg_t)
-       files_dontaudit_read_root_files(mrtg_t)
-')
-
 optional_policy(`
        apache_manage_sys_content(mrtg_t)
 ')
index e8915d4c3eef2504274474ece9562a6224f3f301..985d9572a36af6726d097e11db6cdff223fe82eb 100644 (file)
@@ -6,14 +6,12 @@ policy_module(netutils,1.5.0)
 # Declarations
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Control users use of ping and traceroute
 ## </p>
 ## </desc>
 gen_tunable(user_ping,false)
-')
 
 type netutils_t;
 type netutils_exec_t;
@@ -91,11 +89,6 @@ sysnet_read_config(netutils_t)
 
 userdom_use_all_users_fds(netutils_t)
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(netutils_t)
-       term_use_unallocated_ttys(netutils_t)
-')
-
 optional_policy(`
        nis_use_ypbind(netutils_t)
 ')
@@ -144,16 +137,9 @@ ifdef(`hide_broken_symptoms',`
        init_dontaudit_use_fds(ping_t)
 ')
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(ping_t)
-       term_use_generic_ptys(ping_t)
+tunable_policy(`user_ping',`
        term_use_all_user_ttys(ping_t)
        term_use_all_user_ptys(ping_t)
-',`
-       tunable_policy(`user_ping',`
-               term_use_all_user_ttys(ping_t)
-               term_use_all_user_ptys(ping_t)
-       ')
 ')
 
 optional_policy(`
@@ -228,14 +214,9 @@ files_read_usr_files(traceroute_t)
 
 sysnet_read_config(traceroute_t)
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(traceroute_t)
-       term_use_generic_ptys(traceroute_t)
-',`
-       tunable_policy(`user_ping',`
-               term_use_all_user_ttys(traceroute_t)
-               term_use_all_user_ptys(traceroute_t)
-       ')
+tunable_policy(`user_ping',`
+       term_use_all_user_ttys(traceroute_t)
+       term_use_all_user_ptys(traceroute_t)
 ')
 
 optional_policy(`
index 30c9dd020d642ddc45fac12cc47dc66f9dd9cf6f..e99dc8ce15a28dd09adf60325cf1c9f95edb1509 100644 (file)
@@ -104,7 +104,6 @@ libs_use_shared_libs(gcc_config_t)
 libs_read_lib_files(gcc_config_t)
 libs_domtrans_ldconfig(gcc_config_t)
 libs_manage_shared_libs(gcc_config_t)
-lib_filetrans_shared_lib(gcc_config_t,file)
 # gcc-config creates a temp dir for the libs
 libs_manage_lib_dirs(gcc_config_t)
 
index 78151ee4c4fa5d7781eed19204a8754a0ea50e22..cd667b6bd3700b1ba033766ab8ac88e39aebf90e 100644 (file)
@@ -19,6 +19,37 @@ interface(`prelink_domtrans',`
        domtrans_pattern($1, prelink_exec_t, prelink_t)
 ')
 
+########################################
+## <summary>
+##     Execute the prelink program in the prelink domain.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+## <param name="role">
+##     <summary>
+##     The role to allow the prelink domain.
+##     </summary>
+## </param>
+## <param name="terminal">
+##     <summary>
+##     The type of the terminal allow the prelink domain to use.
+##     </summary>
+## </param>
+## <rolecap/>
+#
+interface(`prelink_run',`
+       gen_require(`
+               type prelink_t;
+       ')
+
+       prelink_domtrans($1)
+       role $2 types prelink_t;
+       allow prelink_t $3:chr_file rw_term_perms;
+')
+
 ########################################
 ## <summary>
 ##     Make the specified file type prelinkable.
index 1a8d3f232978f0a6aa680c2ac821e60e84328d04..039d92f39cf0de804e38637308edaedea77a49ed 100644 (file)
@@ -77,23 +77,10 @@ libs_relabel_ld_so(prelink_t)
 libs_use_shared_libs(prelink_t)
 libs_manage_shared_libs(prelink_t)
 libs_relabel_shared_libs(prelink_t)
-libs_use_lib_files(prelink_t)
-libs_manage_lib_files(prelink_t)
-libs_relabel_lib_files(prelink_t)
 libs_delete_lib_symlinks(prelink_t)
 
 miscfiles_read_localization(prelink_t)
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(prelink_t)
-       term_use_generic_ptys(prelink_t)
-
-       # prelink executables in the user homedir
-       userdom_manage_generic_user_home_content_files(prelink_t)
-       userdom_mmap_generic_user_home_content_files(prelink_t)
-       userdom_dontaudit_relabel_generic_user_home_content_files(prelink_t)
-')
-
 optional_policy(`
        amanda_manage_lib(prelink_t)
 ')
index c52b0d2f55918d16c1288edf11ce58db676b21c3..57b4f4c90614e02f3da862b424f6311a2b0ed552 100644 (file)
@@ -77,12 +77,6 @@ logging_send_syslog_msg(quota_t)
 
 userdom_dontaudit_use_unpriv_user_fds(quota_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(quota_t)
-       term_dontaudit_use_generic_ptys(quota_t)
-       files_dontaudit_read_root_files(quota_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(quota_t)
 ')
index beccc8a1fef0cb26a2426825ed68236f1200ac54..db35cc46ad2bb1aa43d84601f71f74b0c7067d08 100644 (file)
@@ -81,12 +81,6 @@ miscfiles_read_localization(readahead_t)
 userdom_dontaudit_use_unpriv_user_fds(readahead_t)
 userdom_dontaudit_search_sysadm_home_dirs(readahead_t)
 
-ifdef(`targeted_policy',`
-       files_dontaudit_read_root_files(readahead_t)
-       term_dontaudit_use_unallocated_ttys(readahead_t)
-       term_dontaudit_use_generic_ptys(readahead_t)
-')
-
 optional_policy(`
        cron_system_entry(readahead_t, readahead_exec_t)
 ')
index 762f51918239ea8f5258c5f67346c61d724bf885..56574ff90096ac5e7b913eea073052567167a310 100644 (file)
@@ -71,6 +71,9 @@ allow rpm_t self:msg { send receive };
 allow rpm_t self:dir search;
 allow rpm_t self:file rw_file_perms;;
 
+allow rpm_t rpm_log_t:file manage_file_perms;
+logging_log_filetrans(rpm_t,rpm_log_t,file)
+
 manage_dirs_pattern(rpm_t,rpm_tmp_t,rpm_tmp_t)
 manage_files_pattern(rpm_t,rpm_tmp_t,rpm_tmp_t)
 files_tmp_filetrans(rpm_t, rpm_tmp_t, { file dir })
@@ -172,22 +175,6 @@ sysnet_read_config(rpm_t)
 
 userdom_use_unpriv_users_fds(rpm_t)
 
-ifdef(`distro_redhat',`
-       unconfined_domain(rpm_t)
-')
-
-ifdef(`targeted_policy',`
-       unconfined_domain(rpm_t)
-       # yum-updatesd requires this
-       unconfined_dbus_chat(rpm_t)
-',`
-       # cjp: these are here to stop type_transition
-       # conflicts since rpm_t is an alias of
-       # unconfined in the targeted policy
-       allow rpm_t rpm_log_t:file manage_file_perms;
-       logging_log_filetrans(rpm_t,rpm_log_t,file)
-')
-
 optional_policy(`
        cron_system_entry(rpm_t,rpm_exec_t)
 ')
@@ -204,6 +191,12 @@ optional_policy(`
        prelink_domtrans(rpm_t)
 ')
 
+optional_policy(`
+       unconfined_domain(rpm_t)
+       # yum-updatesd requires this
+       unconfined_dbus_chat(rpm_t)
+')
+
 ifdef(`TODO',`
 # read/write/create any files in the system
 dontaudit rpm_t domain:{ socket unix_dgram_socket udp_socket unix_stream_socket tcp_socket fifo_file rawip_socket packet_socket } getattr;
@@ -331,26 +324,6 @@ seutil_domtrans_semanage(rpm_script_t)
 
 userdom_use_all_users_fds(rpm_script_t)
 
-ifdef(`distro_redhat',`
-       unconfined_domain(rpm_script_t)
-')
-
-ifdef(`targeted_policy',`
-       unconfined_domain(rpm_script_t)
-
-       optional_policy(`
-               java_domtrans(rpm_script_t)
-       ')
-
-       optional_policy(`
-               mono_domtrans(rpm_script_t)
-       ')
-
-       optional_policy(`
-               unconfined_domtrans(rpm_script_t)
-       ')
-')
-
 ifdef(`distro_redhat',`
        optional_policy(`
                mta_send_mail(rpm_script_t)
@@ -374,6 +347,19 @@ optional_policy(`
        tzdata_domtrans(rpm_script_t)
 ')
 
+optional_policy(`
+       unconfined_domain(rpm_script_t)
+       unconfined_domtrans(rpm_script_t)
+
+       optional_policy(`
+               java_domtrans(rpm_script_t)
+       ')
+
+       optional_policy(`
+               mono_domtrans(rpm_script_t)
+       ')
+')
+
 optional_policy(`
        usermanage_domtrans_groupadd(rpm_script_t)
        usermanage_domtrans_useradd(rpm_script_t)
index 6c337fa0f51241f0626cd2db98fb209c903c7b0e..28c5785c361d4b7a59655d2271fb8f8836942a16 100644 (file)
@@ -254,35 +254,20 @@ template(`su_per_role_template',`
                seutil_read_config($1_su_t)
                seutil_read_default_contexts($1_su_t)
 
-               ifdef(`strict_policy',`
-                       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)
-                       }
-               ')
-
-               ifdef(`targeted_policy',`
+               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(`targeted_policy',`
-               # allow user to suspend terminal.
-               # does not work in strict since the
-               # parent may not be able to use
-               # the terminal if we newrole,
-               # which relabels the terminal.
-               allow $1_su_t self:process sigstop;
-
-               corecmd_exec_bin($1_su_t)
-               userdom_manage_all_users_home_content_files($1_su_t)
-               userdom_manage_all_users_home_content_symlinks($1_su_t)
-       ')
-
        tunable_policy(`allow_polyinstantiation',`
                fs_mount_xattr_fs($1_su_t)
                fs_unmount_xattr_fs($1_su_t)
index 165f240b749136a3b6072bd71c01304d3348cdb6..2447b2512245f89787b0a828d744597b024fc2bc 100644 (file)
@@ -88,12 +88,6 @@ userdom_dontaudit_use_unpriv_user_fds(sxid_t)
 
 cron_system_entry(sxid_t,sxid_exec_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(sxid_t)
-       term_dontaudit_use_generic_ptys(sxid_t)
-       files_dontaudit_read_root_files(sxid_t)
-')
-
 optional_policy(`
        mta_send_mail(sxid_t)
 ')
index af803bf38286950dad8c2e03108c0ba683e74b4a..747bf4a2cfca84d64839408471ec84b78b2c1d5b 100644 (file)
@@ -17,3 +17,34 @@ interface(`tzdata_domtrans',`
 
        domtrans_pattern($1,tzdata_exec_t,tzdata_t)
 ')
+
+########################################
+## <summary>
+##     Execute the tzdata program in the tzdata domain.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+## <param name="role">
+##     <summary>
+##     The role to allow the tzdata domain.
+##     </summary>
+## </param>
+## <param name="terminal">
+##     <summary>
+##     The type of the terminal allow the tzdata domain to use.
+##     </summary>
+## </param>
+## <rolecap/>
+#
+interface(`tzdata_run',`
+       gen_require(`
+               type tzdata_t;
+       ')
+
+       tzdata_domtrans($1)
+       role $2 types tzdata_t;
+       allow tzdata_t $3:chr_file rw_term_perms;
+')
index a1a0e249d7fde97bd07f99e0d981cfd1b9bc12ca..7ea6af74fe734570f4595075d955253bfe49a21d 100644 (file)
@@ -30,11 +30,6 @@ miscfiles_read_localization(tzdata_t)
 miscfiles_manage_localization(tzdata_t)
 miscfiles_etc_filetrans_localization(tzdata_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(tzdata_t)
-       term_dontaudit_use_generic_ptys(tzdata_t)
-')
-
 # tzdata looks for /var/spool/postfix/etc/localtime.
 optional_policy(`
        postfix_search_spool(tzdata_t)
index df44c1fc2b4e0157af2b94f504207269dd4ceaf1..2750893d8a9fc6f25a994efb8fa2b51225ee9927 100644 (file)
@@ -79,16 +79,9 @@ seutil_read_config(updfstab_t)
 seutil_read_default_contexts(updfstab_t)
 seutil_read_file_contexts(updfstab_t)
 
-userdom_use_sysadm_ttys(updfstab_t)
 userdom_dontaudit_search_all_users_home_content(updfstab_t)
 userdom_dontaudit_use_unpriv_user_fds(updfstab_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(updfstab_t)
-       term_dontaudit_use_generic_ptys(updfstab_t)
-       files_dontaudit_read_root_files(updfstab_t)
-')
-
 optional_policy(`
        auth_domtrans_pam_console(updfstab_t)
 ')
index 01a857291cf629f1080786147dcf14f687c27bad..e802ed5671d5ebcb4f2f8db0f92afb55e19731eb 100644 (file)
@@ -1,9 +1,7 @@
 #
 # /usr
 #
-ifdef(`targeted_policy',`
 /usr/bin/gnatbind      --      gen_context(system_u:object_r:ada_exec_t,s0)
 /usr/bin/gnatls                --      gen_context(system_u:object_r:ada_exec_t,s0)
 /usr/bin/gnatmake      --      gen_context(system_u:object_r:ada_exec_t,s0)
 /usr/libexec/gcc(/.*)?/gnat1 -- gen_context(system_u:object_r:ada_exec_t,s0)
-')
index 2c1c44f2f343e08df342ecbc89bdb102b54c81f5..348c34885c391d52e5bd230d56b777fe7525d1e6 100644 (file)
 ## </param>
 #
 interface(`ada_domtrans',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type ada_t, ada_exec_t;
-               ')
-
-               corecmd_search_bin($1)
-               domtrans_pattern($1, ada_exec_t, ada_t)
-       ',`
-               refpolicywarn(`$0($1) has no effect in strict policy.')
+       gen_require(`
+               type ada_t, ada_exec_t;
        ')
+
+       corecmd_search_bin($1)
+       domtrans_pattern($1, ada_exec_t, ada_t)
 ')
 
 ########################################
@@ -30,7 +26,7 @@ interface(`ada_domtrans',`
 ## </summary>
 ## <param name="domain">
 ##     <summary>
-##     The type of the process performing this action.
+##     Domain allowed access.
 ##     </summary>
 ## </param>
 ## <param name="role">
@@ -45,15 +41,11 @@ interface(`ada_domtrans',`
 ## </param>
 #
 interface(`ada_run',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type ada_t;
-               ')
-
-               ada_domtrans($1)
-               role $2 types ada_t;
-               allow ada_t $3:chr_file rw_term_perms;
-       ',`
-               refpolicywarn(`$0($1) has no effect in strict policy.')
+       gen_require(`
+               type ada_t;
        ')
+
+       ada_domtrans($1)
+       role $2 types ada_t;
+       allow ada_t $3:chr_file rw_term_perms;
 ')
index 7628b8bdd3e19f0f8495bfbb0c5e14dc9b921851..a62921500276a10996cf5ec8bf8d588d35f3bd96 100644 (file)
@@ -9,14 +9,15 @@ policy_module(ada,1.1.0)
 type ada_t;
 type ada_exec_t;
 application_domain(ada_t,ada_exec_t)
+role system_r types ada_t;
 
 ########################################
 #
 # Local policy
 #
 
-ifdef(`targeted_policy',`
-       allow ada_t self:process { execstack execmem };
+allow ada_t self:process { execstack execmem };
+
+optional_policy(`
        unconfined_domain_noaudit(ada_t)
-       role system_r types ada_t;
 ')
index 90d9e8459d9a262e53e5f6a42ed202750c3f3efc..0af2bf6ae00aa48d0655a3c3b3ce84673dce1bf7 100644 (file)
@@ -6,7 +6,6 @@ policy_module(cdrecord,1.3.0)
 # Declarations
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Allow cdrecord to read various content.
@@ -15,7 +14,6 @@ ifdef(`strict_policy',`
 ## </p>
 ## </desc>
 gen_tunable(cdrecord_read_content,false)
-')
 
 type cdrecord_exec_t;
 application_executable_file(cdrecord_exec_t)
index 12ae276a1f25095d1696ed16f6ee20c0a2b3f9cd..7204fe2202aa307d5c0da679692b4aa702efb7c2 100644 (file)
@@ -1,7 +1,4 @@
+HOME_DIR/\.ethereal(/.*)?              gen_context(system_u:object_r:ROLE_ethereal_home_t,s0)
 
 /usr/sbin/ethereal.*           --      gen_context(system_u:object_r:ethereal_exec_t,s0)
 /usr/sbin/tethereal.*          --      gen_context(system_u:object_r:tethereal_exec_t,s0)
-
-ifdef(`strict_policy',`
-HOME_DIR/\.ethereal(/.*)?              gen_context(system_u:object_r:ROLE_ethereal_home_t,s0)
-')
index 4399a1aa72248b89f10c5723d3b48502255bd17c..1b425f4c7a91fdf7973da0ed67a86af2b56542e8 100644 (file)
@@ -1,10 +1,14 @@
+#
+# HOME_DIR/
+#
+
+HOME_DIR/\.camel_certs(/.*)?                                   gen_context(system_u:object_r:ROLE_evolution_home_t,s0)
+HOME_DIR/\.evolution(/.*)?                                     gen_context(system_u:object_r:ROLE_evolution_home_t,s0)
 
 #
 # /tmp
 #
-ifdef(`strict_policy',`
 /tmp/\.exchange-USER(/.*)?                                     gen_context(system_u:object_r:ROLE_evolution_exchange_tmp_t,s0)
-')
 
 #
 # /usr
@@ -15,8 +19,3 @@ ifdef(`strict_policy',`
 /usr/libexec/evolution/.*evolution-exchange-storage.*  --      gen_context(system_u:object_r:evolution_exchange_exec_t,s0)
 /usr/libexec/evolution-data-server.*                   --      gen_context(system_u:object_r:evolution_server_exec_t,s0)
 /usr/libexec/evolution-webcal.*                                --      gen_context(system_u:object_r:evolution_webcal_exec_t,s0)
-
-ifdef(`strict_policy',`
-HOME_DIR/\.evolution(/.*)?                                     gen_context(system_u:object_r:ROLE_evolution_home_t,s0)
-HOME_DIR/\.camel_certs(/.*)?                                   gen_context(system_u:object_r:ROLE_evolution_home_t,s0)
-')
index 75d96a4226b9bf87842631861e4c6e2d510d3212..c8f7a05a44cbf2c8669e137e9bb40749a392701d 100644 (file)
@@ -60,12 +60,6 @@ miscfiles_read_localization(games_t)
 userdom_dontaudit_use_unpriv_user_fds(games_t)
 userdom_dontaudit_search_sysadm_home_dirs(games_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(games_t)
-       term_dontaudit_use_generic_ptys(games_t)
-       files_dontaudit_read_root_files(games_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(games_t)
 ')
index 09d6a60fb09f4428320b16939a43c049652b3642..2c2a01a06c380acc3cae36d6d17e6f7f061c5aa1 100644 (file)
@@ -1,8 +1,6 @@
+HOME_DIR/\.giFT(/.*)?                  gen_context(system_u:object_r:ROLE_gift_home_t,s0)
+
 /usr/(local/)?bin/apollon      --      gen_context(system_u:object_r:gift_exec_t,s0)
 /usr/(local/)?bin/giftd                --      gen_context(system_u:object_r:giftd_exec_t,s0)
 /usr/(local/)?bin/giftui       --      gen_context(system_u:object_r:gift_exec_t,s0)
 /usr/(local/)?bin/giFToxic     --      gen_context(system_u:object_r:gift_exec_t,s0)
-
-ifdef(`strict_policy',`
-HOME_DIR/\.giFT(/.*)?                  gen_context(system_u:object_r:ROLE_gift_home_t,s0)
-')
index c81209548b364351b3cdc709ee8e3295b7339a26..e5f5f1c8c9585c8fd2a779f9624bc2ffa315617e 100644 (file)
@@ -1,11 +1,8 @@
 HOME_DIR/\.config/gtk-.*       gen_context(system_u:object_r:ROLE_gnome_home_t,s0)
+HOME_DIR/\.gconf(d)?(/.*)?     gen_context(system_u:object_r:ROLE_gconf_home_t,s0)
 
 /etc/gconf(/.*)?               gen_context(system_u:object_r:gconf_etc_t,s0)
 
-/usr/libexec/gconfd-2  --      gen_context(system_u:object_r:gconfd_exec_t,s0)
-
-ifdef(`strict_policy',`
-HOME_DIR/\.gconf(d)?(/.*)?     gen_context(system_u:object_r:ROLE_gconf_home_t,s0)
-
 /tmp/gconfd-USER/.*    --      gen_context(system_u:object_r:ROLE_gconf_tmp_t,s0)
-')
+
+/usr/libexec/gconfd-2  --      gen_context(system_u:object_r:gconfd_exec_t,s0)
index 78f8a10139834ff8e36128bd0d4e0513495b42e8..0c5dc949aea473a195c9b9e349c1c5e379de6ac7 100644 (file)
@@ -1,3 +1,4 @@
+HOME_DIR/\.gnupg(/.+)?         gen_context(system_u:object_r:ROLE_gpg_secret_t,s0)
 
 /usr/bin/gpg(2)?       --      gen_context(system_u:object_r:gpg_exec_t,s0)
 /usr/bin/gpg-agent     --      gen_context(system_u:object_r:gpg_agent_exec_t,s0)
@@ -6,7 +7,3 @@
 
 /usr/lib/gnupg/.*      --      gen_context(system_u:object_r:gpg_exec_t,s0)
 /usr/lib/gnupg/gpgkeys.* --    gen_context(system_u:object_r:gpg_helper_exec_t,s0)
-
-ifdef(`targeted_policy',`',`
-HOME_DIR/\.gnupg(/.+)?         gen_context(system_u:object_r:ROLE_gpg_secret_t,s0)
-')
index 4a2c7c7de95f5a12dad5e0e5fb4370de147602cc..618588c91469ba419ccab16ded6b037614eb483b 100644 (file)
@@ -1,9 +1,7 @@
 #
 # /home
 #
-ifdef(`strict_policy',`
 HOME_DIR/\.ircmotd     --      gen_context(system_u:object_r:ROLE_irc_home_t,s0)
-')
 
 #
 # /usr
index a2c4011d99febe3d539f39c7baf09643a3727ae7..cb557b0e98a22e7ea3ba40f48395d27139556c92 100644 (file)
@@ -151,7 +151,6 @@ template(`java_per_role_template',`
 
                libs_legacy_use_shared_libs($1_javaplugin_t)
                libs_legacy_use_ld_so($1_javaplugin_t)
-               libs_use_lib_files($1_javaplugin_t)
 
                miscfiles_legacy_read_localization($1_javaplugin_t)
        ')
@@ -213,14 +212,10 @@ template(`java_domtrans_user_javaplugin',`
 ## </param>
 #
 interface(`java_domtrans',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type java_t, java_exec_t;
-               ')
-
-               corecmd_search_bin($1)
-               domtrans_pattern($1, java_exec_t, java_t)
-       ',`
-               refpolicywarn(`$0($1) has no effect in strict policy.')
+       gen_require(`
+               type java_t, java_exec_t;
        ')
+
+       corecmd_search_bin($1)
+       domtrans_pattern($1, java_exec_t, java_t)
 ')
index a00de9bca150a2fd4b7b71dc845e8461b4be8711..921c45af95eed6471811516415759f373adef343 100644 (file)
@@ -22,13 +22,12 @@ init_system_domain(java_t,java_exec_t)
 # Local policy
 #
 
-ifdef(`targeted_policy',`
-       # execheap is needed for itanium/BEA jrocket
-       allow java_t self:process { execstack execmem execheap };
-       role system_r types java_t;
+# execheap is needed for itanium/BEA jrocket
+allow java_t self:process { execstack execmem execheap };
 
-       init_dbus_chat_script(java_t)
+init_dbus_chat_script(java_t)
 
+optional_policy(`
        unconfined_domain_noaudit(java_t)
        unconfined_dbus_chat(java_t)
 ')
index 8515073eaf070c3fa4a89915ee9a221976dd37a0..758d1c137c48dc9cb444b156bb70571908629f31 100644 (file)
 ## </param>
 #
 interface(`loadkeys_domtrans',`
-       ifdef(`strict_policy',`
-               gen_require(`
-                       type loadkeys_t, loadkeys_exec_t;
-               ')
-
-               corecmd_search_bin($1)
-               domtrans_pattern($1, loadkeys_exec_t, loadkeys_t)
-       ',`
-               refpolicywarn(`$0($*) has no effect in targeted policy.')
+       gen_require(`
+               type loadkeys_t, loadkeys_exec_t;
        ')
+
+       corecmd_search_bin($1)
+       domtrans_pattern($1, loadkeys_exec_t, loadkeys_t)
 ')
 
 ########################################
@@ -45,18 +41,13 @@ interface(`loadkeys_domtrans',`
 ## <rolecap/>
 #
 interface(`loadkeys_run',`
-       ifdef(`targeted_policy',`
-               # $0(): disabled in targeted policy as there
-               # is no loadkeys domain.
-       ',`
-               gen_require(`
-                       type loadkeys_t;
-               ')
-
-               loadkeys_domtrans($1)
-               role $2 types loadkeys_t;
-               allow loadkeys_t $3:chr_file rw_term_perms;
+       gen_require(`
+               type loadkeys_t;
        ')
+
+       loadkeys_domtrans($1)
+       role $2 types loadkeys_t;
+       allow loadkeys_t $3:chr_file rw_term_perms;
 ')
 
 ########################################
@@ -70,15 +61,9 @@ interface(`loadkeys_run',`
 ## </param>
 #
 interface(`loadkeys_exec',`
-       ifdef(`targeted_policy',`
-               # $0(): the loadkeys program is an alias
-               # of generic bin programs.
-               corecmd_exec_bin($1)
-       ',`
-               gen_require(`
-                       type loadkeys_exec_t;
-               ')
-
-               can_exec($1,loadkeys_exec_t)
+       gen_require(`
+               type loadkeys_exec_t;
        ')
+
+       can_exec($1,loadkeys_exec_t)
 ')
index 88eabb370e082e88757d4720896600e9ee0aec65..cf73ab1cceb44d47de3345b9046c79f813063cb4 100644 (file)
@@ -6,51 +6,41 @@ policy_module(loadkeys,1.2.0)
 # Declarations
 #
 
-ifdef(`targeted_policy',`
-       # for compatibility with strict:
-       corecmd_bin_alias(loadkeys_exec_t)
-',`
-       # cjp: this should probably be rewritten
-       # per user domain, since it can rw
-       # all user domain ttys
-
-       type loadkeys_t;
-       type loadkeys_exec_t;
-       init_system_domain(loadkeys_t,loadkeys_exec_t)
-')
+# cjp: this should probably be rewritten
+# per user domain, since it can rw
+# all user domain ttys
+type loadkeys_t;
+type loadkeys_exec_t;
+init_system_domain(loadkeys_t,loadkeys_exec_t)
 
 ########################################
 #
 # Local policy
 #
 
-ifdef(`targeted_policy',`
-       # loadkeys domain disabled in targeted policy
-',`
-       allow loadkeys_t self:capability { dac_override dac_read_search setuid sys_tty_config };
-       allow loadkeys_t self:fifo_file rw_fifo_file_perms;
+allow loadkeys_t self:capability { dac_override dac_read_search setuid sys_tty_config };
+allow loadkeys_t self:fifo_file rw_fifo_file_perms;
 
-       kernel_read_system_state(loadkeys_t)
+kernel_read_system_state(loadkeys_t)
 
-       corecmd_exec_bin(loadkeys_t)
-       corecmd_exec_shell(loadkeys_t)
+corecmd_exec_bin(loadkeys_t)
+corecmd_exec_shell(loadkeys_t)
 
-       files_read_etc_files(loadkeys_t)
-       files_read_etc_runtime_files(loadkeys_t)
+files_read_etc_files(loadkeys_t)
+files_read_etc_runtime_files(loadkeys_t)
 
-       term_dontaudit_use_console(loadkeys_t)
-       term_use_unallocated_ttys(loadkeys_t)
+term_dontaudit_use_console(loadkeys_t)
+term_use_unallocated_ttys(loadkeys_t)
 
-       init_dontaudit_use_script_ptys(loadkeys_t)
+init_dontaudit_use_script_ptys(loadkeys_t)
 
-       libs_use_ld_so(loadkeys_t)
-       libs_use_shared_libs(loadkeys_t)
+libs_use_ld_so(loadkeys_t)
+libs_use_shared_libs(loadkeys_t)
 
-       locallogin_use_fds(loadkeys_t)
+locallogin_use_fds(loadkeys_t)
 
-       miscfiles_read_localization(loadkeys_t)
+miscfiles_read_localization(loadkeys_t)
 
-       optional_policy(`
-               nscd_dontaudit_search_pid(loadkeys_t)
-       ')
+optional_policy(`
+       nscd_dontaudit_search_pid(loadkeys_t)
 ')
index 9072beea8d9bf5d83454eecfd72f6b94e55e9908..034dd6a3e89d7c27ac3f883e805ddaf5c6eb08b2 100644 (file)
@@ -15,37 +15,34 @@ init_system_domain(mono_t,mono_exec_t)
 # Local policy
 #
 
-ifdef(`targeted_policy',`
-       allow mono_t self:process { execheap execmem };
+allow mono_t self:process { execheap execmem };
 
-       unconfined_domain_noaudit(mono_t)
-       unconfined_dbus_chat(mono_t)
-
-       userdom_generic_user_home_dir_filetrans_generic_user_home_content(mono_t,{ dir file lnk_file fifo_file sock_file })
+userdom_generic_user_home_dir_filetrans_generic_user_home_content(mono_t,{ dir file lnk_file fifo_file sock_file })
 
-       init_dbus_chat_script(mono_t)
+init_dbus_chat_script(mono_t)
 
-       optional_policy(`
-               avahi_dbus_chat(mono_t)
-       ')
+optional_policy(`
+       avahi_dbus_chat(mono_t)
+')
 
-       optional_policy(`
-               cups_dbus_chat(mono_t)
-       ')
+optional_policy(`
+       cups_dbus_chat(mono_t)
+')
 
-       optional_policy(`
-               hal_dbus_chat(mono_t)
-       ')
+optional_policy(`
+       hal_dbus_chat(mono_t)
+')
 
-       optional_policy(`
-               networkmanager_dbus_chat(mono_t)
-       ')
+optional_policy(`
+       networkmanager_dbus_chat(mono_t)
+')
 
-       optional_policy(`
-               rpm_dbus_chat(mono_t)
-       ')
+optional_policy(`
+       rpm_dbus_chat(mono_t)
+')
 
-       optional_policy(`
-               unconfined_dbus_connect(mono_t)
-       ')
+optional_policy(`
+       unconfined_domain_noaudit(mono_t)
+       unconfined_dbus_chat(mono_t)
+       unconfined_dbus_connect(mono_t)
 ')
index 7218f9fb4086c7692c9d7051eed9f98912c05761..99f54ca4fe9f0e9189fec53ac8d3889392eb0768 100644 (file)
@@ -1,3 +1,9 @@
+HOME_DIR/\.galeon(/.*)?                        gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
+HOME_DIR/\.java(/.*)?                  gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
+HOME_DIR/\.mozilla(/.*)?               gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
+HOME_DIR/\.netscape(/.*)?              gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
+HOME_DIR/\.phoenix(/.*)?               gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
+
 #
 # /bin
 #
 /usr/lib(64)?/mozilla[^/]*/mozilla-.* -- gen_context(system_u:object_r:mozilla_exec_t,s0)
 /usr/lib(64)?/firefox[^/]*/mozilla-.* -- gen_context(system_u:object_r:mozilla_exec_t,s0)
 /usr/lib(64)?/[^/]*firefox[^/]*/firefox-bin -- gen_context(system_u:object_r:mozilla_exec_t,s0)
-
-#  netscape/mozilla
-ifdef(`strict_policy',`
-HOME_DIR/\.galeon(/.*)?                        gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
-HOME_DIR/\.netscape(/.*)?              gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
-HOME_DIR/\.mozilla(/.*)?               gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
-HOME_DIR/\.phoenix(/.*)?               gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
-HOME_DIR/\.java(/.*)?                  gen_context(system_u:object_r:ROLE_mozilla_home_t,s0)
-')
index 2450078bd7294e9db248f12fe1d209dca6740572..558208a675247ebfb11609a55a3d9d0f667a890f 100644 (file)
@@ -173,7 +173,6 @@ template(`mozilla_per_role_template',`
        term_dontaudit_getattr_pty_dirs($1_mozilla_t)
        
        libs_use_ld_so($1_mozilla_t)
-       libs_use_lib_files($1_mozilla_t)
        libs_use_shared_libs($1_mozilla_t)
 
        logging_send_syslog_msg($1_mozilla_t)
index 4d2b991f80d120810ae2ecdec00196efc4917e51..a3a29f6b011688a3d524a01c4cda4528e2798581 100644 (file)
@@ -6,14 +6,12 @@ policy_module(mozilla,1.4.0)
 # Declarations
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Control mozilla content access
 ## </p>
 ## </desc>
 gen_tunable(mozilla_read_content,false)
-')
 
 type mozilla_conf_t;
 files_config_file(mozilla_conf_t)
index 4806b644b8b505f647060f97274cc00dd03c5181..ffef8be614babe6aedc20ac8b0131f6817c6282d 100644 (file)
@@ -10,6 +10,4 @@
 /usr/bin/mencoder      --      gen_context(system_u:object_r:mencoder_exec_t,s0)
 /usr/bin/xine          --      gen_context(system_u:object_r:mplayer_exec_t,s0)
 
-ifdef(`strict_policy',`
 HOME_DIR/\.mplayer(/.*)?        gen_context(system_u:object_r:ROLE_mplayer_home_t,s0)
-')
index 706598478fbc8b2d06f44434a0d4fe27d1019a4a..9153029995bb8460906eee26ef9695a036d44b96 100644 (file)
@@ -6,27 +6,19 @@ policy_module(mplayer,1.3.0)
 # Declarations
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Allow mplayer executable stack
 ## </p>
 ## </desc>
 gen_tunable(allow_mplayer_execstack,false)
-')
+
+type mencoder_exec_t;
+application_executable_file(mencoder_exec_t)
 
 type mplayer_etc_t;
 files_config_file(mplayer_etc_t)
 
-ifdef(`strict_policy',`
-       type mencoder_exec_t;
-       application_executable_file(mencoder_exec_t)
-
-       type mplayer_exec_t;
-       application_executable_file(mplayer_exec_t)
-')
-
-ifdef(`targeted_policy',`
-       unconfined_execmem_alias_program(mencoder_exec_t)
-       unconfined_execmem_alias_program(mplayer_exec_t)
-')
+type mplayer_exec_t;
+corecmd_executable_file(mplayer_exec_t)
+application_executable_file(mplayer_exec_t)
index fa622bc65aed976323d7472ade1973bb24d7c076..92211c953142a8d985f853ff405a33a393ff460e 100644 (file)
@@ -1,9 +1,7 @@
 #
 # /home
 #
-ifdef(`strict_policy',`
 HOME_DIR/\.screenrc            --      gen_context(system_u:object_r:ROLE_screen_ro_home_t,s0)
-')
 
 #
 # /usr
index cd80a959779531a4fc114a090debca72af12a1cc..2b6c0064703b0a8a348df1f9d776b88fc5681e6b 100644 (file)
@@ -3,6 +3,4 @@
 #
 /usr/bin/thunderbird.*                 --      gen_context(system_u:object_r:thunderbird_exec_t,s0)
 
-ifdef(`strict_policy',`
 HOME_DIR/\.thunderbird(/.*)?                   gen_context(system_u:object_r:ROLE_thunderbird_home_t,s0)
-')
index 2a4afa05de9fb937eacab51a514b432deddd24c0..ba0a7645d864f73cbbd2143adeb6a87f4d5e499a 100644 (file)
@@ -1,3 +1,8 @@
+#
+# HOME_DIR/
+#
+HOME_DIR/\.uml(/.*)?           gen_context(system_u:object_r:ROLE_uml_rw_t,s0)
+
 #
 # /usr
 #
@@ -7,7 +12,3 @@
 # /var
 #
 /var/run/uml-utilities(/.*)?   gen_context(system_u:object_r:uml_switch_var_run_t,s0)
-
-ifdef(`strict_policy',`
-       HOME_DIR/\.uml(/.*)?            gen_context(system_u:object_r:ROLE_uml_rw_t,s0)
-')
index a399a25cfa7daeb0281950d7e63bbd92a15da315..389d1d7701a545260f7acacd97747cf1c67ff325 100644 (file)
@@ -59,13 +59,6 @@ miscfiles_read_localization(uml_switch_t)
 userdom_dontaudit_use_unpriv_user_fds(uml_switch_t)
 userdom_dontaudit_search_sysadm_home_dirs(uml_switch_t)
 
-ifdef(`targeted_policy',`
-       files_dontaudit_read_root_files(uml_switch_t)
-
-       term_dontaudit_use_unallocated_ttys(uml_switch_t)
-       term_dontaudit_use_generic_ptys(uml_switch_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(uml_switch_t)
 ')
index ea0b7ef2e43cf053e9758bb79f591fb308d9818f..b10db099850b5406061dd8e43dd4f5aa73cadb66 100644 (file)
@@ -1,11 +1,9 @@
 #
 # HOME_DIR/
 #
-ifdef(`strict_policy',`
 HOME_DIR/\.vmware(/.*)?                        gen_context(system_u:object_r:ROLE_vmware_file_t,s0)
-HOME_DIR/vmware(/.*)?                  gen_context(system_u:object_r:ROLE_vmware_file_t,s0)
 HOME_DIR/\.vmware[^/]*/.*\.cfg --      gen_context(system_u:object_r:ROLE_vmware_conf_t,s0)
-')
+HOME_DIR/vmware(/.*)?                  gen_context(system_u:object_r:ROLE_vmware_file_t,s0)
 
 #
 # /etc
index 5388212f3eae03840c6e3070dd5871e4f9ff1092..9faf1480679b8c2ee7b4fc24d2cc664aaf015626 100644 (file)
@@ -89,12 +89,6 @@ sysnet_dns_name_resolve(vmware_host_t)
 userdom_dontaudit_use_unpriv_user_fds(vmware_host_t)
 userdom_dontaudit_search_sysadm_home_dirs(vmware_host_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(vmware_host_t)
-       term_dontaudit_use_generic_ptys(vmware_host_t)
-       files_dontaudit_read_root_files(vmware_host_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(vmware_host_t)
 
index 7a3a15fedbe22d77d786623fb046d0e6ede8105b..438d8494b763805a7f6652b62c60bfc4ff61bf11 100644 (file)
@@ -89,11 +89,6 @@ userdom_dontaudit_search_all_users_home_content(webalizer_t)
 apache_read_log(webalizer_t)
 apache_manage_sys_content(webalizer_t)
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(webalizer_t)
-       term_use_unallocated_ttys(webalizer_t)
-')
-
 optional_policy(`
        cron_system_entry(webalizer_t,webalizer_exec_t)
 ')
index 8a87106a997cfc64593611c78894b95833ba00d1..c237c8b00c4318cc20772a1477822bc2a498521b 100644 (file)
@@ -15,7 +15,7 @@ application_domain(wine_t,wine_exec_t)
 # Local policy
 #
 
-ifdef(`targeted_policy',`
+optional_policy(`
        allow wine_t self:process { execstack execmem execheap };
        unconfined_domain_noaudit(wine_t)
        files_execmod_all_files(wine_t)
index 4395563082755e1994237254ad0319f6d89bdf9d..7c202da337d4c6bf3bea1752c0f7d1e79b48b403 100644 (file)
@@ -72,10 +72,6 @@ ifdef(`distro_debian',`
 /etc/mysql/debian-start                --      gen_context(system_u:object_r:bin_t,s0)
 ')
 
-ifdef(`targeted_policy',`
-/etc/X11/prefdm                        --      gen_context(system_u:object_r:bin_t,s0)
-')
-
 #
 # /lib
 #
index 3de09696ccded198fb679e81782bb6862ac3cbd7..881fc71b213e75c9312a3c8daca55bdb3aa85956 100644 (file)
@@ -32,11 +32,11 @@ interface(`corecmd_executable_file',`
 
 ########################################
 ## <summary>
-##     Create a aliased type to generic bin files.
+##     Create a aliased type to generic bin files.  (Deprecated)
 ## </summary>
 ## <desc>
 ##     <p>
-##     Create a aliased type to generic bin files.
+##     Create a aliased type to generic bin files.  (Deprecated)
 ##     </p>
 ##     <p>
 ##     This is added to support targeted policy.  Its
@@ -51,15 +51,7 @@ interface(`corecmd_executable_file',`
 ## </param>
 #
 interface(`corecmd_bin_alias',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type bin_t;
-               ')
-
-               typealias bin_t alias $1;
-       ',`
-               refpolicywarn(`$0($*) has no effect in strict policy.')
-       ')
+       refpolicywarn(`$0($*) has been deprecated.')
 ')
 
 ########################################
index a8a12f799b3775f19247f4ddb878e65e4014b26a..232b16d192558850e25a56162256d327ab494785 100644 (file)
@@ -45,11 +45,6 @@ interface(`domain_type',`
        # start with basic domain
        domain_base_type($1)
 
-       ifdef(`targeted_policy',`
-               unconfined_use_fds($1)
-               unconfined_sigchld($1)
-       ')
-
        # send init a sigchld and signull
        optional_policy(`
                init_sigchld($1)
@@ -1240,19 +1235,17 @@ interface(`domain_entry_file_spec_domtrans',`
 interface(`domain_unconfined',`
        gen_require(`
                attribute set_curr_context;
-               attribute can_change_process_identity;
-               attribute can_change_process_role;
                attribute can_change_object_identity;
                attribute unconfined_domain_type;
+               attribute process_uncond_exempt;
        ')
 
        typeattribute $1 unconfined_domain_type;
 
        # pass constraints
-       typeattribute $1 can_change_process_identity;
-       typeattribute $1 can_change_process_role;
        typeattribute $1 can_change_object_identity;
        typeattribute $1 set_curr_context;
+       typeattribute $1 process_uncond_exempt;
 ')
 
 ########################################
index 1f93814487aa91515941a9ccfd24d9be1c4f65ec..d075c543d37dec44a0c7ba160c33397e674704c8 100644 (file)
@@ -92,20 +92,6 @@ term_use_controlling_term(domain)
 # list the root directory
 files_list_root(domain)
 
-ifdef(`targeted_policy',`
-       # RBAC is disabled in the targeted policy,
-       # as only one role is used, system_r.
-       role system_r types domain;
-
-       # FIXME:
-       # workaround until role dominance is fixed in
-       # the module compiler
-       role secadm_r types domain;
-       role sysadm_r types domain;
-       role user_r types domain;
-       role staff_r types domain;
-')
-
 tunable_policy(`global_ssp',`
        # enable reading of urandom for all domains:
        # this should be enabled when all programs
index cd51464b23d524c7b5e4a4ee72bbb74ee462243b..8c7600f1198bbfe36bd7b5d383f96a57e4a1b454 100644 (file)
@@ -468,8 +468,7 @@ interface(`files_read_all_files',`
 ##     Allow shared library text relocations in all files.
 ##     </p>
 ##     <p>
-##     This is added to support WINE in the targeted
-##     policy.  It has no effect on the strict policy.
+##     This is added to support WINE policy.
 ##     </p>
 ## </desc>
 ## <param name="domain">
@@ -479,15 +478,11 @@ interface(`files_read_all_files',`
 ## </param>
 #
 interface(`files_execmod_all_files',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       attribute file_type;
-               ')
-
-               allow $1 file_type:file execmod;
-       ',`
-               refpolicywarn(`$0($1) has no effect in strict policy.')
+       gen_require(`
+               attribute file_type;
        ')
+
+       allow $1 file_type:file execmod;
 ')
 
 ########################################
index fa78e1f6919940f75eec9902f4de2b69e15494c1..350d02457ae3bf9816966daf117fe870850b9156 100644 (file)
@@ -187,10 +187,7 @@ allow file_type self:filesystem associate;
 
 fs_associate(file_type)
 fs_associate_noxattr(file_type)
-
-ifdef(`targeted_policy', `
-       fs_associate_tmpfs(file_type)
-')
+fs_associate_tmpfs(file_type)
 
 ########################################
 #
@@ -220,8 +217,6 @@ allow files_unconfined_type file_type:{ dir lnk_file sock_file fifo_file blk_fil
 # Mount/unmount any filesystem with the context= option. 
 allow files_unconfined_type file_type:filesystem *;
 
-ifdef(`targeted_policy',`
-       tunable_policy(`allow_execmod',`
-               allow files_unconfined_type file_type:file execmod;
-       ')
+tunable_policy(`allow_execmod',`
+       allow files_unconfined_type file_type:file execmod;
 ')
index 7d91bdf9bb4d23912c2be3d8215e72e9e6ecad4c..d116c8861bb866a32be52f1abfaf49a6e61d20c8 100644 (file)
@@ -26,6 +26,9 @@ role sysadm_r;
 role staff_r;
 role user_r;
 
+# here until order dependence is fixed:
+role unconfined_r;
+
 ifdef(`enable_mls',`
        role secadm_r;
        role auditadm_r;
@@ -252,10 +255,6 @@ ifdef(`distro_redhat',`
        fs_rw_tmpfs_chr_files(kernel_t)
 ')
 
-ifdef(`targeted_policy',`
-       unconfined_domain(kernel_t)
-')
-
 tunable_policy(`read_default_t',`
        files_list_default(kernel_t)
        files_read_default_files(kernel_t)
@@ -336,15 +335,15 @@ optional_policy(`
        seutil_read_bin_policy(kernel_t)
 ')
 
+optional_policy(`
+       unconfined_domain(kernel_t)
+')
+
 ########################################
 #
 # Unlabeled process local policy
 #
 
-ifdef(`targeted_policy',`
-       allow unlabeled_t self:filesystem associate;
-')
-
 optional_policy(`
        # If you load a new policy that removes active domains, processes can
        # get stuck if you do not allow unlabeled processes to signal init.
index 875b5474519d31f9a97605b182450e3ed1fac234..c8abb8e988170614946911728ebe772e24d72689 100644 (file)
@@ -31,11 +31,6 @@ fs_associate_tmpfs(devpts_t)
 fs_type(devpts_t)
 fs_use_trans devpts gen_context(system_u:object_r:devpts_t,s0);
 
-ifdef(`targeted_policy',`
-       # cjp: the ttynode should probably be removed.
-       typeattribute devpts_t ttynode, ptynode;
-')
-
 #
 # devtty_t is the type of /dev/tty.
 #
@@ -56,10 +51,6 @@ mls_trusted_object(ptmx_t)
 type tty_device_t, serial_device;
 dev_node(tty_device_t)
 
-ifdef(`targeted_policy',`
-       typeattribute tty_device_t ttynode;
-')
-
 #
 # usbtty_device_t is the type of /dev/usr/tty*
 #
index 94f60a97f5b83a9febd3b31f38090602272da0ed..a2e3d68cd957aa49e047bf62f3575539c5b5228b 100644 (file)
@@ -150,11 +150,6 @@ cron_rw_pipes(amavis_t)
 
 mta_read_config(amavis_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(amavis_t)
-       term_dontaudit_use_unallocated_ttys(amavis_t)
-')
-
 optional_policy(`
        clamav_stream_connect(amavis_t)
        clamav_domtrans_clamscan(amavis_t)
index 68b46dd313be8fa4a8420fe078b4eeb157a5f2b0..c30c0eae12d0a2fa5606ed9e067f4aead7929da0 100644 (file)
@@ -1,9 +1,4 @@
-# temporary hack till genhomedircon is fixed
-ifdef(`targeted_policy',`
-HOME_DIR/((www)|(web)|(public_html))(/.+)? gen_context(system_u:object_r:httpd_user_content_t,s0)
-',`
 HOME_DIR/((www)|(web)|(public_html))(/.+)? gen_context(system_u:object_r:httpd_ROLE_content_t,s0)
-')
 
 /etc/apache(2)?(/.*)?                  gen_context(system_u:object_r:httpd_config_t,s0)
 /etc/apache-ssl(2)?(/.*)?              gen_context(system_u:object_r:httpd_config_t,s0)
index 548c8bc9e786ae776e33f0c4c894d529ea08fc45..eb026c111e99bdecd0ad59d6a73cf9ef4c1156d0 100644 (file)
@@ -182,14 +182,6 @@ files_tmp_file(httpd_tmp_t)
 type httpd_tmpfs_t;
 files_tmpfs_file(httpd_tmpfs_t)
 
-# Unconfined domain for apache scripts.
-# Only to be used as a last resort
-type httpd_unconfined_script_t;
-type httpd_unconfined_script_exec_t; # customizable
-domain_type(httpd_unconfined_script_t)
-domain_entry_file(httpd_unconfined_script_t,httpd_unconfined_script_exec_t)
-role system_r types httpd_unconfined_script_t;
-
 # for apache2 memory mapped files
 type httpd_var_lib_t;
 files_type(httpd_var_lib_t)
@@ -201,11 +193,6 @@ files_pid_file(httpd_var_run_t)
 type squirrelmail_spool_t;
 files_tmp_file(squirrelmail_spool_t)
 
-ifdef(`targeted_policy',`
-       typealias httpd_sys_content_t alias httpd_user_content_t;
-       typealias httpd_sys_script_exec_t alias httpd_user_script_exec_t;
-')
-
 optional_policy(`
        prelink_object_file(httpd_modules_t)
 ')
@@ -363,16 +350,6 @@ userdom_use_unpriv_users_fds(httpd_t)
 
 mta_send_mail(httpd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(httpd_t)
-       term_dontaudit_use_generic_ptys(httpd_t)
-       files_dontaudit_read_root_files(httpd_t)
-
-       tunable_policy(`httpd_enable_homedirs',`
-               userdom_search_generic_user_home_dirs(httpd_t)
-       ')
-')
-
 tunable_policy(`allow_httpd_anon_write',`
        miscfiles_manage_public_files(httpd_t)
 ') 
@@ -410,13 +387,6 @@ tunable_policy(`httpd_can_network_relay',`
        corenet_sendrecv_http_cache_client_packets(httpd_t)
 ')
 
-tunable_policy(`httpd_enable_cgi',`
-       domtrans_pattern(httpd_t, httpd_unconfined_script_exec_t, httpd_unconfined_script_t)
-
-       allow httpd_t httpd_unconfined_script_t:process { signal sigkill sigstop };
-       allow httpd_t httpd_unconfined_script_exec_t:dir list_dir_perms;
-')
-
 tunable_policy(`httpd_enable_cgi && httpd_unified && httpd_builtin_scripting',`
        domtrans_pattern(httpd_t, httpdcontent, httpd_sys_script_t)
 
@@ -463,6 +433,10 @@ optional_policy(`
        calamaris_read_www_files(httpd_t)
 ')
 
+optional_policy(`
+       cron_system_entry(httpd_t, httpd_exec_t)
+')
+
 optional_policy(`
        daemontools_service_domain(httpd_t, httpd_exec_t)
 ')
@@ -632,12 +606,6 @@ logging_send_syslog_msg(httpd_suexec_t)
 
 miscfiles_read_localization(httpd_suexec_t)
 
-ifdef(`targeted_policy',`
-       tunable_policy(`httpd_enable_homedirs',`
-               userdom_search_generic_user_home_dirs(httpd_suexec_t)
-       ')
-')
-
 tunable_policy(`httpd_can_network_connect',`
        allow httpd_suexec_t self:tcp_socket create_stream_socket_perms;
        allow httpd_suexec_t self:udp_socket create_socket_perms;
@@ -656,10 +624,6 @@ tunable_policy(`httpd_can_network_connect',`
        sysnet_read_config(httpd_suexec_t)
 ')
 
-tunable_policy(`httpd_enable_cgi',`
-       domtrans_pattern(httpd_suexec_t, httpd_unconfined_script_exec_t, httpd_unconfined_script_t)
-')
-
 tunable_policy(`httpd_enable_cgi && httpd_unified',`
        domtrans_pattern(httpd_suexec_t, httpdcontent, httpd_sys_script_t)
 ')
@@ -726,12 +690,6 @@ ifdef(`distro_redhat',`
        allow httpd_sys_script_t httpd_log_t:file { getattr append };
 ')
 
-ifdef(`targeted_policy',`
-       tunable_policy(`httpd_enable_homedirs',`
-               userdom_search_generic_user_home_dirs(httpd_sys_script_t)
-       ')
-')
-
 tunable_policy(`httpd_enable_homedirs && use_nfs_home_dirs',`
        fs_read_nfs_files(httpd_sys_script_t)
        fs_read_nfs_symlinks(httpd_sys_script_t)
@@ -751,21 +709,6 @@ optional_policy(`
        mysql_rw_db_sockets(httpd_sys_script_t)
 ')
 
-########################################
-#
-# Apache unconfined script local policy
-#
-
-unconfined_domain(httpd_unconfined_script_t)
-
-optional_policy(`
-       cron_system_entry(httpd_t, httpd_exec_t)
-')
-
-optional_policy(`
-       nscd_socket_use(httpd_unconfined_script_t)
-')
-
 ########################################
 #
 # httpd_rotatelogs local policy
@@ -785,8 +728,3 @@ libs_use_shared_libs(httpd_rotatelogs_t)
 logging_search_logs(httpd_rotatelogs_t)
 
 miscfiles_read_localization(httpd_rotatelogs_t)
-
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(httpd_rotatelogs_t)
-       term_dontaudit_use_unallocated_ttys(httpd_rotatelogs_t)
-')
index aef5c8a6cd9a27d6b7a06eb39c9934aa1ca4138a..59f4e5956049ebab4b09b7c29fda2592b7f2448c 100644 (file)
@@ -86,10 +86,6 @@ logging_send_syslog_msg(apcupsd_t)
 
 miscfiles_read_localization(apcupsd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(apcupsd_t)
-')
-
 optional_policy(`
        hostname_exec(apcupsd_t)
 ')
index 2fad90f6b9179b61dae114b5831014679065e26b..4414826cbaa5b892cad1469a56436f0c9bf2ff18 100644 (file)
@@ -172,13 +172,6 @@ ifdef(`distro_suse',`
        files_var_lib_filetrans(apmd_t,apmd_var_lib_t,file)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(apmd_t)
-       term_dontaudit_use_generic_ptys(apmd_t)
-       files_dontaudit_read_root_files(apmd_t)
-       unconfined_domain(apmd_t)
-')
-
 optional_policy(`
        automount_domtrans(apmd_t)
 ')
@@ -227,6 +220,10 @@ optional_policy(`
        udev_read_state(apmd_t) #necessary?
 ')
 
+optional_policy(`
+       unconfined_domain(apmd_t)
+')
+
 # cjp: related to sleep/resume (?)
 optional_policy(`
        xserver_domtrans_xdm_xserver(apmd_t)
index d0abdb8914444d1f4520bc9a87c9d09c8c3f941e..33cf2bb7840be57c1aced55745513bb5bfb26f15 100644 (file)
@@ -85,12 +85,6 @@ userdom_dontaudit_search_sysadm_home_dirs(arpwatch_t)
 
 mta_send_mail(arpwatch_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(arpwatch_t)
-       term_dontaudit_use_generic_ptys(arpwatch_t)
-       files_dontaudit_read_root_files(arpwatch_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(arpwatch_t)
 ')
index f9d02568a5b60004c5c091396dd4e9714a7d1401..8853d15c997f94babeaf11f9f5e2ff042948f2e1 100644 (file)
@@ -127,12 +127,6 @@ sysnet_read_config(asterisk_t)
 userdom_dontaudit_use_unpriv_user_fds(asterisk_t)
 userdom_dontaudit_search_sysadm_home_dirs(asterisk_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(asterisk_t)
-       term_dontaudit_use_generic_ptys(asterisk_t)
-       files_dontaudit_read_root_files(asterisk_t)
-')
-
 optional_policy(`
        nis_use_ypbind(asterisk_t)
 ')
index c9d7c19748fb0681d4859bf894018e8bcc870ae1..9723ae5fcc2a8318f7b956b94be6d4bb9bfb9ece 100644 (file)
@@ -51,13 +51,6 @@ miscfiles_read_localization(entropyd_t)
 userdom_dontaudit_use_unpriv_user_fds(entropyd_t)
 userdom_dontaudit_search_sysadm_home_dirs(entropyd_t)
 
-ifdef(`targeted_policy', `
-       files_dontaudit_read_root_files(entropyd_t)
-
-       term_dontaudit_use_unallocated_ttys(entropyd_t)
-       term_dontaudit_use_generic_ptys(entropyd_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(entropyd_t)
 ')
index c22a97aa79fab4396cbcfd2797be72782a378c5b..7e8417116145a0dbae94c99748410b5571120c77 100644 (file)
@@ -147,12 +147,6 @@ sysnet_read_config(automount_t)
 userdom_dontaudit_use_unpriv_user_fds(automount_t)
 userdom_dontaudit_search_sysadm_home_dirs(automount_t)
 
-ifdef(`targeted_policy', `
-       files_dontaudit_read_root_files(automount_t)
-       term_dontaudit_use_unallocated_ttys(automount_t)
-       term_dontaudit_use_generic_ptys(automount_t)
-')
-
 optional_policy(`
        bind_search_cache(automount_t)
 ')
index 16a2d07c52ec2f7bcd6e4be42f770a868ea6519d..159d655685ce6e8ad075f5a133b787bf7e3931ca 100644 (file)
@@ -80,12 +80,6 @@ miscfiles_read_localization(avahi_t)
 userdom_dontaudit_use_unpriv_user_fds(avahi_t)
 userdom_dontaudit_search_sysadm_home_dirs(avahi_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(avahi_t)
-       term_dontaudit_use_generic_ptys(avahi_t)
-       files_dontaudit_read_root_files(avahi_t)
-')
-
 optional_policy(`
        dbus_system_bus_client_template(avahi,avahi_t)
        dbus_connect_system_bus(avahi_t)
index 6e59307a7a6bbae82d8af433326c6e8d63dbaf2e..94b45a6e8c39ed380a046a6177fe3535734d2133 100644 (file)
@@ -148,12 +148,6 @@ sysnet_read_config(named_t)
 userdom_dontaudit_use_unpriv_user_fds(named_t)
 userdom_dontaudit_search_sysadm_home_dirs(named_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(named_t)
-       term_dontaudit_use_generic_ptys(named_t)
-       files_dontaudit_read_root_files(named_t)
-')
-
 tunable_policy(`named_write_master_zones',`
        manage_dirs_pattern(named_t,named_zone_t,named_zone_t)
        manage_files_pattern(named_t,named_zone_t,named_zone_t)
@@ -265,13 +259,6 @@ ifdef(`distro_redhat',`
        allow ndc_t named_conf_t:dir search;
 ')
 
-ifdef(`targeted_policy',`
-       kernel_dontaudit_read_unlabeled_files(ndc_t)
-
-       term_use_unallocated_ttys(ndc_t)
-       term_use_generic_ptys(ndc_t)
-')
-
 optional_policy(`
        nis_use_ypbind(ndc_t)
 ')
index e031f3995e991ef3bbdd4137522f07bf571534e0..4f792787b90d0105674c5f6c46f72c6d96a23307 100644 (file)
@@ -1,5 +1,116 @@
 ## <summary>Bluetooth tools and system services.</summary>
 
+#######################################
+## <summary>
+##     The per role template for the bluetooth module.
+## </summary>
+## <desc>
+##     <p>
+##     This template creates derived domains which are used
+##     for bluetooth.
+##     </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(`bluetooth_per_role_template',`
+       gen_require(`
+               attribute bluetooth_helper_domain;
+               type bluetooth_helper_exec_t;
+       ')
+
+       type $1_bluetooth_t, bluetooth_helper_domain;
+       application_domain($1_bluetooth_t, bluetooth_helper_exec_t)
+       role $3 types $1_bluetooth_t;
+       
+       type $1_bluetooth_tmp_t;
+       files_tmp_file($1_bluetooth_tmp_t)
+
+       type $1_bluetooth_tmpfs_t;
+       files_tmpfs_file($1_bluetooth_tmpfs_t)
+
+       allow $1_bluetooth_t self:capability sys_nice;
+       allow $1_bluetooth_t self:process getsched;
+       allow $1_bluetooth_t self:fifo_file rw_fifo_file_perms;
+       allow $1_bluetooth_t self:shm create_shm_perms;
+       allow $1_bluetooth_t self:unix_stream_socket { create_stream_socket_perms connectto };
+       allow $1_bluetooth_t self:tcp_socket create_socket_perms;
+       allow $1_bluetooth_t self:netlink_route_socket r_netlink_socket_perms;
+
+       allow $1_bluetooth_t bluetooth_t:socket { read write };
+
+       manage_dirs_pattern($1_bluetooth_t, $1_bluetooth_tmp_t, $1_bluetooth_tmp_t)
+       manage_files_pattern($1_bluetooth_t, $1_bluetooth_tmp_t, $1_bluetooth_tmp_t)
+       manage_sock_files_pattern($1_bluetooth_t, $1_bluetooth_tmp_t, $1_bluetooth_tmp_t)
+       files_tmp_filetrans($1_bluetooth_t, $1_bluetooth_tmp_t, { file dir sock_file })
+
+       manage_dirs_pattern($1_bluetooth_t, $1_bluetooth_tmpfs_t, $1_bluetooth_tmpfs_t)
+       manage_files_pattern($1_bluetooth_t, $1_bluetooth_tmpfs_t, $1_bluetooth_tmpfs_t)
+       fs_tmpfs_filetrans($1_bluetooth_t, $1_bluetooth_tmpfs_t, { dir file })
+
+       kernel_read_system_state($1_bluetooth_t)
+       kernel_read_kernel_sysctls($1_bluetooth_t)
+
+       dev_read_urand($1_bluetooth_t)
+
+       term_dontaudit_use_all_user_ttys($1_bluetooth_t)
+
+       corecmd_exec_bin($1_bluetooth_t)
+       corecmd_exec_shell($1_bluetooth_t)
+
+       domain_read_all_domains_state($1_bluetooth_t)
+
+       files_read_etc_files($1_bluetooth_t)
+       files_read_etc_runtime_files($1_bluetooth_t)
+       files_read_usr_files($1_bluetooth_t)
+       files_dontaudit_list_default($1_bluetooth_t)
+
+       libs_use_ld_so($1_bluetooth_t)
+       libs_use_shared_libs($1_bluetooth_t)
+
+       locallogin_dontaudit_use_fds($1_bluetooth_t)
+
+       logging_send_syslog_msg($1_bluetooth_t)
+
+       miscfiles_read_localization($1_bluetooth_t) 
+
+       sysnet_read_config($1_bluetooth_t)
+
+       optional_policy(`
+               bluetooth_dbus_chat($1_bluetooth_t)
+               dbus_system_bus_client_template($1_bluetooth, $1_bluetooth_t)
+               dbus_connect_system_bus($1_bluetooth_t)
+               dbus_send_system_bus($1_bluetooth_t)
+       ')
+
+       optional_policy(`
+               nscd_socket_use($1_bluetooth_t)
+       ')
+
+       optional_policy(`
+               xserver_user_client_template($1, $1_bluetooth_t, $1_bluetooth_tmpfs_t)
+       ')
+')
+
 ########################################
 ## <summary>
 ##     Execute bluetooth in the bluetooth domain.
@@ -38,47 +149,43 @@ interface(`bluetooth_read_config',`
 
 ########################################
 ## <summary>
-##     Execute bluetooth_helper in the bluetooth_helper domain.
+##     Send and receive messages from
+##     bluetooth over dbus.
 ## </summary>
 ## <param name="domain">
 ##     <summary>
-##     The type of the process performing this action.
+##     Domain allowed access.
 ##     </summary>
 ## </param>
 #
-interface(`bluetooth_domtrans_helper',`
+interface(`bluetooth_dbus_chat',`
        gen_require(`
-               type bluetooth_helper_t, bluetooth_helper_exec_t;
+               type bluetooth_t;
+               class dbus send_msg;
        ')
 
-       domtrans_pattern($1,bluetooth_helper_exec_t,bluetooth_helper_t)
+       allow $1 bluetooth_t:dbus send_msg;
+       allow bluetooth_t $1:dbus send_msg;
 ')
 
 ########################################
 ## <summary>
-##     Send and receive messages from
-##     bluetooth over dbus.
+##     Execute bluetooth_helper in the bluetooth_helper domain.  (Deprecated)
 ## </summary>
 ## <param name="domain">
 ##     <summary>
-##     Domain allowed access.
+##     The type of the process performing this action.
 ##     </summary>
 ## </param>
 #
-interface(`bluetooth_dbus_chat',`
-       gen_require(`
-               type bluetooth_t;
-               class dbus send_msg;
-       ')
-
-       allow $1 bluetooth_t:dbus send_msg;
-       allow bluetooth_t $1:dbus send_msg;
+interface(`bluetooth_domtrans_helper',`
+       refpolicywarn(`$0($*) has been deprecated.')
 ')
 
 ########################################
 ## <summary>
 ##     Execute bluetooth_helper in the bluetooth_helper domain, and
-##     allow the specified role the bluetooth_helper domain.
+##     allow the specified role the bluetooth_helper domain.  (Deprecated)
 ## </summary>
 ## <param name="domain">
 ##     <summary>
@@ -98,13 +205,7 @@ interface(`bluetooth_dbus_chat',`
 ## <rolecap/>
 #
 interface(`bluetooth_run_helper',`
-       gen_require(`
-               type bluetooth_helper_t;
-       ')
-
-       bluetooth_domtrans_helper($1)
-       role $2 types bluetooth_helper_t;
-       allow bluetooth_helper_t $3:chr_file rw_term_perms;
+       refpolicywarn(`$0($*) has been deprecated.')
 ')
 
 ########################################
@@ -119,9 +220,9 @@ interface(`bluetooth_run_helper',`
 #
 interface(`bluetooth_dontaudit_read_helper_files',`
        gen_require(`
-               type bluetooth_helper_t;
+               attribute bluetooth_helper_domain;
        ')
 
-       dontaudit $1 bluetooth_helper_t:dir search;
-       dontaudit $1 bluetooth_helper_t:file { read getattr };
+       dontaudit $1 bluetooth_helper_domain:dir search;
+       dontaudit $1 bluetooth_helper_domain:file { read getattr };
 ')
index ae6e6a7f3ec36f4ac03a4ab13930c45321fc8a9d..7f1f285c56ae49424501d1d8eab6bb7026138c1b 100644 (file)
@@ -15,14 +15,10 @@ files_type(bluetooth_conf_t)
 type bluetooth_conf_rw_t;
 files_type(bluetooth_conf_rw_t)
 
-type bluetooth_helper_t;
-type bluetooth_helper_exec_t;
-domain_type(bluetooth_helper_t)
-domain_entry_file(bluetooth_helper_t,bluetooth_helper_exec_t)
-role system_r types bluetooth_helper_t;
+attribute bluetooth_helper_domain;
 
-type bluetooth_helper_tmp_t;
-files_tmp_file(bluetooth_helper_tmp_t)
+type bluetooth_helper_exec_t;
+application_executable_file(bluetooth_helper_exec_t)
 
 type bluetooth_lock_t;
 files_lock_file(bluetooth_lock_t)
@@ -61,7 +57,7 @@ manage_fifo_files_pattern(bluetooth_t,bluetooth_conf_t,bluetooth_conf_rw_t)
 manage_sock_files_pattern(bluetooth_t,bluetooth_conf_t,bluetooth_conf_rw_t)
 filetrans_pattern(bluetooth_t,bluetooth_conf_t,bluetooth_conf_rw_t,{ dir file lnk_file sock_file fifo_file })
 
-domtrans_pattern(bluetooth_t, bluetooth_helper_exec_t, bluetooth_helper_t)
+can_exec(bluetooth_t, bluetooth_helper_exec_t)
 
 allow bluetooth_t bluetooth_lock_t:file manage_file_perms;
 files_lock_filetrans(bluetooth_t,bluetooth_lock_t,file)
@@ -117,8 +113,6 @@ files_read_usr_files(bluetooth_t)
 libs_use_ld_so(bluetooth_t)
 libs_use_shared_libs(bluetooth_t)
 
-locallogin_dontaudit_use_fds(bluetooth_helper_t)
-
 logging_send_syslog_msg(bluetooth_t)
 
 miscfiles_read_localization(bluetooth_t)
@@ -130,12 +124,6 @@ userdom_dontaudit_use_unpriv_user_fds(bluetooth_t)
 userdom_dontaudit_use_sysadm_ptys(bluetooth_t)
 userdom_dontaudit_search_sysadm_home_dirs(bluetooth_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(bluetooth_t)
-       term_dontaudit_use_generic_ptys(bluetooth_t)
-       files_dontaudit_read_root_files(bluetooth_t)
-')
-
 optional_policy(`
        dbus_system_bus_client_template(bluetooth,bluetooth_t)
        dbus_connect_system_bus(bluetooth_t)
@@ -154,94 +142,6 @@ optional_policy(`
        udev_read_db(bluetooth_t)
 ')
 
-########################################
-#
-# Bluetooth helper local policy
-#
-
-allow bluetooth_helper_t self:capability sys_nice;
-allow bluetooth_helper_t self:process getsched;
-allow bluetooth_helper_t self:fifo_file rw_fifo_file_perms;
-allow bluetooth_helper_t self:shm create_shm_perms;
-allow bluetooth_helper_t self:unix_stream_socket { create_stream_socket_perms connectto };
-allow bluetooth_helper_t self:tcp_socket create_socket_perms;
-allow bluetooth_helper_t self:netlink_route_socket r_netlink_socket_perms;
-
-allow bluetooth_helper_t bluetooth_t:socket { read write };
-
-manage_dirs_pattern(bluetooth_helper_t,bluetooth_helper_tmp_t,bluetooth_helper_tmp_t)
-manage_files_pattern(bluetooth_helper_t,bluetooth_helper_tmp_t,bluetooth_helper_tmp_t)
-manage_sock_files_pattern(bluetooth_helper_t,bluetooth_helper_tmp_t,bluetooth_helper_tmp_t)
-files_tmp_filetrans(bluetooth_helper_t, bluetooth_helper_tmp_t, { file dir sock_file })
-
-kernel_read_system_state(bluetooth_helper_t)
-kernel_read_kernel_sysctls(bluetooth_helper_t)
-
-dev_read_urand(bluetooth_helper_t)
-
-term_dontaudit_use_all_user_ttys(bluetooth_helper_t)
-
-corecmd_exec_bin(bluetooth_helper_t)
-corecmd_exec_shell(bluetooth_helper_t)
-
-domain_read_all_domains_state(bluetooth_helper_t)
-
-files_read_etc_files(bluetooth_helper_t)
-files_read_etc_runtime_files(bluetooth_helper_t)
-files_read_usr_files(bluetooth_helper_t)
-files_search_tmp(bluetooth_helper_t)
-files_dontaudit_list_default(bluetooth_helper_t)
-
-libs_use_ld_so(bluetooth_helper_t)
-libs_use_shared_libs(bluetooth_helper_t)
-
-logging_send_syslog_msg(bluetooth_helper_t)
-
-miscfiles_read_localization(bluetooth_helper_t) 
-miscfiles_read_fonts(bluetooth_helper_t)
-
-sysnet_read_config(bluetooth_helper_t)
-
-ifdef(`targeted_policy',`
-       files_rw_generic_tmp_sockets(bluetooth_helper_t)
-       files_manage_generic_tmp_files(bluetooth_helper_t)
-
-       fs_rw_tmpfs_files(bluetooth_helper_t)
-
-       term_dontaudit_use_generic_ptys(bluetooth_helper_t)
-       term_dontaudit_use_unallocated_ttys(bluetooth_helper_t)
-
-       unconfined_stream_connect(bluetooth_helper_t)
-
-       userdom_manage_generic_user_home_content_files(bluetooth_helper_t)
-
-       optional_policy(`
-               corenet_tcp_connect_xserver_port(bluetooth_helper_t)
-               #Bugzilla https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=205956
-               xserver_read_xdm_tmp_files(bluetooth_helper_t)
-               xserver_stream_connect_xdm(bluetooth_helper_t)
-               xserver_use_xdm_fds(bluetooth_helper_t)
-               xserver_rw_xdm_pipes(bluetooth_helper_t)
-               # when started via startx 
-               xserver_stream_connect_xdm_xserver(bluetooth_helper_t)
-       ')
-')
-
-optional_policy(`
-       bluetooth_dbus_chat(bluetooth_helper_t)
-       dbus_system_bus_client_template(bluetooth_helper,bluetooth_helper_t)
-       dbus_connect_system_bus(bluetooth_helper_t)
-       dbus_send_system_bus(bluetooth_helper_t)
-')
-
-optional_policy(`
-       nscd_socket_use(bluetooth_helper_t)
-')
-
 optional_policy(`
        ppp_domtrans(bluetooth_t)
 ')
-
-optional_policy(`
-               xserver_stream_connect_xdm(bluetooth_helper_t)
-')     
index 51e7efa5712af8e8d47231ab167f83566ef1194a..5445a70550e6f941f7d5a73f3fd71082fd9e1c10 100644 (file)
@@ -80,12 +80,6 @@ sysnet_read_config(canna_t)
 userdom_dontaudit_use_unpriv_user_fds(canna_t)
 userdom_dontaudit_search_sysadm_home_dirs(canna_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(canna_t)
-       term_dontaudit_use_generic_ptys(canna_t)
-       files_dontaudit_read_root_files(canna_t)
-')
-
 optional_policy(`
        nis_use_ypbind(canna_t)
 ')
index 26b1da91333d4752548a81b3719e153c7b26074e..fcecb1b08127fa99cd856acf4310779f712c559a 100644 (file)
@@ -112,11 +112,6 @@ ifdef(`hide_broken_symptoms', `
        files_manage_isid_type_files(ccs_t)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(ccs_t)
-       term_dontaudit_use_unallocated_ttys(ccs_t)
-')
-
 optional_policy(`
        unconfined_use_fds(ccs_t)
 ')
index b4f8ad4d8b8ef7e51129ae33cb494dcd32205292..323554b6db722fc9ca422168a44477fa2809da4c 100644 (file)
@@ -63,12 +63,6 @@ sysnet_read_config(ciped_t)
 
 userdom_dontaudit_use_unpriv_user_fds(ciped_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(ciped_t)
-       term_dontaudit_use_generic_ptys(ciped_t)
-       files_dontaudit_read_root_files(ciped_t)
-')
-
 optional_policy(`
        nis_use_ypbind(ciped_t)
 ')
index 2a2dec7e4da5142d4d22df72579115a1c6bb3e36..6b7d0c545fe86a4707fc6a972463ba788baa26d4 100644 (file)
@@ -120,11 +120,6 @@ cron_use_fds(clamd_t)
 cron_use_system_job_fds(clamd_t)
 cron_rw_pipes(clamd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(clamd_t)
-       term_dontaudit_use_generic_ptys(clamd_t)
-')
-
 optional_policy(`
        amavis_read_lib_files(clamd_t)
        amavis_read_spool_files(clamd_t)
index ee4a98e9fb966d5933e46c7bc2328c4b8617e1c5..354edf6bbded34fc5a302610cda87c681c2dfd31 100644 (file)
@@ -77,12 +77,6 @@ template(`courier_domain_template',`
 
        userdom_dontaudit_use_unpriv_user_fds(courier_$1_t)
 
-       ifdef(`targeted_policy',`
-               term_dontaudit_use_unallocated_ttys(courier_$1_t)
-               term_dontaudit_use_generic_ptys(courier_$1_t)
-               files_dontaudit_read_root_files(courier_$1_t)
-       ')
-
        optional_policy(`
                seutil_sigchld_newrole(courier_$1_t)
        ')
index 48d6e261f24812526996a6f778211f517dc6488b..91452632052c169f1873ade0f899fd413105565e 100644 (file)
@@ -58,12 +58,6 @@ logging_send_syslog_msg(cpucontrol_t)
 
 userdom_dontaudit_use_unpriv_user_fds(cpucontrol_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(cpucontrol_t)
-       term_dontaudit_use_generic_ptys(cpucontrol_t)
-       files_dontaudit_read_root_files(cpucontrol_t)
-')
-
 optional_policy(`
        nscd_socket_use(cpucontrol_t)
 ')
@@ -118,12 +112,6 @@ miscfiles_read_localization(cpuspeed_t)
 
 userdom_dontaudit_use_unpriv_user_fds(cpuspeed_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(cpuspeed_t)
-       term_dontaudit_use_generic_ptys(cpuspeed_t)
-       files_dontaudit_read_root_files(cpuspeed_t)
-')
-
 optional_policy(`
        nscd_socket_use(cpuspeed_t)
 ')
index 74c3142c2a2c49128880e9af483252403cdfab72..b61103c15ceae0898cab64246dea72336d79bf78 100644 (file)
@@ -152,6 +152,17 @@ template(`cron_per_role_template',`
                allow crond_t $1_cron_spool_t:file manage_file_perms;
        ')
 
+       # need a per-role version of this:
+       #optional_policy(`
+       #       mono_domtrans($1_crond_t)
+       #')
+
+       optional_policy(`
+               dbus_stub($1_crond_t)
+
+               allow $1_crond_t $2:dbus send_msg;
+       ')              
+
        optional_policy(`
                nis_use_ypbind($1_crond_t)
        ')
index 3e093b3d38fe5c88223b8f83957936455066d671..d95d755f44de7707ec334544fa6dc1c6564b636d 100644 (file)
@@ -60,11 +60,7 @@ application_executable_file(crontab_exec_t)
 type system_cron_spool_t, cron_spool_type;
 files_type(system_cron_spool_t)
 
-ifdef(`targeted_policy',`
-       typealias crond_t alias system_crond_t;
-',`
-       type system_crond_t;
-')
+type system_crond_t;
 init_daemon_domain(system_crond_t,anacron_exec_t)
 corecmd_shell_entry_type(system_crond_t)
 role system_r types system_crond_t;
@@ -75,11 +71,6 @@ files_lock_file(system_crond_lock_t)
 type system_crond_tmp_t;
 files_tmp_file(system_crond_tmp_t)
 
-ifdef(`targeted_policy',`
-       type sysadm_cron_spool_t;
-       files_type(sysadm_cron_spool_t)
-')
-
 ifdef(`enable_mcs',`
        init_ranged_daemon_domain(crond_t,crond_exec_t,s0 - mcs_systemhigh)
 ')
@@ -111,6 +102,10 @@ files_pid_filetrans(crond_t,crond_var_run_t,file)
 allow crond_t cron_spool_t:dir rw_dir_perms;
 allow crond_t cron_spool_t:file read_file_perms;
 
+manage_dirs_pattern(crond_t,crond_tmp_t,crond_tmp_t)
+manage_files_pattern(crond_t,crond_tmp_t,crond_tmp_t)
+files_tmp_filetrans(crond_t,crond_tmp_t,{ file dir })
+
 allow crond_t system_cron_spool_t:dir list_dir_perms;
 allow crond_t system_cron_spool_t:file read_file_perms;
 
@@ -185,35 +180,6 @@ optional_policy(`
        locallogin_link_keys(crond_t)
 ')
 
-ifdef(`targeted_policy',`
-       manage_dirs_pattern(crond_t,system_crond_tmp_t,system_crond_tmp_t)
-       manage_files_pattern(crond_t,system_crond_tmp_t,system_crond_tmp_t)
-       manage_lnk_files_pattern(crond_t,system_crond_tmp_t,system_crond_tmp_t)
-       manage_fifo_files_pattern(crond_t,system_crond_tmp_t,system_crond_tmp_t)
-       manage_sock_files_pattern(crond_t,system_crond_tmp_t,system_crond_tmp_t)
-       files_tmp_filetrans(crond_t,system_crond_tmp_t,{ dir file lnk_file sock_file fifo_file })
-
-       unconfined_domain(crond_t)
-
-       userdom_manage_generic_user_home_content_dirs(crond_t)
-       userdom_manage_generic_user_home_content_files(crond_t)
-       userdom_manage_generic_user_home_content_symlinks(crond_t)
-       userdom_manage_generic_user_home_content_sockets(crond_t)
-       userdom_manage_generic_user_home_content_pipes(crond_t)
-       userdom_generic_user_home_dir_filetrans_generic_user_home_content(crond_t,{ dir file lnk_file fifo_file sock_file })
-
-       allow crond_t unconfined_t:dbus send_msg;
-       allow crond_t initrc_t:dbus send_msg;
-
-       optional_policy(`
-               mono_domtrans(crond_t)
-       ')
-',`
-       manage_dirs_pattern(crond_t,crond_tmp_t,crond_tmp_t)
-       manage_files_pattern(crond_t,crond_tmp_t,crond_tmp_t)
-       files_tmp_filetrans(crond_t, crond_tmp_t, { file dir })
-')
-
 tunable_policy(`fcron_crond', `
        allow crond_t system_cron_spool_t:file manage_file_perms;
 ')
@@ -258,6 +224,11 @@ optional_policy(`
 # System cron process domain
 #
 
+allow system_crond_t self:capability { dac_override dac_read_search chown setgid setuid fowner net_bind_service fsetid };
+allow system_crond_t self:process { signal_perms setsched };
+allow system_crond_t self:fifo_file rw_fifo_file_perms;
+allow system_crond_t self:passwd rootok;
+
 # This is to handle creation of files in /var/log directory.
 #  Used currently by rpm script log files
 allow system_crond_t cron_log_t:file manage_file_perms;
@@ -268,220 +239,209 @@ logging_log_filetrans(system_crond_t,cron_log_t,file)
 allow system_crond_t cron_var_lib_t:file manage_file_perms;
 files_var_lib_filetrans(system_crond_t,cron_var_lib_t,file)
 
-optional_policy(`
-       # cjp: why?
-       squid_domtrans(system_crond_t)
-')
+allow system_crond_t system_cron_spool_t:file read_file_perms;
+# The entrypoint interface is not used as this is not
+# a regular entrypoint.  Since crontab files are
+# not directly executed, crond must ensure that
+# the crontab file has a type that is appropriate
+# for the domain of the user cron job.  It
+# performs an entrypoint permission check
+# for this purpose.
+allow system_crond_t system_cron_spool_t:file entrypoint;
+
+# Permit a transition from the crond_t domain to this domain.
+# The transition is requested explicitly by the modified crond 
+# via setexeccon.  There is no way to set up an automatic
+# transition, since crontabs are configuration files, not executables.
+allow crond_t system_crond_t:process transition;
+dontaudit crond_t system_crond_t:process { noatsecure siginh rlimitinh };
+allow crond_t system_crond_t:fd use;
+allow system_crond_t crond_t:fd use;
+allow system_crond_t crond_t:fifo_file rw_file_perms;
+allow system_crond_t crond_t:process sigchld;
+
+# Write /var/lock/makewhatis.lock.
+allow system_crond_t system_crond_lock_t:file manage_file_perms;
+files_lock_filetrans(system_crond_t,system_crond_lock_t,file)
+
+# write temporary files
+manage_files_pattern(system_crond_t,crond_tmp_t,system_crond_tmp_t)
+manage_lnk_files_pattern(system_crond_t,crond_tmp_t,system_crond_tmp_t)
+filetrans_pattern(system_crond_t,crond_tmp_t,system_crond_tmp_t,{ file lnk_file })
+files_tmp_filetrans(system_crond_t,system_crond_tmp_t,file)
 
-ifdef(`targeted_policy',`
-       # cjp: FIXME
-       allow crond_t unconfined_t:process transition;
-',`
-       allow system_crond_t self:capability { dac_override dac_read_search chown setgid setuid fowner net_bind_service fsetid };
-       allow system_crond_t self:process { signal_perms setsched };
-       allow system_crond_t self:fifo_file rw_fifo_file_perms;
-       allow system_crond_t self:passwd rootok;
-
-       # The entrypoint interface is not used as this is not
-       # a regular entrypoint.  Since crontab files are
-       # not directly executed, crond must ensure that
-       # the crontab file has a type that is appropriate
-       # for the domain of the user cron job.  It
-       # performs an entrypoint permission check
-       # for this purpose.
-       allow system_crond_t system_cron_spool_t:file entrypoint;
-
-       allow system_crond_t system_cron_spool_t:file read_file_perms;
-
-       # Permit a transition from the crond_t domain to this domain.
-       # The transition is requested explicitly by the modified crond 
-       # via setexeccon.  There is no way to set up an automatic
-       # transition, since crontabs are configuration files, not executables.
-       allow crond_t system_crond_t:process transition;
-       dontaudit crond_t system_crond_t:process { noatsecure siginh rlimitinh };
-       allow crond_t system_crond_t:fd use;
-       allow system_crond_t crond_t:fd use;
-       allow system_crond_t crond_t:fifo_file rw_file_perms;
-       allow system_crond_t crond_t:process sigchld;
-
-       # Write /var/lock/makewhatis.lock.
-       allow system_crond_t system_crond_lock_t:file manage_file_perms;
-       files_lock_filetrans(system_crond_t,system_crond_lock_t,file)
-
-       # write temporary files
-       manage_files_pattern(system_crond_t,crond_tmp_t,system_crond_tmp_t)
-       manage_lnk_files_pattern(system_crond_t,crond_tmp_t,system_crond_tmp_t)
-       filetrans_pattern(system_crond_t,crond_tmp_t,system_crond_tmp_t,{ file lnk_file })
-       files_tmp_filetrans(system_crond_t,system_crond_tmp_t,file)
-
-       # Read from /var/spool/cron.
-       allow system_crond_t cron_spool_t:dir list_dir_perms;
-       allow system_crond_t cron_spool_t:file read_file_perms;
-
-       kernel_read_kernel_sysctls(system_crond_t)
-       kernel_read_system_state(system_crond_t)
-       kernel_read_software_raid_state(system_crond_t)
-
-       # ps does not need to access /boot when run from cron
-       files_dontaudit_search_boot(system_crond_t)
-
-       corecmd_exec_all_executables(system_crond_t)
-
-       corenet_all_recvfrom_unlabeled(system_crond_t)
-       corenet_all_recvfrom_netlabel(system_crond_t)
-       corenet_tcp_sendrecv_all_if(system_crond_t)
-       corenet_udp_sendrecv_all_if(system_crond_t)
-       corenet_tcp_sendrecv_all_nodes(system_crond_t)
-       corenet_udp_sendrecv_all_nodes(system_crond_t)
-       corenet_tcp_sendrecv_all_ports(system_crond_t)
-       corenet_udp_sendrecv_all_ports(system_crond_t)
-
-       dev_getattr_all_blk_files(system_crond_t)
-       dev_getattr_all_chr_files(system_crond_t)
-       dev_read_urand(system_crond_t)
-
-       fs_getattr_all_fs(system_crond_t)
-       fs_getattr_all_files(system_crond_t)
-       fs_getattr_all_symlinks(system_crond_t)
-       fs_getattr_all_pipes(system_crond_t)
-       fs_getattr_all_sockets(system_crond_t)
-
-       # quiet other ps operations
-       domain_dontaudit_read_all_domains_state(system_crond_t)
-
-       files_exec_etc_files(system_crond_t)
-       files_read_etc_files(system_crond_t)
-       files_read_etc_runtime_files(system_crond_t)
-       files_list_all(system_crond_t)
-       files_getattr_all_dirs(system_crond_t)
-       files_getattr_all_files(system_crond_t)
-       files_getattr_all_symlinks(system_crond_t)
-       files_getattr_all_pipes(system_crond_t)
-       files_getattr_all_sockets(system_crond_t)
-       files_read_usr_files(system_crond_t)
-       files_read_var_files(system_crond_t)
-       # for nscd:
-       files_dontaudit_search_pids(system_crond_t)
-       # Access other spool directories like
-       # /var/spool/anacron and /var/spool/slrnpull.
-       files_manage_generic_spool(system_crond_t)
-
-       init_use_script_fds(system_crond_t)
-       init_read_utmp(system_crond_t)
-       init_dontaudit_rw_utmp(system_crond_t)
-       # prelink tells init to restart it self, we either need to allow or dontaudit
-       init_write_initctl(system_crond_t)
-
-       libs_use_ld_so(system_crond_t)
-       libs_use_shared_libs(system_crond_t)
-       libs_exec_lib_files(system_crond_t)
-       libs_exec_ld_so(system_crond_t)
-
-       logging_read_generic_logs(system_crond_t)
-       logging_send_syslog_msg(system_crond_t)
-
-       miscfiles_read_localization(system_crond_t)
-       miscfiles_manage_man_pages(system_crond_t)
-
-       seutil_read_config(system_crond_t)
-
-       ifdef(`distro_redhat', `
-               # Run the rpm program in the rpm_t domain. Allow creation of RPM log files
-               # via redirection of standard out.
-               optional_policy(`
-                       rpm_manage_log(system_crond_t)
-               ')
-       ')
-
-       tunable_policy(`cron_can_relabel',`
-               seutil_domtrans_setfiles(system_crond_t)
-       ',`
-               selinux_get_fs_mount(system_crond_t)
-               selinux_validate_context(system_crond_t)
-               selinux_compute_access_vector(system_crond_t)
-               selinux_compute_create_context(system_crond_t)
-               selinux_compute_relabel_context(system_crond_t)
-               selinux_compute_user_contexts(system_crond_t)
-               seutil_read_file_contexts(system_crond_t)
-       ')
+# Read from /var/spool/cron.
+allow system_crond_t cron_spool_t:dir list_dir_perms;
+allow system_crond_t cron_spool_t:file read_file_perms;
+
+kernel_read_kernel_sysctls(system_crond_t)
+kernel_read_system_state(system_crond_t)
+kernel_read_software_raid_state(system_crond_t)
+
+# ps does not need to access /boot when run from cron
+files_dontaudit_search_boot(system_crond_t)
+
+corecmd_exec_all_executables(system_crond_t)
+
+corenet_all_recvfrom_unlabeled(system_crond_t)
+corenet_all_recvfrom_netlabel(system_crond_t)
+corenet_tcp_sendrecv_all_if(system_crond_t)
+corenet_udp_sendrecv_all_if(system_crond_t)
+corenet_tcp_sendrecv_all_nodes(system_crond_t)
+corenet_udp_sendrecv_all_nodes(system_crond_t)
+corenet_tcp_sendrecv_all_ports(system_crond_t)
+corenet_udp_sendrecv_all_ports(system_crond_t)
+
+dev_getattr_all_blk_files(system_crond_t)
+dev_getattr_all_chr_files(system_crond_t)
+dev_read_urand(system_crond_t)
+
+fs_getattr_all_fs(system_crond_t)
+fs_getattr_all_files(system_crond_t)
+fs_getattr_all_symlinks(system_crond_t)
+fs_getattr_all_pipes(system_crond_t)
+fs_getattr_all_sockets(system_crond_t)
+
+# quiet other ps operations
+domain_dontaudit_read_all_domains_state(system_crond_t)
+
+files_exec_etc_files(system_crond_t)
+files_read_etc_files(system_crond_t)
+files_read_etc_runtime_files(system_crond_t)
+files_list_all(system_crond_t)
+files_getattr_all_dirs(system_crond_t)
+files_getattr_all_files(system_crond_t)
+files_getattr_all_symlinks(system_crond_t)
+files_getattr_all_pipes(system_crond_t)
+files_getattr_all_sockets(system_crond_t)
+files_read_usr_files(system_crond_t)
+files_read_var_files(system_crond_t)
+# for nscd:
+files_dontaudit_search_pids(system_crond_t)
+# Access other spool directories like
+# /var/spool/anacron and /var/spool/slrnpull.
+files_manage_generic_spool(system_crond_t)
+
+init_use_script_fds(system_crond_t)
+init_read_utmp(system_crond_t)
+init_dontaudit_rw_utmp(system_crond_t)
+# prelink tells init to restart it self, we either need to allow or dontaudit
+init_write_initctl(system_crond_t)
+
+libs_use_ld_so(system_crond_t)
+libs_use_shared_libs(system_crond_t)
+libs_exec_lib_files(system_crond_t)
+libs_exec_ld_so(system_crond_t)
+
+logging_read_generic_logs(system_crond_t)
+logging_send_syslog_msg(system_crond_t)
+
+miscfiles_read_localization(system_crond_t)
+miscfiles_manage_man_pages(system_crond_t)
+
+seutil_read_config(system_crond_t)
 
+ifdef(`distro_redhat', `
+       # Run the rpm program in the rpm_t domain. Allow creation of RPM log files
+       # via redirection of standard out.
        optional_policy(`
-               # Needed for certwatch
-               apache_exec_modules(system_crond_t)
-               apache_read_config(system_crond_t)
-               apache_read_log(system_crond_t)
-               apache_read_sys_content(system_crond_t)
+               rpm_manage_log(system_crond_t)
        ')
+')
 
-       optional_policy(`
-               cyrus_manage_data(system_crond_t)
-       ')
+tunable_policy(`cron_can_relabel',`
+       seutil_domtrans_setfiles(system_crond_t)
+',`
+       selinux_get_fs_mount(system_crond_t)
+       selinux_validate_context(system_crond_t)
+       selinux_compute_access_vector(system_crond_t)
+       selinux_compute_create_context(system_crond_t)
+       selinux_compute_relabel_context(system_crond_t)
+       selinux_compute_user_contexts(system_crond_t)
+       seutil_read_file_contexts(system_crond_t)
+')
 
-       optional_policy(`
-               ftp_read_log(system_crond_t)
-       ')
+optional_policy(`
+       # Needed for certwatch
+       apache_exec_modules(system_crond_t)
+       apache_read_config(system_crond_t)
+       apache_read_log(system_crond_t)
+       apache_read_sys_content(system_crond_t)
+')
 
-       optional_policy(`
-               inn_manage_log(system_crond_t)
-               inn_manage_pid(system_crond_t)
-               inn_read_config(system_crond_t)
-       ')
+optional_policy(`
+       cyrus_manage_data(system_crond_t)
+')
 
-       optional_policy(`
-               mrtg_append_create_logs(system_crond_t)
-       ')
+optional_policy(`
+       ftp_read_log(system_crond_t)
+')
 
-       optional_policy(`
-               mta_send_mail(system_crond_t)
-       ')
+optional_policy(`
+       inn_manage_log(system_crond_t)
+       inn_manage_pid(system_crond_t)
+       inn_read_config(system_crond_t)
+')
 
-       optional_policy(`
-               mysql_read_config(system_crond_t)
-       ')
+optional_policy(`
+       mrtg_append_create_logs(system_crond_t)
+')
 
-       optional_policy(`
-               nis_use_ypbind(system_crond_t)
-       ')
+optional_policy(`
+       mta_send_mail(system_crond_t)
+')
 
-       optional_policy(`
-               nscd_socket_use(system_crond_t)
-       ')
+optional_policy(`
+       mysql_read_config(system_crond_t)
+')
 
-       optional_policy(`
-               postfix_read_config(system_crond_t)
-       ')      
+optional_policy(`
+       nis_use_ypbind(system_crond_t)
+')
 
-       optional_policy(`
-               prelink_read_cache(system_crond_t)
-               prelink_manage_log(system_crond_t)
-               prelink_delete_cache(system_crond_t)
-       ')
+optional_policy(`
+       nscd_socket_use(system_crond_t)
+')
 
-       optional_policy(`
-               samba_read_config(system_crond_t)
-               samba_read_log(system_crond_t)
-               #samba_read_secrets(system_crond_t)
-       ')
+optional_policy(`
+       postfix_read_config(system_crond_t)
+')     
 
-       optional_policy(`
-               slocate_create_append_log(system_crond_t)
-       ')
+optional_policy(`
+       prelink_read_cache(system_crond_t)
+       prelink_manage_log(system_crond_t)
+       prelink_delete_cache(system_crond_t)
+')
 
-       optional_policy(`
-               sysstat_manage_log(system_crond_t)
-       ')
+optional_policy(`
+       samba_read_config(system_crond_t)
+       samba_read_log(system_crond_t)
+       #samba_read_secrets(system_crond_t)
+')
+
+optional_policy(`
+       slocate_create_append_log(system_crond_t)
+')
 
-       ifdef(`TODO',`
-       dontaudit userdomain system_crond_t:fd use;
+optional_policy(`
+       # cjp: why?
+       squid_domtrans(system_crond_t)
+')
 
-       allow system_crond_t { sysfs_t rpc_pipefs_t }:dir getattr;
+optional_policy(`
+       sysstat_manage_log(system_crond_t)
+')
 
-       # for if /var/mail is a symlink
-       allow system_crond_t mail_spool_t:lnk_file read;
+optional_policy(`
+       unconfined_domain(system_crond_t)
 
-       ifdef(`mta.te', `
-       allow mta_user_agent system_crond_t:fd use;
-       r_dir_file(system_mail_t, crond_tmp_t)
-       ')
-       ') dnl end TODO
+       userdom_priveleged_home_dir_manager(system_crond_t)
+')
+
+ifdef(`TODO',`
+ifdef(`mta.te', `
+allow system_crond_t mail_spool_t:lnk_file read;
+allow mta_user_agent system_crond_t:fd use;
+r_dir_file(system_mail_t, crond_tmp_t)
 ')
+') dnl end TODO
index 4ddf3daa9a2789d622848fdbdde4e2dc35451f08..fc06d64f735ed315ebc207889d6d95de427c0d0b 100644 (file)
@@ -231,25 +231,6 @@ ifdef(`enable_mls',`
        lpd_relabel_spool(cupsd_t)
 ')
 
-ifdef(`targeted_policy',`
-       files_dontaudit_read_root_files(cupsd_t)
-
-       term_dontaudit_use_unallocated_ttys(cupsd_t)
-       term_dontaudit_use_generic_ptys(cupsd_t)
-
-       init_stream_connect_script(cupsd_t)
-
-       unconfined_rw_pipes(cupsd_t)
-
-       optional_policy(`
-               init_dbus_chat_script(cupsd_t)
-
-               unconfined_dbus_send(cupsd_t)
-
-               dbus_stub(cupsd_t)
-       ')
-')
-
 optional_policy(`
        apm_domtrans_client(cupsd_t)
 ')
@@ -395,15 +376,6 @@ ifdef(`distro_redhat',`
        ')
 ')
 
-ifdef(`targeted_policy',`
-       files_dontaudit_read_root_files(cupsd_config_t)
-
-       term_dontaudit_use_unallocated_ttys(cupsd_config_t)
-       term_use_generic_ptys(cupsd_config_t)
-
-       unconfined_rw_pipes(cupsd_config_t)
-')
-
 optional_policy(`
        cron_system_entry(cupsd_config_t, cupsd_config_exec_t)
 ')
@@ -617,12 +589,6 @@ userdom_dontaudit_search_all_users_home_content(hplip_t)
 
 lpd_read_config(cupsd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(hplip_t)
-       term_dontaudit_use_generic_ptys(hplip_t)
-       files_dontaudit_read_root_files(hplip_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(hplip_t)
 ')
@@ -695,12 +661,6 @@ sysnet_read_config(ptal_t)
 userdom_dontaudit_use_unpriv_user_fds(ptal_t)
 userdom_dontaudit_search_all_users_home_content(ptal_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(ptal_t)
-       term_dontaudit_use_generic_ptys(ptal_t)
-       files_dontaudit_read_root_files(ptal_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(ptal_t)
 ')
index 23ede8587c659ce006644ac6dbb83c8b1a941c81..8b6300a734884b14a6215f515b7eeea753d16597 100644 (file)
@@ -109,17 +109,10 @@ sysnet_read_config(cyrus_t)
 userdom_dontaudit_use_unpriv_user_fds(cyrus_t)
 userdom_dontaudit_search_sysadm_home_dirs(cyrus_t)
 userdom_use_unpriv_users_fds(cyrus_t)
-userdom_use_sysadm_ptys(cyrus_t)
 
 mta_manage_spool(cyrus_t)
 mta_send_mail(cyrus_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(cyrus_t)
-       term_dontaudit_use_generic_ptys(cyrus_t)
-       files_dontaudit_read_root_files(cyrus_t)
-')
-
 optional_policy(`
        cron_system_entry(cyrus_t,cyrus_exec_t)
 ')
index b42135579d377ed0f8ee0a6f43112f5bf8a8c3b3..1bc9f6448bbae6149df8d57d2c4b50943e942304 100644 (file)
@@ -74,12 +74,6 @@ sysnet_read_config(dante_t)
 userdom_dontaudit_use_unpriv_user_fds(dante_t)
 userdom_dontaudit_search_sysadm_home_dirs(dante_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dante_t)
-       term_dontaudit_use_generic_ptys(dante_t)
-       files_dontaudit_read_root_files(dante_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(dante_t)
 ')
index 5587696d41ceab153ab716cdfc170d922068829c..9d0cfe37817428ad5a93775a0ebb56fb96d11756 100644 (file)
@@ -13,6 +13,7 @@
 interface(`dbus_stub',`
        gen_require(`
                type system_dbusd_t;
+               class dbus all_dbus_perms;
        ')
 ')
 
index c2cb1c0b8e84ad010b6b8edd6ea5511f444beff9..12f7737537fbec75b01d1b74b7dbe8946f2e82bc 100644 (file)
@@ -2,7 +2,7 @@
 policy_module(dbus,1.7.0)
 
 gen_require(`
-       class dbus { send_msg acquire_svc };
+       class dbus all_dbus_perms;
 ')
 
 ##############################
@@ -108,12 +108,6 @@ seutil_sigchld_newrole(system_dbusd_t)
 userdom_dontaudit_use_unpriv_user_fds(system_dbusd_t)
 userdom_dontaudit_search_sysadm_home_dirs(system_dbusd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(system_dbusd_t)
-       term_dontaudit_use_generic_ptys(system_dbusd_t)
-       files_dontaudit_read_root_files(system_dbusd_t)
-')
-
 tunable_policy(`read_default_t',`
        files_list_default(system_dbusd_t)
        files_read_default_files(system_dbusd_t)
index 450bb5304ad5b5a2ea5eed88febb92ba31aef1dd..d966d1369e8e66353162882a1b0b0794764e55c9 100644 (file)
@@ -275,12 +275,6 @@ sysnet_dns_name_resolve(dccd_t)
 userdom_dontaudit_use_unpriv_user_fds(dccd_t)
 userdom_dontaudit_search_sysadm_home_dirs(dccd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dccd_t)
-       term_dontaudit_use_generic_ptys(dccd_t)
-       files_dontaudit_read_root_files(dccd_t)
-')
-
 optional_policy(`
        nscd_socket_use(dccd_t)
 ')
@@ -354,12 +348,6 @@ sysnet_dns_name_resolve(dccifd_t)
 userdom_dontaudit_use_unpriv_user_fds(dccifd_t)
 userdom_dontaudit_search_sysadm_home_dirs(dccifd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dccifd_t)
-       term_dontaudit_use_generic_ptys(dccifd_t)
-       files_dontaudit_read_root_files(dccifd_t)
-')
-
 optional_policy(`
        nscd_socket_use(dccifd_t)
 ')
@@ -432,12 +420,6 @@ sysnet_dns_name_resolve(dccm_t)
 userdom_dontaudit_use_unpriv_user_fds(dccm_t)
 userdom_dontaudit_search_sysadm_home_dirs(dccm_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dccm_t)
-       term_dontaudit_use_generic_ptys(dccm_t)
-       files_dontaudit_read_root_files(dccm_t)
-')
-
 optional_policy(`
        nscd_socket_use(dccm_t)
 ')
index 4c0420b6d77f96fa5f381625b6fb98828186de9c..89aa5ad779645ba34d000b1be9e13311711608a6 100644 (file)
@@ -100,12 +100,6 @@ sysnet_read_config(ddclient_t)
 userdom_dontaudit_use_unpriv_user_fds(ddclient_t)
 userdom_dontaudit_search_sysadm_home_dirs(ddclient_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(ddclient_t)
-       term_dontaudit_use_generic_ptys(ddclient_t)
-       files_dontaudit_read_root_files(ddclient_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(ddclient_t)
 ')
index 257cda745575f346dcd694b55bb98cca6cf4f4a1..c4cd9964c96cba84ad6c086c879e3efbc720d17c 100644 (file)
@@ -105,12 +105,6 @@ ifdef(`distro_gentoo',`
        allow dhcpd_t self:capability { chown dac_override setgid setuid sys_chroot };
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dhcpd_t)
-       term_dontaudit_use_generic_ptys(dhcpd_t)
-       files_dontaudit_read_root_files(dhcpd_t)
-')
-
 optional_policy(`
        # used for dynamic DNS
        bind_read_dnssec_keys(dhcpd_t)
index f78306a1f309f4940c14e87b735f63f8d97d212e..2bd1d91c8292f1b40d314a8e1a7657e20aaec4ec 100644 (file)
@@ -76,12 +76,6 @@ sysnet_read_config(dictd_t)
 
 userdom_dontaudit_use_unpriv_user_fds(dictd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dictd_t)
-       term_dontaudit_use_generic_ptys(dictd_t)
-       files_dontaudit_read_root_files(dictd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(dictd_t)
 ')
index 49b4b687d53339319e3042d9a6d9abfd9e97a2b6..844c8393373a4f7ad10043b98591a5071d9fc809 100644 (file)
@@ -83,12 +83,6 @@ sysnet_read_config(distccd_t)
 userdom_dontaudit_use_unpriv_user_fds(distccd_t)
 userdom_dontaudit_search_sysadm_home_dirs(distccd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(distccd_t)
-       term_dontaudit_use_generic_ptys(distccd_t)
-       files_dontaudit_read_root_files(distccd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(distccd_t)
 ')
index e4a2c8b8aeee017df46e954a995abc2991f59691..42b6bf419462f17bbb32eafd5bf800bbb8a7689c 100644 (file)
@@ -83,12 +83,6 @@ sysnet_read_config(dnsmasq_t)
 userdom_dontaudit_use_unpriv_user_fds(dnsmasq_t)
 userdom_dontaudit_search_sysadm_home_dirs(dnsmasq_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dnsmasq_t)
-       term_dontaudit_use_generic_ptys(dnsmasq_t)
-       files_dontaudit_read_root_files(dnsmasq_t)
-')
-
 optional_policy(`
        nis_use_ypbind(dnsmasq_t)
 ')
index 81b3f6d8e20f30c1080d4c2f0a95c991b9144c9c..a0af2deba892639eaec2c3cc4e3b4f1c5ae8ba5b 100644 (file)
@@ -120,12 +120,6 @@ userdom_priveleged_home_dir_manager(dovecot_t)
 
 mta_manage_spool(dovecot_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(dovecot_t)
-       term_dontaudit_use_generic_ptys(dovecot_t)
-       files_dontaudit_read_root_files(dovecot_t)
-')
-
 optional_policy(`
        kerberos_use(dovecot_t)
 ')
index 360a251c9d1e46018e98f8c40d7b77e221d321d9..c0d48ce5313be5afea2250d5134bd5d8d3bac9ac 100644 (file)
@@ -55,11 +55,6 @@ logging_read_generic_logs(fail2ban_t)
 
 miscfiles_read_localization(fail2ban_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(fail2ban_t)
-       term_dontaudit_use_generic_ptys(fail2ban_t)
-')
-
 optional_policy(`
        apache_read_log(fail2ban_t)
 ')
index f1bbac5d1467b51760316c3d9dbb6119b1a3a7bd..23ab327801e35c7d6daa70e246dca968b98789f9 100644 (file)
@@ -85,12 +85,6 @@ sysnet_read_config(fetchmail_t)
 userdom_dontaudit_use_unpriv_user_fds(fetchmail_t)
 userdom_dontaudit_search_sysadm_home_dirs(fetchmail_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(fetchmail_t)
-       term_dontaudit_use_generic_ptys(fetchmail_t)
-       files_dontaudit_read_root_files(fetchmail_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(fetchmail_t)
 ')
index cb62ac1f786909ada7eefe6f70245ecf7653a252..c2b0997d531cbf5e7d8cf94679412dc7fab7d65b 100644 (file)
@@ -98,12 +98,6 @@ userdom_dontaudit_search_sysadm_home_dirs(fingerd_t)
 # have to change this when we create a type for Maildir
 userdom_dontaudit_search_generic_user_home_dirs(fingerd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(fingerd_t)
-       term_dontaudit_use_generic_ptys(fingerd_t)
-       files_dontaudit_read_root_files(fingerd_t)
-')
-
 optional_policy(`
        cron_system_entry(fingerd_t, fingerd_exec_t)
 ')
index e3bbfb5d4b8e3c822d2caaef33c81487e22f74b7..f24bd2671f74e1e24d5290ccb23c1216f3921b1d 100644 (file)
@@ -124,3 +124,34 @@ interface(`ftp_domtrans_ftpdctl',`
        corecmd_search_bin($1)
        domtrans_pattern($1, ftpdctl_exec_t, ftpdctl_t)
 ')
+
+########################################
+## <summary>
+##     Execute the ftpdctl program in the ftpdctl domain.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+## <param name="role">
+##     <summary>
+##     The role to allow the ftpdctl domain.
+##     </summary>
+## </param>
+## <param name="terminal">
+##     <summary>
+##     The type of the terminal allow the ftpdctl domain to use.
+##     </summary>
+## </param>
+## <rolecap/>
+#
+interface(`ftp_run_ftpdctl',`
+       gen_require(`
+               type ftpdctl_t;
+       ')
+
+       ftp_domtrans_ftpdctl($1)
+       role $2 types ftpdctl_t;
+       allow ftpdctl_t $3:chr_file rw_term_perms;
+')
index 450074a8d08bbe7896bf649038d56ab4b9c39224..ee383b31ac6db1448b8495409d15ea5b3f86f6c2 100644 (file)
@@ -181,13 +181,6 @@ sysnet_use_ldap(ftpd_t)
 userdom_dontaudit_search_sysadm_home_dirs(ftpd_t)
 userdom_dontaudit_use_unpriv_user_fds(ftpd_t)
 
-ifdef(`targeted_policy',`
-       files_dontaudit_read_root_files(ftpd_t)
-
-       term_dontaudit_use_generic_ptys(ftpd_t)
-       term_dontaudit_use_unallocated_ttys(ftpd_t)
-')
-
 tunable_policy(`allow_ftpd_anon_write',`
        miscfiles_manage_public_files(ftpd_t)
 ')
@@ -224,10 +217,6 @@ tunable_policy(`ftp_home_dir',`
        userdom_manage_all_users_home_content_dirs(ftpd_t)
        userdom_manage_all_users_home_content_files(ftpd_t)
        userdom_manage_all_users_home_content_symlinks(ftpd_t)
-
-       ifdef(`targeted_policy',`
-               userdom_generic_user_home_dir_filetrans_generic_user_home_content(ftpd_t,{ dir file lnk_file sock_file fifo_file })
-       ')
 ')
 
 tunable_policy(`ftp_home_dir && use_nfs_home_dirs',`
@@ -300,7 +289,3 @@ files_read_etc_files(ftpdctl_t)
 
 libs_use_ld_so(ftpdctl_t)
 libs_use_shared_libs(ftpdctl_t)
-
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(ftpdctl_t)
-')
index fdee3a1827d9c9b109ad68b500f6743feb533eb3..0c12d3c8d2fc3526eb595e9b587107e06b334b60 100644 (file)
@@ -90,12 +90,6 @@ sysnet_read_config(gatekeeper_t)
 userdom_dontaudit_use_unpriv_user_fds(gatekeeper_t)
 userdom_dontaudit_search_sysadm_home_dirs(gatekeeper_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(gatekeeper_t)
-       term_dontaudit_use_generic_ptys(gatekeeper_t)
-       files_dontaudit_read_root_files(gatekeeper_t)
-')
-
 optional_policy(`
        nis_use_ypbind(gatekeeper_t)
 ')
index 977de38d8cb692827c82e348f93a471d78982596..3299d0dfa521b27b756c9311cc609921f557a02d 100644 (file)
@@ -71,12 +71,6 @@ miscfiles_read_localization(gpm_t)
 userdom_dontaudit_use_unpriv_user_fds(gpm_t)
 userdom_dontaudit_search_sysadm_home_dirs(gpm_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(gpm_t)
-       term_dontaudit_use_generic_ptys(gpm_t)
-       files_dontaudit_read_root_files(gpm_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(gpm_t)
 ')
index f368e3ba4f589ff61c2a3453c1b08a2296a9e719..e250c0776f9228ad2b52a9bb9e31096020f5cc72 100644 (file)
@@ -195,11 +195,6 @@ sysnet_read_config(hald_t)
 userdom_dontaudit_use_unpriv_user_fds(hald_t)
 userdom_dontaudit_search_sysadm_home_dirs(hald_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(hald_t)
-       files_dontaudit_read_root_files(hald_t)
-')
-
 optional_policy(`
        alsa_domtrans(hald_t)
        alsa_read_rw_config(hald_t)
@@ -332,11 +327,6 @@ libs_use_shared_libs(hald_acl_t)
 
 miscfiles_read_localization(hald_acl_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_console(hald_acl_t)
-       term_dontaudit_use_generic_ptys(hald_acl_t)
-')
-
 ########################################
 #
 # Local hald mac policy
@@ -359,11 +349,6 @@ libs_use_shared_libs(hald_mac_t)
 
 miscfiles_read_localization(hald_mac_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_console(hald_mac_t)
-       term_dontaudit_use_generic_ptys(hald_mac_t)
-')
-
 ########################################
 #
 # Local hald sonypic policy
@@ -387,11 +372,6 @@ libs_use_shared_libs(hald_sonypic_t)
 
 miscfiles_read_localization(hald_sonypic_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_console(hald_sonypic_t)
-       term_dontaudit_use_generic_ptys(hald_sonypic_t)
-')
-
 ########################################
 #
 # Hal keymap local policy
index 7e2180b2ee4f74a431337c1ea570c3dd8f6e7021..801d07dd986b1779718c66671f5bd36574eacfd6 100644 (file)
@@ -71,12 +71,6 @@ sysnet_read_config(howl_t)
 userdom_dontaudit_use_unpriv_user_fds(howl_t)
 userdom_dontaudit_search_sysadm_home_dirs(howl_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(howl_t)
-       term_dontaudit_use_generic_ptys(howl_t)
-       files_dontaudit_read_root_files(howl_t)
-')
-
 optional_policy(`
        nis_use_ypbind(howl_t)
 ')
index afa14416813a1ba24557c45b16e02d0813d6dfb7..480798f08bd4d36967c43f6673a5bc6b24a4056d 100644 (file)
@@ -80,12 +80,6 @@ userdom_dontaudit_use_unpriv_user_fds(i18n_input_t)
 userdom_dontaudit_search_sysadm_home_dirs(i18n_input_t)
 userdom_read_unpriv_users_home_content_files(i18n_input_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(i18n_input_t)
-       term_dontaudit_use_generic_ptys(i18n_input_t)
-       files_dontaudit_read_root_files(i18n_input_t)
-')
-
 tunable_policy(`use_nfs_home_dirs',`
        fs_read_nfs_files(i18n_input_t)
        fs_read_nfs_symlinks(i18n_input_t)
index a998007b2b781464c12141cb16259a2ee075c623..92200c7ed84620afd5b08d757e165d656299f8f4 100644 (file)
@@ -90,12 +90,6 @@ sysnet_read_config(imazesrv_t)
 userdom_use_unpriv_users_fds(imazesrv_t)
 userdom_dontaudit_search_sysadm_home_dirs(imazesrv_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(imazesrv_t)
-       term_dontaudit_use_generic_ptys(imazesrv_t)
-       files_dontaudit_read_root_files(imazesrv_t)
-')
-
 optional_policy(`
        nis_use_ypbind(imazesrv_t)
 ')
index 72ba24929e92ba1f6d01e7f62d4691b2ce602b64..f952d22f30c48bf9d853190c35798c850328f702 100644 (file)
@@ -151,13 +151,6 @@ ifdef(`enable_mls',`
        corenet_tcp_recvfrom_netlabel(inetd_t)
        corenet_udp_recvfrom_netlabel(inetd_t)
 ')
-
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(inetd_t)
-       term_dontaudit_use_generic_ptys(inetd_t)
-       files_dontaudit_read_root_files(inetd_t)
-')
-
 optional_policy(`
        amanda_search_lib(inetd_t)
 ')
@@ -170,12 +163,8 @@ optional_policy(`
        udev_read_db(inetd_t)
 ')
 
-ifdef(`targeted_policy',`
-       unconfined_domain(inetd_t)
-',`
-       optional_policy(`
-               unconfined_domtrans(inetd_t)
-       ')
+optional_policy(`
+       unconfined_domtrans(inetd_t)
 ')
 
 ########################################
@@ -230,11 +219,10 @@ miscfiles_read_localization(inetd_child_t)
 
 sysnet_read_config(inetd_child_t)
 
-ifdef(`targeted_policy',`
-       unconfined_domain(inetd_child_t)
-')
-
 optional_policy(`
        kerberos_use(inetd_child_t)
 ')
 
+optional_policy(`
+       unconfined_domain(inetd_child_t)
+')
index 125b9cb6b9b0ff0038dd9bd523b2a9fed290e6c8..302cb65109902c1b1ff0a137ee613e0492e82358 100644 (file)
@@ -109,12 +109,6 @@ userdom_dontaudit_search_sysadm_home_dirs(innd_t)
 
 mta_send_mail(innd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(innd_t)
-       term_dontaudit_use_generic_ptys(innd_t)
-       files_dontaudit_read_root_files(innd_t)
-')
-
 optional_policy(`
        cron_system_entry(innd_t, innd_exec_t)
 ')
index 85516749c0970d8911e26b342f6a63ec94d30593..da7b45755bd8b0b42f2224298f7b3365feedec3a 100644 (file)
@@ -84,12 +84,6 @@ sysnet_read_config(ircd_t)
 userdom_dontaudit_use_unpriv_user_fds(ircd_t)
 userdom_dontaudit_search_sysadm_home_dirs(ircd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(ircd_t)
-       term_dontaudit_use_generic_ptys(ircd_t)
-       files_dontaudit_read_root_files(ircd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(ircd_t)
 ')
index bfac2d5455a5a331dbc5d2588e24718be81a0dc3..55231423dfe9201dd293b77c8c140374327fa072 100644 (file)
@@ -52,12 +52,6 @@ miscfiles_read_localization(irqbalance_t)
 userdom_dontaudit_use_unpriv_user_fds(irqbalance_t)
 userdom_dontaudit_search_sysadm_home_dirs(irqbalance_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(irqbalance_t)
-       term_dontaudit_use_generic_ptys(irqbalance_t)
-       files_dontaudit_read_root_files(irqbalance_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(irqbalance_t)
 ')
index 12ae9458d034896a1506e71804dc75610f32e8b9..8ac8c3c69d937ded38a5ca8b3713264dfb098855 100644 (file)
@@ -82,12 +82,6 @@ sysnet_read_config(jabberd_t)
 userdom_dontaudit_use_unpriv_user_fds(jabberd_t)
 userdom_dontaudit_search_sysadm_home_dirs(jabberd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(jabberd_t)
-       term_dontaudit_use_generic_ptys(jabberd_t)
-       files_dontaudit_read_root_files(jabberd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(jabberd_t)
 ')
index ae02e95beaaa9da35d0421e61dbe08507c3ef042..a67c3029afb82678d92697c49f92a0f67ea9f157 100644 (file)
@@ -131,12 +131,6 @@ sysnet_read_config(kadmind_t)
 userdom_dontaudit_use_unpriv_user_fds(kadmind_t)
 userdom_dontaudit_search_sysadm_home_dirs(kadmind_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(kadmind_t)
-       term_dontaudit_use_generic_ptys(kadmind_t)
-       files_dontaudit_read_root_files(kadmind_t)
-')
-
 optional_policy(`
        nis_use_ypbind(kadmind_t)
 ')
@@ -233,12 +227,6 @@ sysnet_read_config(krb5kdc_t)
 userdom_dontaudit_use_unpriv_user_fds(krb5kdc_t)
 userdom_dontaudit_search_sysadm_home_dirs(krb5kdc_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(krb5kdc_t)
-       term_dontaudit_use_generic_ptys(krb5kdc_t)
-       files_dontaudit_read_root_files(krb5kdc_t)
-')
-
 optional_policy(`
        nis_use_ypbind(krb5kdc_t)
 ')
index 6785893a363b709c0301c7e245ca5aa25cb14ba8..438450496426bcf507b617ef6005ab45d3758cf4 100644 (file)
@@ -78,11 +78,6 @@ miscfiles_read_localization(ktalkd_t)
 
 sysnet_read_config(ktalkd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(ktalkd_t)
-       term_dontaudit_use_unallocated_ttys(ktalkd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(ktalkd_t)
 ')
index 0b947fdb814305b6554fd023ce1ff9a30dd07a72..71d4a5c27e43fbd328b55adff9ef2f4b92107757 100644 (file)
@@ -117,21 +117,6 @@ sysnet_read_config(slapd_t)
 userdom_dontaudit_use_unpriv_user_fds(slapd_t)
 userdom_dontaudit_search_sysadm_home_dirs(slapd_t)
 
-ifdef(`targeted_policy',`
-       #reh slapcat will want to talk to the terminal
-       term_use_generic_ptys(slapd_t)
-       term_use_unallocated_ttys(slapd_t)
-
-       userdom_search_generic_user_home_dirs(slapd_t)
-       #need to be able to read ldif files created by root
-       # cjp: fix to not use templated interface:
-       userdom_read_user_home_content_files(user,slapd_t)
-
-       term_dontaudit_use_unallocated_ttys(slapd_t)
-       term_dontaudit_use_generic_ptys(slapd_t)
-       files_dontaudit_read_root_files(slapd_t)
-')
-
 optional_policy(`
        kerberos_use(slapd_t)
 ')
index 52c628a42bf4f8dc286c1005e5bb0b84c95127b9..d69c48b91d46c4f602ac161a98c9e26a63ab00b3 100644 (file)
@@ -103,11 +103,6 @@ libs_use_shared_libs(checkpc_t)
 
 sysnet_read_config(checkpc_t)
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(checkpc_t)
-       term_use_unallocated_ttys(checkpc_t)
-')
-
 optional_policy(`
        cron_system_entry(checkpc_t,checkpc_exec_t)
 ')
@@ -207,12 +202,6 @@ sysnet_read_config(lpd_t)
 userdom_dontaudit_use_unpriv_user_fds(lpd_t)
 userdom_dontaudit_search_sysadm_home_dirs(lpd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(lpd_t)
-       term_dontaudit_use_generic_ptys(lpd_t)
-       files_dontaudit_read_root_files(lpd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(lpd_t)
 ')
index a8b621c5bef99481cb0cd5f622d351139bf5d96d..1b321d0227c78e53385f35b1b625b5c1ec911acd 100644 (file)
@@ -76,12 +76,6 @@ sysnet_read_config(monopd_t)
 userdom_dontaudit_use_unpriv_user_fds(monopd_t)
 userdom_dontaudit_search_sysadm_home_dirs(monopd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(monopd_t)
-       term_dontaudit_use_generic_ptys(monopd_t)
-       files_dontaudit_read_root_files(monopd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(monopd_t)
 ')
index 905dbbc21aea707684d4a13b3de05136d67430dc..b701897dd09f955b7b0a38a1f5b41cf93a402a9a 100644 (file)
@@ -263,10 +263,8 @@ template(`mta_admin_template',`
                type $1_mail_t;
        ')
 
-       ifdef(`strict_policy',`
-               # allow the sysadmin to do "mail someone < /home/user/whatever"
-               userdom_read_unpriv_users_home_content_files($1_mail_t)
-       ')
+       # allow the sysadmin to do "mail someone < /home/user/whatever"
+       userdom_read_unpriv_users_home_content_files($1_mail_t)
 
        optional_policy(`
                gen_require(`
index f4589fca74d5da8bfb3be3f3b804c90c97cf4d76..7d587f57d5fd11b380590242aab8d682ca09883e 100644 (file)
@@ -31,14 +31,6 @@ application_executable_file(sendmail_exec_t)
 mta_base_mail_template(system)
 role system_r types system_mail_t;
 
-# cjp: need to resolve this, but require{}
-# does not work in the else part of the optional
-#ifdef(`strict_policy',`
-#      optional_policy(`',`
-#              init_system_domain(system_mail_t,sendmail_exec_t)
-#      ')
-#')
-
 ########################################
 #
 # System mail local policy
@@ -60,34 +52,6 @@ init_use_script_ptys(system_mail_t)
 userdom_use_sysadm_terms(system_mail_t)
 userdom_dontaudit_search_sysadm_home_dirs(system_mail_t)
 
-ifdef(`targeted_policy',`
-       typealias system_mail_t alias sysadm_mail_t;
-
-       manage_dirs_pattern(system_mail_t,mail_spool_t,mail_spool_t)
-       manage_files_pattern(system_mail_t,mail_spool_t,mail_spool_t)
-       manage_lnk_files_pattern(system_mail_t,mail_spool_t,mail_spool_t)
-       manage_fifo_files_pattern(system_mail_t,mail_spool_t,mail_spool_t)
-
-       # for reading .forward - maybe we need a new type for it?
-       # also for delivering mail to maildir
-       userdom_manage_generic_user_home_content_dirs(mailserver_delivery)
-       userdom_manage_generic_user_home_content_files(mailserver_delivery)
-       userdom_manage_generic_user_home_content_symlinks(mailserver_delivery)
-       userdom_manage_generic_user_home_content_sockets(mailserver_delivery)
-       userdom_manage_generic_user_home_content_pipes(mailserver_delivery)
-       userdom_generic_user_home_dir_filetrans_generic_user_home_content(mailserver_delivery,{ dir file lnk_file sock_file fifo_file })
-
-# cjp: another require-in-else to resolve
-#      optional_policy(`',`
-               corecmd_exec_all_executables(system_mail_t)
-
-               files_exec_etc_files(system_mail_t)
-
-               libs_exec_ld_so(system_mail_t)
-               libs_exec_lib_files(system_mail_t)
-#      ')
-')
-
 optional_policy(`
        apache_read_squirrelmail_data(system_mail_t)
        apache_append_squirrelmail_data(system_mail_t)
@@ -181,9 +145,11 @@ optional_policy(`
        # why is mail delivered to a directory of type arpwatch_data_t?
        arpwatch_search_data(mailserver_delivery)
        arpwatch_manage_tmp_files(mta_user_agent)
+
        ifdef(`hide_broken_symptoms', `
                arpwatch_dontaudit_rw_packet_sockets(mta_user_agent)
        ')
+
        optional_policy(`
                cron_read_system_job_tmp_files(mta_user_agent)
        ')
index 19037dd16e10a4ac5f7b8cadb053ff398a7964f0..a9d33cab4f661c4a11c6d65284bd1a2c10733d7d 100644 (file)
@@ -98,12 +98,6 @@ sysnet_read_config(munin_t)
 userdom_dontaudit_use_unpriv_user_fds(munin_t)
 userdom_dontaudit_search_sysadm_home_dirs(munin_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(munin_t)
-       term_dontaudit_use_generic_ptys(munin_t)
-       files_dontaudit_read_root_files(munin_t)
-')
-
 optional_policy(`
        # for accessing the output directory
        apache_search_sys_content(munin_t)
index acb6bd41cf61ef58b745000e7976dba7e1b4d6b3..fe73b60f66e86e16574fd0e0ebb745756b9a6479 100644 (file)
@@ -108,12 +108,6 @@ ifdef(`distro_redhat',`
        type_transition mysqld_t mysqld_db_t:sock_file mysqld_var_run_t;
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(mysqld_t)
-       term_dontaudit_use_generic_ptys(mysqld_t)
-       files_dontaudit_read_root_files(mysqld_t)
-')
-
 optional_policy(`
        daemontools_service_domain(mysqld_t, mysqld_exec_t)
 ')
index 38ef62a915b5e06c47b09634f3a331bfbdfeb006..2b1fb2eb08bce5235be1c130693f6e67a28c1e26 100644 (file)
@@ -105,12 +105,6 @@ userdom_dontaudit_search_sysadm_home_dirs(nagios_t)
 
 mta_send_mail(nagios_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(nagios_t)
-       term_dontaudit_use_generic_ptys(nagios_t)
-       files_dontaudit_read_root_files(nagios_t)
-')
-
 optional_policy(`
        auth_use_nsswitch(nagios_t)
 ')
@@ -211,12 +205,6 @@ miscfiles_read_localization(nrpe_t)
 
 userdom_dontaudit_use_unpriv_user_fds(nrpe_t)
 
-ifdef(`targeted_policy',`
-        term_dontaudit_use_unallocated_ttys(nrpe_t)
-        term_dontaudit_use_generic_ptys(nrpe_t)
-        files_dontaudit_read_root_files(nrpe_t)
-')
-
 optional_policy(`
        inetd_tcp_service_domain(nrpe_t, nrpe_exec_t)
 ')
index 7f96fefb08eec9798463ef9b3b5f66b2380326bb..027d713e95410c3192a4a2addceadc43c28b1a29 100644 (file)
@@ -96,12 +96,6 @@ sysnet_read_config(nessusd_t)
 userdom_dontaudit_use_unpriv_user_fds(nessusd_t)
 userdom_dontaudit_search_sysadm_home_dirs(nessusd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(nessusd_t)
-       term_dontaudit_use_generic_ptys(nessusd_t)
-       files_dontaudit_read_root_files(nessusd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(nessusd_t)
 ')
index b403519110afe7c610a4990fa0161f2591976284..03d6c32604395a63d239f9f4b48d4b9142325368 100644 (file)
@@ -111,18 +111,8 @@ sysnet_etc_filetrans_config(NetworkManager_t)
 userdom_dontaudit_use_unpriv_user_fds(NetworkManager_t)
 userdom_dontaudit_search_sysadm_home_dirs(NetworkManager_t)
 userdom_dontaudit_use_unpriv_users_ttys(NetworkManager_t)
-
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(NetworkManager_t)
-       term_dontaudit_use_generic_ptys(NetworkManager_t)
-       files_dontaudit_read_root_files(NetworkManager_t)
-       # Read gnome-keyring
-       userdom_read_generic_user_home_content_files(NetworkManager_t)
-
-       optional_policy(`
-               unconfined_rw_pipes(NetworkManager_t)
-       ')
-')
+# Read gnome-keyring
+userdom_read_unpriv_users_home_content_files(NetworkManager_t)
 
 optional_policy(`
        bind_domtrans(NetworkManager_t)
@@ -182,6 +172,11 @@ optional_policy(`
        udev_read_db(NetworkManager_t)
 ')
 
+optional_policy(`
+       # Read gnome-keyring
+       unconfined_read_home_content_files(NetworkManager_t)
+')
+
 optional_policy(`
        vpn_domtrans(NetworkManager_t)
        vpn_signal(NetworkManager_t)
index 4337d1a415ae59f782d13b69a4908b05b586318a..9e545ccd3837f74d0071f071410dfe01e83ef8be 100644 (file)
@@ -113,12 +113,6 @@ sysnet_read_config(ypbind_t)
 userdom_dontaudit_use_unpriv_user_fds(ypbind_t)
 userdom_dontaudit_search_sysadm_home_dirs(ypbind_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(ypbind_t)
-       term_dontaudit_use_generic_ptys(ypbind_t)
-       files_dontaudit_read_root_files(ypbind_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(ypbind_t)
 ')
@@ -200,12 +194,6 @@ sysnet_read_config(yppasswdd_t)
 userdom_dontaudit_use_unpriv_user_fds(yppasswdd_t)
 userdom_dontaudit_search_sysadm_home_dirs(yppasswdd_t)
 
-ifdef(`targeted_policy',`
-        term_dontaudit_use_unallocated_ttys(yppasswdd_t)
-        term_dontaudit_use_generic_ptys(yppasswdd_t)
-        files_dontaudit_read_root_files(yppasswdd_t)
-')
-
 optional_policy(`
        hostname_exec(yppasswdd_t)
 ')
@@ -289,12 +277,6 @@ sysnet_read_config(ypserv_t)
 userdom_dontaudit_use_unpriv_user_fds(ypserv_t)
 userdom_dontaudit_search_sysadm_home_dirs(ypserv_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(ypserv_t)
-       term_dontaudit_use_generic_ptys(ypserv_t)
-       files_dontaudit_read_root_files(ypserv_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(ypserv_t)
 ')
@@ -350,8 +332,3 @@ logging_send_syslog_msg(ypxfr_t)
 miscfiles_read_localization(ypxfr_t)
 
 sysnet_read_config(ypxfr_t)
-
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(ypxfr_t)
-       term_dontaudit_use_generic_ptys(ypxfr_t)
-')
index b8f70d3145f5a096ed0e5ecdf2285dd4436d0a24..3cd96ed0c3288cfe29a2b2f804b2be3cfb3bcde8 100644 (file)
@@ -106,12 +106,6 @@ sysnet_read_config(nscd_t)
 userdom_dontaudit_use_unpriv_user_fds(nscd_t)
 userdom_dontaudit_search_sysadm_home_dirs(nscd_t)
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(nscd_t)
-       term_use_generic_ptys(nscd_t)
-       files_dontaudit_read_root_files(nscd_t)
-')
-
 optional_policy(`
        udev_read_db(nscd_t)
 ')
index 5debc1997f8d8749d64f27b9fdd5e8f70f85abd5..17c540a7a281a2078c505e53b43348e818d4df20 100644 (file)
@@ -98,12 +98,6 @@ sysnet_read_config(nsd_t)
 userdom_dontaudit_use_unpriv_user_fds(nsd_t)
 userdom_dontaudit_search_sysadm_home_dirs(nsd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(nsd_t)
-       term_dontaudit_use_generic_ptys(nsd_t)
-       files_dontaudit_read_root_files(nsd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(nsd_t)
 ')
index 9fe22ab793dcb2258b96c1925af055135d724c81..1d50ebff22ee62d0de3dfe9bdc63ace3a0a56077 100644 (file)
@@ -94,12 +94,6 @@ sysnet_read_config(ntop_t)
 userdom_dontaudit_use_unpriv_user_fds(ntop_t)
 userdom_dontaudit_search_sysadm_home_dirs(ntop_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(ntop_t)
-       term_dontaudit_use_generic_ptys(ntop_t)
-       files_dontaudit_read_root_files(ntop_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(ntop_t)
 ')
index 0847b2e4e922a0bed162efdb649d5a623e89ebae..cb1690ad22bdefa74571c33bdb52cb9f2c0fd97c 100644 (file)
@@ -111,18 +111,6 @@ userdom_dontaudit_use_unpriv_user_fds(ntpd_t)
 userdom_list_sysadm_home_dirs(ntpd_t)
 userdom_dontaudit_list_sysadm_home_dirs(ntpd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(ntpd_t)
-       term_dontaudit_use_generic_ptys(ntpd_t)
-       files_dontaudit_read_root_files(ntpd_t)
-
-       optional_policy(`
-               # The Gnome date GUI code is requesting that 
-               # the ntp code change the date of the machine.
-               unconfined_rw_pipes(ntpd_t)
-       ')
-')
-
 optional_policy(`
        # for cron jobs
        cron_system_entry(ntpd_t,ntpdate_exec_t)
index 7a3c9f54cc802142d6cfe9bdc918576a36096e31..96bb8a979999c5346be164ff07d9ed34e4c13e64 100644 (file)
@@ -144,12 +144,6 @@ sysnet_read_config(scannerdaemon_t)
 userdom_dontaudit_use_unpriv_user_fds(scannerdaemon_t)
 userdom_dontaudit_search_sysadm_home_dirs(scannerdaemon_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(scannerdaemon_t)
-       term_dontaudit_use_generic_ptys(scannerdaemon_t)
-       files_dontaudit_read_root_files(scannerdaemon_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(scannerdaemon_t)
 ')
index c2d7c5f49e760d7500fd6765ef0e7dca9237f9aa..c4049a078d660a74f8bbf0c56ecebcb403bef10f 100644 (file)
@@ -54,11 +54,6 @@ miscfiles_read_localization(oddjob_t)
 
 locallogin_dontaudit_use_fds(oddjob_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(oddjob_t)
-       term_dontaudit_use_unallocated_ttys(oddjob_t)
-')
-
 optional_policy(`
        dbus_system_bus_client_template(oddjob,oddjob_t)
        dbus_send_system_bus(oddjob_t)
index 2e3e6028fc907bb88b5312b581128a55105f921b..687ab2cfa02994ef31c3954a9ab69fab3024b3ee 100644 (file)
@@ -54,12 +54,6 @@ userdom_dontaudit_search_sysadm_home_dirs(openct_t)
 
 openct_exec(openct_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(openct_t)
-       term_dontaudit_use_generic_ptys(openct_t)
-       files_dontaudit_read_root_files(openct_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(openct_t)
 ')
index 55900a240dc81c053f7cc9b033e1404d8c029ba2..70092cb24ac7c1300856ab39a674db84adb5c5ce 100644 (file)
@@ -96,11 +96,6 @@ miscfiles_read_certs(openvpn_t)
 sysnet_dns_name_resolve(openvpn_t)
 sysnet_exec_ifconfig(openvpn_t)
 
-ifdef(`targeted_policy',`
-       # Need to interact with terminals if config option "auth-user-pass" is used
-       term_use_generic_ptys(openvpn_t)
-')
-
 tunable_policy(`openvpn_enable_homedirs',`
        userdom_read_unpriv_users_home_content_files(openvpn_t)
 ')
index ee1be00296c2f49df5b2814adfd2bf6777f182a8..7e08dde44968eed206b953e9790697d259fc7985 100644 (file)
@@ -58,11 +58,6 @@ miscfiles_read_localization(pcscd_t)
 
 sysnet_dns_name_resolve(pcscd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(pcscd_t)
-       term_dontaudit_use_unallocated_ttys(pcscd_t)
-')
-
 optional_policy(`
        openct_stream_connect(pcscd_t)
        openct_read_pid_files(pcscd_t)
index a0ae68ded00e4fc3bab8a4de9e14902cdd4cf22f..ea9e2560aefa57359fb41fc60a18d2d0950b110c 100644 (file)
@@ -121,13 +121,6 @@ sysnet_read_config(pegasus_t)
 userdom_dontaudit_use_unpriv_user_fds(pegasus_t)
 userdom_dontaudit_search_sysadm_home_dirs(pegasus_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(pegasus_t)
-       term_dontaudit_use_generic_ptys(pegasus_t)
-       files_dontaudit_read_root_files(pegasus_t)
-       unconfined_signull(pegasus_t)
-')
-
 optional_policy(`
        logging_send_syslog_msg(pegasus_t)
 ')
@@ -144,3 +137,7 @@ optional_policy(`
 optional_policy(`
        udev_read_db(pegasus_t)
 ')
+
+optional_policy(`
+       unconfined_signull(pegasus_t)
+')
index 9634866922f3778ca58cb03dca9eba38127b2397..a817d467f16e9dcdd4c814655db991eae686f6aa 100644 (file)
@@ -70,12 +70,6 @@ sysnet_read_config(perdition_t)
 userdom_dontaudit_use_unpriv_user_fds(perdition_t)
 userdom_dontaudit_search_sysadm_home_dirs(perdition_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(perdition_t)
-       term_dontaudit_use_generic_ptys(perdition_t)
-       files_dontaudit_read_root_files(perdition_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(perdition_t)
 ')
index 89033f29df9e024dcbcb8d70b7c6204ee31ff049..27ef4945bfc4202ae8be35055a4aa4d4ac387c9e 100644 (file)
@@ -89,12 +89,6 @@ sysnet_read_config(portmap_t)
 userdom_dontaudit_use_unpriv_user_fds(portmap_t)
 userdom_dontaudit_search_sysadm_home_dirs(portmap_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(portmap_t)
-       term_dontaudit_use_generic_ptys(portmap_t)
-       files_dontaudit_read_root_files(portmap_t)
-')
-
 optional_policy(`
        nis_use_ypbind(portmap_t)
 ')
@@ -158,11 +152,6 @@ sysnet_read_config(portmap_helper_t)
 
 userdom_dontaudit_use_all_users_fds(portmap_helper_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(portmap_helper_t)
-       term_dontaudit_use_generic_ptys(portmap_helper_t)
-')
-
 optional_policy(`
        nis_use_ypbind(portmap_helper_t)
 ')
index 3cac76af9b9bd391dd38fa03ba733db8a790bdf8..9ba5db86690848a89a286449aba5b82479c20061 100644 (file)
@@ -112,12 +112,6 @@ ppp_pid_filetrans(portslave_t)
 
 ssh_exec(portslave_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(portslave_t)
-       term_dontaudit_use_generic_ptys(portslave_t)
-       files_dontaudit_read_root_files(portslave_t)
-')
-
 optional_policy(`
        inetd_tcp_service_domain(portslave_t,portslave_exec_t)
 ')
index bafbdf8d2cdf9245627bd925464fe7e8eebb7d73..7e4e5840c04e3558eedb03b73ca8ff843418ef35 100644 (file)
@@ -93,12 +93,6 @@ template(`postfix_domain_template',`
 
        userdom_dontaudit_use_unpriv_user_fds(postfix_$1_t)
 
-       ifdef(`targeted_policy', `
-               term_dontaudit_use_unallocated_ttys(postfix_$1_t)
-               term_dontaudit_use_generic_ptys(postfix_$1_t)
-               files_dontaudit_read_root_files(postfix_$1_t)
-       ')
-
        optional_policy(`
                nscd_socket_use(postfix_$1_t)
        ')
index 6191453c9271daeff03775054043e037351abc2f..108c89ceac2a9546489b95852e74ddb44c7efbb5 100644 (file)
@@ -180,12 +180,6 @@ mta_read_sendmail_bin(postfix_master_t)
 optional_policy(`
        auth_use_nsswitch(postfix_master_t)
 ')
-
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(postfix_master_t)
-       term_dontaudit_use_generic_ptys(postfix_master_t)
-')
-
 optional_policy(`
        cyrus_stream_connect(postfix_master_t)
 ')
@@ -199,10 +193,6 @@ optional_policy(`
        mysql_stream_connect(postfix_master_t)
 ')
 
-optional_policy(`
-       nis_use_ypbind(postfix_master_t)
-')
-
 optional_policy(`
        sendmail_signal(postfix_master_t)
 ')
@@ -363,11 +353,6 @@ seutil_read_config(postfix_map_t)
 
 sysnet_read_config(postfix_map_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(postfix_map_t)
-       term_dontaudit_use_generic_ptys(postfix_map_t)
-')
-
 tunable_policy(`read_default_t',`
        files_list_default(postfix_map_t)
        files_read_default_files(postfix_map_t)
@@ -452,11 +437,6 @@ sysnet_dns_name_resolve(postfix_postdrop_t)
 
 mta_rw_user_mail_stream_sockets(postfix_postdrop_t)
 
-ifdef(`targeted_policy', `
-       term_use_unallocated_ttys(postfix_postdrop_t)
-       term_use_generic_ptys(postfix_postdrop_t)
-')
-
 optional_policy(`
        cron_system_entry(postfix_postdrop_t, postfix_postdrop_exec_t)
 ')
index f1d1623764199bf6819ed4035c5ec51f102c6eb7..7c384f1623390048262378a6a418d74c6f44dd1a 100644 (file)
@@ -136,12 +136,6 @@ userdom_dontaudit_use_unpriv_user_fds(postgresql_t)
 
 mta_getattr_spool(postgresql_t)
 
-ifdef(`targeted_policy', `
-       files_dontaudit_read_root_files(postgresql_t)
-       term_dontaudit_use_generic_ptys(postgresql_t)
-       term_dontaudit_use_unallocated_ttys(postgresql_t)
-')
-
 tunable_policy(`allow_execmem',`
        allow postgresql_t self:process execmem;
 ')
@@ -174,19 +168,3 @@ optional_policy(`
 optional_policy(`
        udev_read_db(postgresql_t)
 ')
-
-ifdef(`TODO',`
-ifdef(`distro_debian', `
-       init_exec_script_files(postgresql_t)
-       # gross hack
-       postgresql_domtrans(dpkg_t)
-       can_exec(postgresql_t, dpkg_exec_t)
-')
-
-ifdef(`distro_gentoo', `
-       allow postgresql_t initrc_su_t:process { sigchld };
-       # "su - postgres ..." is called from initrc_t
-       postgresql_search_db(initrc_su_t)
-       dontaudit initrc_su_t sysadm_devpts_t:chr_file rw_file_perms;
-')
-')
index df44c63ce242479cd4354675359f5f057e350050..5d2974776ba2c0acca5745fcda751eaff9205c1f 100644 (file)
@@ -80,12 +80,6 @@ sysnet_read_config(postgrey_t)
 userdom_dontaudit_use_unpriv_user_fds(postgrey_t)
 userdom_dontaudit_search_sysadm_home_dirs(postgrey_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(postgrey_t)
-       term_dontaudit_use_generic_ptys(postgrey_t)
-       files_dontaudit_read_root_files(postgrey_t)
-')
-
 optional_policy(`
        nis_use_ypbind(postgrey_t)
 ')
index fdf23d64076fd3ddd2fdd75d3e0b2cdcf48b6f8b..4739329f487c869c7411d3fa7a969d8b7427bd71 100644 (file)
@@ -13,14 +13,12 @@ policy_module(ppp,1.5.0)
 ## </desc>
 gen_tunable(pppd_can_insmod,false)
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Allow pppd to be run for a regular user
 ## </p>
 ## </desc>
 gen_tunable(pppd_for_user,false)
-')
 
 # pppd_t is the domain for the pppd program.
 # pppd_exec_t is the type of the pppd executable.
@@ -184,12 +182,6 @@ userdom_search_unpriv_users_home_dirs(pppd_t)
 
 ppp_exec(pppd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(pppd_t)
-       term_dontaudit_use_generic_ptys(pppd_t)
-       files_dontaudit_read_root_files(pppd_t)
-')
-
 optional_policy(`
        ddclient_domtrans(pppd_t)
 ')
@@ -295,12 +287,6 @@ sysnet_read_config(pptp_t)
 userdom_dontaudit_use_unpriv_user_fds(pptp_t)
 userdom_dontaudit_search_sysadm_home_dirs(pptp_t)
 
-ifdef(`targeted_policy',`
-        term_dontaudit_use_unallocated_ttys(pptp_t)
-        term_dontaudit_use_generic_ptys(pptp_t)
-        files_dontaudit_read_root_files(pptp_t)
-')
-
 optional_policy(`
        consoletype_exec(pppd_t)
 ')
index c8391e74fb7915ffbe1f609f15a97d51db7530bd..92e1525f83e3fe413d4f9a1450fa369b7b130068 100644 (file)
@@ -80,12 +80,6 @@ userdom_dontaudit_search_sysadm_home_dirs(privoxy_t)
 # cjp: this should really not be needed
 userdom_use_sysadm_terms(privoxy_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(privoxy_t)
-       term_dontaudit_use_generic_ptys(privoxy_t)
-       files_dontaudit_read_root_files(privoxy_t)
-')
-
 optional_policy(`
        nis_use_ypbind(privoxy_t)
 ')
index 2e16ef3b934f851791f5725d3dfeeab765f5df2a..a0b7d910080cb1f3872cdbcbaa2e39256b7e429b 100644 (file)
@@ -58,12 +58,6 @@ miscfiles_read_localization(pxe_t)
 userdom_dontaudit_use_unpriv_user_fds(pxe_t)
 userdom_dontaudit_search_sysadm_home_dirs(pxe_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(pxe_t)
-       term_dontaudit_use_generic_ptys(pxe_t)
-       files_dontaudit_read_root_files(pxe_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(pxe_t)
 ')
index 0fbe17a7ec549d21a750b1bafc17bf8edea04e1e..c512523684c85e28784c206a7f4f3052bc46f122 100644 (file)
@@ -1,11 +1,9 @@
 /etc/pyzor(/.*)?               gen_context(system_u:object_r:pyzor_etc_t, s0)
 
+HOME_DIR/\.pyzor(/.*)?         gen_context(system_u:object_r:ROLE_pyzor_home_t,s0)
+
 /usr/bin/pyzor         --      gen_context(system_u:object_r:pyzor_exec_t,s0)
 /usr/bin/pyzord                --      gen_context(system_u:object_r:pyzord_exec_t,s0)
 
 /var/lib/pyzord(/.*)?          gen_context(system_u:object_r:pyzor_var_lib_t,s0)
 /var/log/pyzord\.log   --      gen_context(system_u:object_r:pyzord_log_t,s0)
-
-ifdef(`strict_policy',`
-HOME_DIR/\.pyzor(/.*)?         gen_context(system_u:object_r:ROLE_pyzor_home_t,s0)
-')
index 63cd7ecff76560e61a56eb1f490b599ead9ff42f..4589fd16b15717fec779b251e4248945bf47d72a 100644 (file)
@@ -1,5 +1,42 @@
 ## <summary>Pyzor is a distributed, collaborative spam detection and filtering network.</summary>
 
+#######################################
+## <summary>
+##     The per role template for the pyzor module.
+## </summary>
+## <desc>
+##     <p>
+##     This template allows pyzor to manage files in
+##     a user home directory, creating files with the
+##     correct type.
+##     </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>
+#
+template(`pyzor_per_role_template',`
+       gen_require(`
+               type pyzord_t;
+       ')
+
+       type $1_pyzor_home_t;
+       userdom_user_home_content($1, $1_pyzor_home_t)
+
+       manage_dirs_pattern(pyzord_t, $1_pyzor_home_t, $1_pyzor_home_t)
+       manage_files_pattern(pyzord_t, $1_pyzor_home_t, $1_pyzor_home_t)
+       manage_lnk_files_pattern(pyzord_t, $1_pyzor_home_t, $1_pyzor_home_t)
+       userdom_user_home_dir_filetrans($1, pyzord_t, $1_pyzor_home_t, { dir file lnk_file })
+')
+
 ########################################
 ## <summary>
 ##     Send generic signals to pyzor
@@ -57,41 +94,3 @@ interface(`pyzor_exec',`
        corecmd_search_bin($1)
        can_exec($1,pyzor_exec_t)
 ')
-
-#######################################
-## <summary>
-##     The per role template for the pyzor module.
-## </summary>
-## <desc>
-##     <p>
-##     This template allows pyzor to manage files in
-##     a user home directory, creating files with the
-##     correct type.
-##     </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>
-#
-template(`pyzor_per_role_template',`
-       gen_require(`
-               type pyzord_t;
-       ')
-
-       type $1_pyzor_home_t;
-       userdom_user_home_content($1,$1_pyzor_home_t)
-
-       manage_dirs_pattern(pyzord_t,$1_pyzor_home_t,$1_pyzor_home_t)
-       manage_files_pattern(pyzord_t,$1_pyzor_home_t,$1_pyzor_home_t)
-       manage_lnk_files_pattern(pyzord_t,$1_pyzor_home_t,$1_pyzor_home_t)
-       userdom_search_user_home_dirs($1,pyzord_t)
-       userdom_user_home_dir_filetrans($1,pyzord_t,$1_pyzor_home_t,{ dir file lnk_file })
-')
index 4c8692bef99a4aa30af87a8e665d0b840bcb18e2..c14302bd1351562b6838d673e1c3ced808143fb7 100644 (file)
@@ -70,10 +70,6 @@ miscfiles_read_localization(pyzor_t)
 
 userdom_dontaudit_search_sysadm_home_dirs(pyzor_t)
 
-ifdef(`targeted_policy',`
-       userdom_read_generic_user_home_content_files(pyzor_t)
-')
-
 optional_policy(`
        amavis_manage_lib_files(pyzor_t)
        amavis_manage_spool_files(pyzor_t)
@@ -137,13 +133,6 @@ userdom_dontaudit_search_staff_home_dirs(pyzord_t)
 
 mta_manage_spool(pyzord_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(pyzord_t)
-       term_dontaudit_use_unallocated_ttys(pyzord_t)
-
-       userdom_read_generic_user_home_content_files(pyzord_t)
-')
-
 optional_policy(`
        logging_send_syslog_msg(pyzord_t)
 ')
index c95dccf3aca1cb37a32e319bde7a420836cb8e8a..4563434e5de453aadf0d2ac824b98576b866a7ac 100644 (file)
@@ -107,12 +107,6 @@ userdom_dontaudit_use_unpriv_user_fds(radiusd_t)
 userdom_dontaudit_search_sysadm_home_dirs(radiusd_t)
 userdom_dontaudit_getattr_sysadm_home_dirs(radiusd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(radiusd_t)
-       term_dontaudit_use_generic_ptys(radiusd_t)
-       files_dontaudit_read_root_files(radiusd_t)
-')
-
 optional_policy(`
        cron_system_entry(radiusd_t,radiusd_exec_t)
 ')
index 6aba1bec5cea202ef2186d1869c32ed096eb180e..d56b426664d0bf1249881f68c1d4003724e02c3d 100644 (file)
@@ -71,12 +71,6 @@ sysnet_read_config(radvd_t)
 userdom_dontaudit_use_unpriv_user_fds(radvd_t)
 userdom_dontaudit_search_sysadm_home_dirs(radvd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(radvd_t)
-       term_dontaudit_use_generic_ptys(radvd_t)
-       files_dontaudit_read_root_files(radvd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(radvd_t)
 ')
index ad74d5b2184532168587ea381b6191d5bdd5591d..d50875bf5d0ac426e206df72269d3d9be8eadfd6 100644 (file)
@@ -1,6 +1,4 @@
-ifdef(`strict_policy',`
 HOME_DIR/\.razor(/.*)?         gen_context(system_u:object_r:ROLE_razor_home_t,s0)
-')
 
 /etc/razor(/.*)?               gen_context(system_u:object_r:razor_etc_t,s0)
 
index df9d7d08f7d3f7a71b5aa13ae1d4e5d988709a6b..d9af172e6df88937a44dfd151cdc0daccd091eaa 100644 (file)
@@ -51,12 +51,6 @@ sysnet_read_config(rdisc_t)
 
 userdom_dontaudit_use_unpriv_user_fds(rdisc_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(rdisc_t)
-       term_dontaudit_use_generic_ptys(rdisc_t)
-       files_dontaudit_read_root_files(rdisc_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(rdisc_t)
 ')
index bd2d69528127b9c13658d448bd95a7b5988bcb47..c641ea5eabece34aec5e84114e6f8d721b0158e5 100644 (file)
@@ -95,11 +95,6 @@ userdom_spec_domtrans_unpriv_users(remote_login_t)
 # Search for mail spool file.
 mta_getattr_spool(remote_login_t)
 
-ifdef(`targeted_policy',`
-       unconfined_domain(remote_login_t)
-       unconfined_shell_domtrans(remote_login_t)
-')
-
 tunable_policy(`read_default_t',`
        files_list_default(remote_login_t)
        files_read_default_files(remote_login_t)
@@ -130,6 +125,11 @@ optional_policy(`
        nscd_socket_use(remote_login_t)
 ')
 
+optional_policy(`
+       unconfined_domain(remote_login_t)
+       unconfined_shell_domtrans(remote_login_t)
+')
+
 optional_policy(`
        usermanage_read_crack_db(remote_login_t)
 ')
index a5932790b8cf57d20f169d0a63b620e6f514a7fe..c4d31a31f787bfba601c45de43114f908320d41a 100644 (file)
@@ -61,12 +61,6 @@ miscfiles_read_localization(resmgrd_t)
 
 userdom_dontaudit_use_unpriv_user_fds(resmgrd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(resmgrd_t)
-       term_dontaudit_use_generic_ptys(resmgrd_t)
-       files_dontaudit_read_root_files(resmgrd_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(resmgrd_t)
 ')
index e6bddbb62136d1b7e02bbde069f2226f3dc2dde8..773d78552b26288636196749d9075965591128c5 100644 (file)
@@ -31,6 +31,9 @@ allow rhgb_t self:tcp_socket create_socket_perms;
 allow rhgb_t self:udp_socket create_socket_perms;
 allow rhgb_t self:netlink_route_socket r_netlink_socket_perms;
 
+allow rhgb_t rhgb_devpts_t:chr_file { rw_chr_file_perms setattr };
+term_create_pty(rhgb_t,rhgb_devpts_t)
+
 manage_dirs_pattern(rhgb_t,rhgb_tmpfs_t,rhgb_tmpfs_t)
 manage_files_pattern(rhgb_t,rhgb_tmpfs_t,rhgb_tmpfs_t)
 manage_lnk_files_pattern(rhgb_t,rhgb_tmpfs_t,rhgb_tmpfs_t)
@@ -114,20 +117,7 @@ xserver_kill_xdm_xserver(rhgb_t)
 xserver_read_xkb_libs(rhgb_t)
 xserver_domtrans_xdm_xserver(rhgb_t)
 xserver_signal_xdm_xserver(rhgb_t)
-
-ifdef(`strict_policy',`
-       allow rhgb_t rhgb_devpts_t:chr_file { rw_chr_file_perms setattr };
-       term_create_pty(rhgb_t,rhgb_devpts_t)
-', `
-       files_dontaudit_read_root_files(rhgb_t)
-
-       term_use_generic_ptys(rhgb_t)
-       term_setattr_generic_ptys(rhgb_t)
-       term_dontaudit_use_unallocated_ttys(rhgb_t)
-
-       xserver_domtrans_xdm_xserver(rhgb_t)
-       xserver_read_xdm_tmp_files(rhgb_t)
-')
+xserver_read_xdm_tmp_files(rhgb_t)
 
 optional_policy(`
        consoletype_exec(rhgb_t)
index f467c1119f7edc78d2a79f4b0acce2c0808a12a4..0c49eda5c9efe3d1a3e1b5192c6293e0c30d5b19 100644 (file)
@@ -153,11 +153,6 @@ miscfiles_read_localization(ricci_t)
 
 sysnet_dns_name_resolve(ricci_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_generic_ptys(ricci_t)
-       term_dontaudit_use_unallocated_ttys(ricci_t)
-')
-
 optional_policy(`
        ccs_read_config(ricci_t)
 ')
@@ -255,8 +250,10 @@ optional_policy(`
        oddjob_system_entry(ricci_modcluster_t, ricci_modcluster_exec_t)
 ')
 
-# XXX This has got to go.
-unconfined_domain(ricci_modcluster_t)
+optional_policy(`
+       # XXX This has got to go.
+       unconfined_domain(ricci_modcluster_t)
+')
 
 ########################################
 #
@@ -317,11 +314,6 @@ miscfiles_read_localization(ricci_modclusterd_t)
 sysnet_domtrans_ifconfig(ricci_modclusterd_t)
 sysnet_dns_name_resolve(ricci_modclusterd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_generic_ptys(ricci_modclusterd_t)
-       term_dontaudit_use_unallocated_ttys(ricci_modclusterd_t)
-')
-
 optional_policy(`
        ccs_domtrans(ricci_modclusterd_t)
        ccs_stream_connect(ricci_modclusterd_t)
index dfb7e366069320a0ee657426d3c5fe487669a36f..c1f3a8ecaffe9e155fd17e3baa9a3ca99fa1fe2a 100644 (file)
@@ -83,12 +83,6 @@ sysnet_read_config(roundup_t)
 userdom_dontaudit_use_unpriv_user_fds(roundup_t)
 userdom_dontaudit_search_sysadm_home_dirs(roundup_t)
 
-ifdef(`targeted_policy',`
-       files_dontaudit_read_root_files(roundup_t)
-       term_dontaudit_use_unallocated_ttys(roundup_t)
-       term_dontaudit_use_generic_ptys(roundup_t)
-')
-
 optional_policy(`
        mysql_stream_connect(roundup_t)
        mysql_search_db(roundup_t)
index bbf5f41f8740127996c38f1f70b6dec94e417844..9046f6779e1dab22a6a29354bd17c4b2e733bbf6 100644 (file)
@@ -112,12 +112,6 @@ template(`rpc_domain_template', `
 
        userdom_dontaudit_use_unpriv_user_fds($1_t)
 
-       ifdef(`targeted_policy',`
-               term_dontaudit_use_unallocated_ttys($1_t)
-               term_dontaudit_use_generic_ptys($1_t)
-               files_dontaudit_read_root_files($1_t)
-       ')
-
        optional_policy(`
                nis_use_ypbind($1_t)
        ')
index 8db6b2bd05d616d2a5936c1554d47f0040672abf..667b237e97af17669f34c28c9cdac035fcb91d47 100644 (file)
@@ -158,13 +158,6 @@ files_read_usr_symlinks(gssd_t)
 
 miscfiles_read_certs(gssd_t)
 
-ifdef(`targeted_policy',`
-       files_read_generic_tmp_files(gssd_t) 
-       files_read_generic_tmp_symlinks(gssd_t) 
-       # Manage the users kerberos tgt file
-       files_manage_generic_tmp_files(gssd_t) 
-')
-
 tunable_policy(`allow_gssd_read_tmp',`
        userdom_list_unpriv_users_tmp(gssd_t) 
        userdom_read_unpriv_users_tmp_files(gssd_t) 
index c5f3df4adcae7d08693e012fb89aa62734c1b213..94834ff16c72e4d04f5614ecafbd29fd9cfc3150 100644 (file)
@@ -66,10 +66,6 @@ sysnet_read_config(rshd_t)
 
 userdom_search_all_users_home_content(rshd_t)
 
-ifdef(`targeted_policy',`
-       unconfined_shell_domtrans(rshd_t)
-')
-
 tunable_policy(`use_nfs_home_dirs',`
        fs_read_nfs_files(rshd_t)
        fs_read_nfs_symlinks(rshd_t)
@@ -91,3 +87,7 @@ optional_policy(`
 optional_policy(`
        tcpd_wrapped_domain(rshd_t,rshd_exec_t)
 ')
+
+optional_policy(`
+       unconfined_shell_domtrans(rshd_t)
+')
index fd90e484d81c0ab71c43e1da21fcaa1a4a702aaa..1a7e8fff98804d15d29be87a7530f8589c68a81c 100644 (file)
@@ -59,8 +59,3 @@ libs_use_shared_libs(rwho_t)
 miscfiles_read_localization(rwho_t)
 
 sysnet_dns_name_resolve(rwho_t)
-
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(rwho_t)
-       term_dontaudit_use_generic_ptys(rwho_t)
-')
index ecda9ab09de331eb8ac27909fb16db7761af354c..51543ca852714a005d9bbf6f64083764e38e97cc 100644 (file)
@@ -112,6 +112,38 @@ interface(`samba_domtrans_smbmount',`
        domtrans_pattern($1,smbmount_exec_t,smbmount_t)
 ')
 
+########################################
+## <summary>
+##     Execute smbmount interactively and do
+##     a domain transition to the smbmount domain.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed acces.
+##     </summary>
+## </param>
+## <param name="role">
+##     <summary>
+##     The role to be allowed the smbmount domain.
+##     </summary>
+## </param>
+## <param name="terminal">
+##     <summary>
+##     The type of the terminal allow the smbmount domain to use.
+##     </summary>
+## </param>
+## <rolecap/>
+#
+interface(`samba_run_smbmount',`
+       gen_require(`
+               type smbmount_t;
+       ')
+
+       samba_domtrans_smbmount($1)
+       role $2 types smbmount_t;
+       allow smbmount_t $3:chr_file rw_term_perms;
+')
+
 ########################################
 ## <summary>
 ##     Allow the specified domain to read
index be13a29125ae7aa9fb795a54a3848647398fba7c..e3fe1e4532548efe51c4046fc1011bf8fbbf65aa 100644 (file)
@@ -86,13 +86,6 @@ files_type(samba_secrets_t)
 type samba_share_t; # customizable
 files_type(samba_share_t)
 
-type samba_unconfined_script_t;
-type samba_unconfined_script_exec_t;
-domain_type(samba_unconfined_script_t)
-domain_entry_file(samba_unconfined_script_t,samba_unconfined_script_exec_t)
-corecmd_shell_entry_type(samba_unconfined_script_t)
-role system_r types samba_unconfined_script_t;
-
 type samba_var_t;
 files_type(samba_var_t)
 
@@ -202,11 +195,6 @@ sysnet_use_ldap(samba_net_t)
 
 userdom_dontaudit_search_sysadm_home_dirs(samba_net_t)
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(samba_net_t)
-       term_use_unallocated_ttys(samba_net_t)
-')
-
 optional_policy(`
        kerberos_use(samba_net_t)
 ')
@@ -345,12 +333,6 @@ ifdef(`hide_broken_symptoms', `
        fs_dontaudit_getattr_tmpfs_dirs(smbd_t)
 ')
 
-ifdef(`targeted_policy', `
-       files_dontaudit_read_root_files(smbd_t)
-       term_dontaudit_use_generic_ptys(smbd_t)
-       term_dontaudit_use_unallocated_ttys(smbd_t)
-')
-
 tunable_policy(`allow_smbd_anon_write',`
        miscfiles_manage_public_files(smbd_t)
 ') 
@@ -486,12 +468,6 @@ userdom_dontaudit_search_sysadm_home_dirs(nmbd_t)
 userdom_dontaudit_use_unpriv_user_fds(nmbd_t)
 userdom_use_unpriv_users_fds(nmbd_t)
 
-ifdef(`targeted_policy', `
-       files_dontaudit_read_root_files(nmbd_t)
-       term_dontaudit_use_generic_ptys(nmbd_t)
-       term_dontaudit_use_unallocated_ttys(nmbd_t)
-')
-
 optional_policy(`
        nis_use_ypbind(nmbd_t)
 ')
@@ -557,7 +533,6 @@ storage_raw_read_fixed_disk(smbmount_t)
 storage_raw_write_fixed_disk(smbmount_t)
 
 term_list_ptys(smbmount_t)
-term_use_controlling_term(smbmount_t)
 
 corecmd_list_bin(smbmount_t)
 
@@ -581,11 +556,6 @@ logging_search_logs(smbmount_t)
 sysnet_read_config(smbmount_t)
 
 userdom_use_all_users_fds(smbmount_t)
-userdom_use_sysadm_ttys(smbmount_t)
-
-optional_policy(`
-       cups_read_rw_config(smbd_t)
-')
 
 optional_policy(`
        nis_use_ypbind(smbmount_t)
@@ -783,12 +753,6 @@ userdom_dontaudit_use_unpriv_user_fds(winbind_t)
 userdom_dontaudit_search_sysadm_home_dirs(winbind_t)
 userdom_priveleged_home_dir_manager(winbind_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(winbind_t)
-       term_dontaudit_use_generic_ptys(winbind_t)
-       files_dontaudit_read_root_files(winbind_t)
-')
-
 optional_policy(`
        kerberos_use(winbind_t)
 ')
@@ -833,11 +797,6 @@ logging_send_syslog_msg(winbind_helper_t)
 
 miscfiles_read_localization(winbind_helper_t) 
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(winbind_helper_t)
-       term_use_unallocated_ttys(winbind_helper_t)
-')
-
 optional_policy(`
        nscd_socket_use(winbind_helper_t)
 ')
@@ -852,11 +811,20 @@ optional_policy(`
 # samba_unconfined_script_t local policy
 #
 
-allow smbd_t samba_unconfined_script_exec_t:dir search_dir_perms;
-allow smbd_t samba_unconfined_script_exec_t:file ioctl;
+optional_policy(`
+       type samba_unconfined_script_t;
+       type samba_unconfined_script_exec_t;
+       domain_type(samba_unconfined_script_t)
+       domain_entry_file(samba_unconfined_script_t,samba_unconfined_script_exec_t)
+       corecmd_shell_entry_type(samba_unconfined_script_t)
+       role system_r types samba_unconfined_script_t;
+
+       allow smbd_t samba_unconfined_script_exec_t:dir search_dir_perms;
+       allow smbd_t samba_unconfined_script_exec_t:file ioctl;
 
-unconfined_domain(samba_unconfined_script_t)
+       unconfined_domain(samba_unconfined_script_t)
 
-tunable_policy(`samba_run_unconfined',`
-       domtrans_pattern(smbd_t, samba_unconfined_script_exec_t, samba_unconfined_script_t)
+       tunable_policy(`samba_run_unconfined',`
+               domtrans_pattern(smbd_t, samba_unconfined_script_exec_t, samba_unconfined_script_t)
+       ')
 ')
index 6b2b54756ace3913caea02ceb6afda99f86980fd..dd7b0bd5c6b0d511b274483db854a6cde95481b9 100644 (file)
@@ -91,13 +91,7 @@ sysnet_read_config(saslauthd_t)
 userdom_dontaudit_use_unpriv_user_fds(saslauthd_t)
 userdom_dontaudit_search_sysadm_home_dirs(saslauthd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(saslauthd_t)
-       term_dontaudit_use_generic_ptys(saslauthd_t)
-       files_dontaudit_read_root_files(saslauthd_t)
-')
-
-# cjp: typeattribute dont work in conditionals yet
+# cjp: typeattribute doesnt work in conditionals
 auth_can_read_shadow_passwords(saslauthd_t)
 tunable_policy(`allow_saslauthd_read_shadow',`
        auth_tunable_read_shadow(saslauthd_t) 
index 076e7d5e685ccd9827309f963a88a675dd77160d..4de29533897cfcc69945683a11c501a45f66af52 100644 (file)
@@ -108,12 +108,6 @@ mta_rw_aliases(sendmail_t)
 mta_manage_queue(sendmail_t)
 mta_manage_spool(sendmail_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(sendmail_t)
-       term_dontaudit_use_generic_ptys(sendmail_t)
-       files_dontaudit_read_root_files(sendmail_t)
-')
-
 optional_policy(`
        clamav_search_lib(sendmail_t)
 ')
index 4f8e9a2f7ca363d217685eabe0776e891ad4feae..bcb7129f1b6058b509720731947fe7353c719ad3 100644 (file)
@@ -106,11 +106,6 @@ sysnet_read_config(setroubleshootd_t)
 
 userdom_dontaudit_read_sysadm_home_content_files(setroubleshootd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(setroubleshootd_t)
-       term_dontaudit_use_unallocated_ttys(setroubleshootd_t)
-')
-
 optional_policy(`
        rpm_read_db(setroubleshootd_t)
        rpm_dontaudit_manage_db(setroubleshootd_t)
index 642593f34d7d25dc0b32d1099937b23c4c627aae..e258c48fe83748046748f921627250e1dca3d431 100644 (file)
@@ -61,12 +61,6 @@ miscfiles_read_localization(slrnpull_t)
 userdom_dontaudit_use_unpriv_user_fds(slrnpull_t)
 userdom_dontaudit_search_sysadm_home_dirs(slrnpull_t)
 
-ifdef(`targeted_policy',`
-       files_dontaudit_read_root_files(slrnpull_t)
-       term_dontaudit_use_unallocated_ttys(slrnpull_t)
-       term_dontaudit_use_generic_ptys(slrnpull_t)
-')
-
 optional_policy(`
        cron_system_entry(slrnpull_t,slrnpull_exec_t)
 ')
index c702de55011f1a2c43aeb1c48af627e09d2467ca..2a3d371642c63d0e88d72dd3d3462ce90aa71fbe 100644 (file)
@@ -82,12 +82,6 @@ sysnet_read_config(fsdaemon_t)
 userdom_dontaudit_use_unpriv_user_fds(fsdaemon_t)
 userdom_dontaudit_search_sysadm_home_dirs(fsdaemon_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(fsdaemon_t)
-       term_dontaudit_use_generic_ptys(fsdaemon_t)
-       files_dontaudit_read_root_files(fsdaemon_t)
-')
-
 optional_policy(`
         mta_send_mail(fsdaemon_t)
 ')
index e116f42dc2fa7d8b8bcc065c677934ee71073622..fa6be5e67087018c80c89e925517d1c1392fa206 100644 (file)
@@ -115,12 +115,6 @@ ifdef(`distro_redhat', `
        ')
 ')
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(snmpd_t)
-       term_dontaudit_use_generic_ptys(snmpd_t)
-       files_dontaudit_read_root_files(snmpd_t)
-')
-
 optional_policy(`
        amanda_dontaudit_read_dumpdates(snmpd_t)
 ')
index 0b3e1b6e1341ca972c7278a3bc9203123d392ffb..d37dd5b8460c37fbc5cc7f4f8950e1888af90423 100644 (file)
@@ -88,12 +88,6 @@ sysnet_read_config(snort_t)
 userdom_dontaudit_use_unpriv_user_fds(snort_t)
 userdom_dontaudit_search_sysadm_home_dirs(snort_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(snort_t)
-       term_dontaudit_use_generic_ptys(snort_t)
-       files_dontaudit_read_root_files(snort_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(snort_t)
 ')
index e8728a92cd4bbce34b7f87131346b1c181357959..ceedaca98546ad348976d4e8f4756efc0e869f0a 100644 (file)
@@ -98,12 +98,6 @@ sysnet_read_config(soundd_t)
 userdom_dontaudit_use_unpriv_user_fds(soundd_t)
 userdom_dontaudit_search_sysadm_home_dirs(soundd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(soundd_t)
-       term_dontaudit_use_generic_ptys(soundd_t)
-       files_dontaudit_read_root_files(soundd_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(soundd_t)
 ')
index 870dc7d045cf259e09f5e127ce2e7872cb47d4a6..e4f676b263662144f0cc10832f7e95268a6e27a6 100644 (file)
@@ -1,3 +1,4 @@
+HOME_DIR/\.spamassassin(/.*)?  gen_context(system_u:object_r:ROLE_spamassassin_home_t,s0)
 
 /usr/bin/sa-learn      --      gen_context(system_u:object_r:spamc_exec_t,s0)
 /usr/bin/spamassassin  --      gen_context(system_u:object_r:spamassassin_exec_t,s0)
@@ -13,7 +14,3 @@
 
 /var/spool/spamassassin(/.*)?  gen_context(system_u:object_r:spamd_spool_t,s0)
 /var/spool/spamd(/.*)?         gen_context(system_u:object_r:spamd_spool_t,s0)
-
-ifdef(`strict_policy',`
-HOME_DIR/\.spamassassin(/.*)?  gen_context(system_u:object_r:ROLE_spamassassin_home_t,s0)
-')
index c2802e17f0f7ca615de69ae12d739edc7f9124fd..06b14d9998d9f6a6d908ed9a2c20ba4f229d9554 100644 (file)
@@ -280,6 +280,12 @@ template(`spamassassin_per_role_template',`
                sysnet_read_config($1_spamassassin_t)
        ')
 
+       tunable_policy(`spamd_enable_home_dirs',`
+               userdom_manage_user_home_content_dirs($1,spamd_t)
+               userdom_manage_user_home_content_files($1,spamd_t)
+               userdom_manage_user_home_content_symlinks($1,spamd_t)
+       ')
+
        tunable_policy(`use_nfs_home_dirs',`
                fs_manage_nfs_dirs($1_spamassassin_t)
                fs_manage_nfs_files($1_spamassassin_t)
index 220162adaf5f48f96b54d1c99a699721bfb2d147..8e4a0a1b75a515cd8c1de80dcad72328449e1452 100644 (file)
@@ -6,23 +6,19 @@ policy_module(spamassassin,1.8.0)
 # Declarations
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Allow user spamassassin clients to use the network.
 ## </p>
 ## </desc>
 gen_tunable(spamassassin_can_network,false)
-')
 
-ifdef(`targeted_policy',`
 ## <desc>
 ## <p>
 ## Allow spamd to read/write user home directories.
 ## </p>
 ## </desc>
 gen_tunable(spamd_enable_home_dirs,true)
-')
 
 # spamassassin client executable
 type spamc_exec_t;
@@ -140,8 +136,6 @@ init_dontaudit_rw_utmp(spamd_t)
 
 libs_use_ld_so(spamd_t)
 libs_use_shared_libs(spamd_t)
-# Various Perl bits
-libs_use_lib_files(spamd_t)
 
 logging_send_syslog_msg(spamd_t)
 
@@ -155,20 +149,6 @@ userdom_use_unpriv_users_fds(spamd_t)
 userdom_search_unpriv_users_home_dirs(spamd_t)
 userdom_dontaudit_search_sysadm_home_dirs(spamd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(spamd_t)
-       term_dontaudit_use_generic_ptys(spamd_t)
-
-       files_dontaudit_read_root_files(spamd_t)
-
-       tunable_policy(`spamd_enable_home_dirs',`
-               userdom_manage_generic_user_home_content_dirs(spamd_t)
-               userdom_manage_generic_user_home_content_files(spamd_t)
-               userdom_manage_generic_user_home_content_symlinks(spamd_t)
-               userdom_generic_user_home_dir_filetrans_generic_user_home_content(spamd_t,dir)
-       ')
-')
-
 tunable_policy(`use_nfs_home_dirs',`
        fs_manage_nfs_files(spamd_t)
 ')
index b91764d6ac83b8ca8861a087eb517e443028fa71..2c918b6c54884e808fff3870b1bd0cdabb6cac30 100644 (file)
@@ -56,12 +56,6 @@ miscfiles_read_localization(speedmgmt_t)
 userdom_dontaudit_use_unpriv_user_fds(speedmgmt_t)
 userdom_dontaudit_search_sysadm_home_dirs(speedmgmt_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(speedmgmt_t)
-       term_dontaudit_use_generic_ptys(speedmgmt_t)
-       files_dontaudit_read_root_files(speedmgmt_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(speedmgmt_t)
 ')
index beaba005d2ef2875afd8c38a042a4bee017aa438..9c30fe7212245504627dafb250681c95d700013d 100644 (file)
@@ -144,12 +144,6 @@ userdom_use_unpriv_users_fds(squid_t)
 userdom_dontaudit_use_unpriv_user_fds(squid_t)
 userdom_dontaudit_search_sysadm_home_dirs(squid_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(squid_t)
-       term_dontaudit_use_generic_ptys(squid_t)
-       files_dontaudit_read_root_files(squid_t)
-')
-
 tunable_policy(`squid_connect_any',`
        corenet_tcp_connect_all_ports(squid_t)
 ')
index e83a8529119964e21a817a8b7399bc7d119ccb9e..bf53f28ed6a3ea19e5e17c1a386fb7ab1cd85345 100644 (file)
@@ -1,19 +1,16 @@
+HOME_DIR/\.ssh(/.*)?                   gen_context(system_u:object_r:ROLE_home_ssh_t,s0)
+
 /etc/ssh/primes                        --      gen_context(system_u:object_r:sshd_key_t,s0)
 /etc/ssh/ssh_host_key          --      gen_context(system_u:object_r:sshd_key_t,s0)
 /etc/ssh/ssh_host_dsa_key      --      gen_context(system_u:object_r:sshd_key_t,s0)
 /etc/ssh/ssh_host_rsa_key      --      gen_context(system_u:object_r:sshd_key_t,s0)
 
 /usr/bin/ssh                   --      gen_context(system_u:object_r:ssh_exec_t,s0)
+/usr/bin/ssh-agent             --      gen_context(system_u:object_r:ssh_agent_exec_t,s0)
 /usr/bin/ssh-keygen            --      gen_context(system_u:object_r:ssh_keygen_exec_t,s0)
 
 /usr/libexec/openssh/ssh-keysign --    gen_context(system_u:object_r:ssh_keysign_exec_t,s0)
 
 /usr/sbin/sshd                 --      gen_context(system_u:object_r:sshd_exec_t,s0)
 
-/var/run/sshd\.init\.pid               --      gen_context(system_u:object_r:sshd_var_run_t,s0)
-
-ifdef(`targeted_policy', `', `
-/usr/bin/ssh-agent             --      gen_context(system_u:object_r:ssh_agent_exec_t,s0)
-
-HOME_DIR/\.ssh(/.*)?                   gen_context(system_u:object_r:ROLE_home_ssh_t,s0)
-')
+/var/run/sshd\.init\.pid       --      gen_context(system_u:object_r:sshd_var_run_t,s0)
index 129bf738b9f41189c4b5c6695d2c1537210ab664..51e058c888dc2a3bdb36d22ec341d8c3ef3da8d1 100644 (file)
@@ -80,11 +80,6 @@ kernel_link_key(sshd_t)
 corenet_tcp_bind_xserver_port(sshd_t)
 corenet_sendrecv_xserver_server_packets(sshd_t)
 
-ifdef(`targeted_policy',`
-       unconfined_domain(sshd_t)
-       unconfined_shell_domtrans(sshd_t)
-')
-
 tunable_policy(`ssh_sysadm_login',`
        # Relabel and access ptys created by sshd
        # ioctl is necessary for logout() processing for utmp entry and for w to
@@ -123,6 +118,11 @@ optional_policy(`
        rssh_read_all_users_ro_content(sshd_t)
 ')
 
+optional_policy(`
+       unconfined_domain(sshd_t)
+       unconfined_shell_domtrans(sshd_t)
+')
+
 ifdef(`TODO',`
 tunable_policy(`ssh_sysadm_login',`
        # Relabel and access ptys created by sshd
@@ -153,39 +153,37 @@ tunable_policy(`ssh_sysadm_login',`
 # sshd_extern_t is the domain for ssh from outside our network
 #
 
-ifdef(`strict_policy',`
-       ifdef(`TODO',`
-       domain_trans(initrc_t, sshd_exec_t, sshd_extern_t)
+ifdef(`TODO',`
+domain_trans(initrc_t, sshd_exec_t, sshd_extern_t)
 
-       domain_trans(sshd_extern_t, shell_exec_t, user_mini_domain)
-       # Signal the user domains.
-       allow sshd_extern_t user_mini_domain:process signal;
+domain_trans(sshd_extern_t, shell_exec_t, user_mini_domain)
+# Signal the user domains.
+allow sshd_extern_t user_mini_domain:process signal;
 
-       ifdef(`xauth.te', `
-       domain_trans(sshd_extern_t, xauth_exec_t, user_mini_domain)
-       ')
+ifdef(`xauth.te', `
+domain_trans(sshd_extern_t, xauth_exec_t, user_mini_domain)
+')
 
-       # Relabel and access ptys created by sshd
-       # ioctl is necessary for logout() processing for utmp entry and for w to
-       # display the tty.
-       # some versions of sshd on the new SE Linux require setattr
-       allow sshd_extern_t user_mini_domain:chr_file { relabelto read write getattr ioctl setattr };
+# Relabel and access ptys created by sshd
+# ioctl is necessary for logout() processing for utmp entry and for w to
+# display the tty.
+# some versions of sshd on the new SE Linux require setattr
+allow sshd_extern_t user_mini_domain:chr_file { relabelto read write getattr ioctl setattr };
 
-       # inheriting stream sockets is needed for "ssh host command" as no pty
-       # is allocated
-       allow user_mini_domain sshd_extern_t:unix_stream_socket rw_stream_socket_perms;
+# inheriting stream sockets is needed for "ssh host command" as no pty
+# is allocated
+allow user_mini_domain sshd_extern_t:unix_stream_socket rw_stream_socket_perms;
 
-       optional_policy(`
-               domain_trans(inetd_t, sshd_exec_t, sshd_extern_t)
-       ')
+optional_policy(`
+       domain_trans(inetd_t, sshd_exec_t, sshd_extern_t)
+')
 
-       ifdef(`direct_sysadm_daemon', `
-       # Direct execution by sysadm_r.
-       domain_auto_trans(sysadm_t, sshd_exec_t, sshd_t)
-       role_transition sysadm_r sshd_exec_t system_r;
-       ')
-       ') dnl endif TODO
+ifdef(`direct_sysadm_daemon', `
+# Direct execution by sysadm_r.
+domain_auto_trans(sysadm_t, sshd_exec_t, sshd_t)
+role_transition sysadm_r sshd_exec_t system_r;
 ')
+') dnl endif TODO
 
 ########################################
 #
@@ -227,21 +225,8 @@ logging_send_syslog_msg(ssh_keygen_t)
 allow ssh_keygen_t proc_t:dir r_dir_perms;
 allow ssh_keygen_t proc_t:lnk_file read;
 
-userdom_use_sysadm_ttys(ssh_keygen_t)
 userdom_dontaudit_use_unpriv_user_fds(ssh_keygen_t)
 
-# cjp: with the old daemon_(base_)domain being broken up into
-# a daemon and system interface, this probably is not needed:
-ifdef(`direct_sysadm_daemon',`
-       userdom_dontaudit_use_sysadm_terms(ssh_keygen_t)
-')
-
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(ssh_keygen_t)
-       term_dontaudit_use_generic_ptys(ssh_keygen_t)
-       files_dontaudit_read_root_files(ssh_keygen_t)
-')
-
 optional_policy(`
        nscd_socket_use(ssh_keygen_t)
 ')
index ff31d9b1894f1197ee1776129544abc2a1312f11..b9a386b4454f01c55ad7231612ea623fc42b20dc 100644 (file)
@@ -90,12 +90,6 @@ ifdef(`distro_gentoo', `
        userdom_dontaudit_use_unpriv_user_fds(stunnel_t)
        userdom_dontaudit_search_sysadm_home_dirs(stunnel_t)
 
-       ifdef(`targeted_policy', `
-               term_dontaudit_use_unallocated_ttys(stunnel_t)
-               term_dontaudit_use_generic_ptys(stunnel_t)
-               files_dontaudit_read_root_files(stunnel_t)
-       ')
-
        optional_policy(`
                daemontools_service_domain(stunnel_t, stunnel_exec_t)
        ')
index 00d126230921eaaf9146e779cf5085d2d625cb31..857ef97b9e286021da36bcfc6746f75cbf61c9e8 100644 (file)
@@ -79,12 +79,6 @@ userdom_dontaudit_use_unpriv_user_fds(tftpd_t)
 userdom_dontaudit_use_sysadm_ttys(tftpd_t)
 userdom_dontaudit_search_sysadm_home_dirs(tftpd_t)
 
-ifdef(`targeted_policy', `
-        term_dontaudit_use_unallocated_ttys(tftpd_t)
-        term_dontaudit_use_generic_ptys(tftpd_t)
-        files_dontaudit_read_root_files(tftpd_t)
-')
-
 optional_policy(`
        inetd_udp_service_domain(tftpd_t,tftpd_exec_t)
 ')
index 96423faddf506b40e26168bd741ef183be0a4003..26c276b6a0fc444739c41f73c4de86379f9e7d17 100644 (file)
@@ -78,12 +78,6 @@ userdom_dontaudit_use_unpriv_user_fds(timidity_t)
 # cjp: this should be fixed if possible so this rule can be removed.
 userdom_search_sysadm_home_dirs(timidity_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(timidity_t)
-       term_dontaudit_use_generic_ptys(timidity_t)
-       files_dontaudit_read_root_files(timidity_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(timidity_t)
 ')
index 7012e74eed23571ce8b22765df3ec9b06cca9e72..b06cb9db5e949b7ea96704535238b19076840218 100644 (file)
@@ -60,12 +60,6 @@ sysnet_read_config(transproxy_t)
 userdom_dontaudit_use_unpriv_user_fds(transproxy_t)
 userdom_dontaudit_search_sysadm_home_dirs(transproxy_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(transproxy_t)
-       term_dontaudit_use_generic_ptys(transproxy_t)
-       files_dontaudit_read_root_files(transproxy_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(transproxy_t)
 ')
index 078adee28c22cc8f968f17d2fc50b81a962dea75..b4b9d7d8303153801b065122aaaaf8657660fdcc 100644 (file)
@@ -64,12 +64,6 @@ miscfiles_read_localization(uptimed_t)
 userdom_dontaudit_use_unpriv_user_fds(uptimed_t)
 userdom_dontaudit_search_sysadm_home_dirs(uptimed_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(uptimed_t)
-       term_dontaudit_use_generic_ptys(uptimed_t)
-       files_dontaudit_read_root_files(uptimed_t)
-')
-
 optional_policy(`
        mta_send_mail(uptimed_t)
 ')
index c555a846b07650a2c5c0ce916c1bd93eec412afe..ed1dbbe43cb92b97f15b10a0ce22e410b952a0e0 100644 (file)
@@ -131,11 +131,6 @@ logging_send_syslog_msg(uux_t)
 
 miscfiles_read_localization(uux_t)
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(uux_t)
-       term_use_generic_ptys(uux_t)
-')
-
 optional_policy(`
        mta_send_mail(uux_t)
 ')
index e538d363d6011108b4a96ec08bb1349e17a0468b..3d31305b63db855a0959ced5323d764f8be85ea9 100644 (file)
@@ -82,12 +82,6 @@ userdom_priveleged_home_dir_manager(imapd_t)
 
 mta_rw_spool(imapd_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(imapd_t)
-       term_dontaudit_use_generic_ptys(imapd_t)
-       files_dontaudit_read_root_files(imapd_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(imapd_t)
 ')
index 06d88001784653b557af529281dbbf20001ee21d..50f2772c11cb6fa0432a7c985a57daeacb69b42d 100644 (file)
@@ -92,12 +92,6 @@ sysnet_read_config(watchdog_t)
 userdom_dontaudit_use_unpriv_user_fds(watchdog_t)
 userdom_dontaudit_search_sysadm_home_dirs(watchdog_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(watchdog_t)
-       term_dontaudit_use_generic_ptys(watchdog_t)
-       files_dontaudit_read_root_files(watchdog_t)
-')
-
 optional_policy(`
        mta_send_mail(watchdog_t)
 ')
index 5302588bb2ce8be4b07e26b7e852ae2406470380..800c4d237ffa78d3e12f59d235713426f8f6429b 100644 (file)
@@ -72,12 +72,6 @@ ifdef(`distro_debian',`
        init_script_tmp_filetrans(xfs_t,xfs_tmp_t,sock_file)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(xfs_t)
-       term_dontaudit_use_generic_ptys(xfs_t)
-       files_dontaudit_read_root_files(xfs_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(xfs_t)
 ')
index 8af8788f36bb3d5f42d9207063e49f69e0c313c7..ce734580a8e7d1c057a2b604a3c422c8390b1949 100644 (file)
@@ -69,12 +69,6 @@ sysnet_read_config(xprint_t)
 userdom_dontaudit_use_unpriv_user_fds(xprint_t)
 userdom_dontaudit_search_sysadm_home_dirs(xprint_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(xprint_t)
-       term_dontaudit_use_generic_ptys(xprint_t)
-       files_dontaudit_read_root_files(xprint_t)
-')
-
 optional_policy(`
        cups_read_config(xprint_t)
 ')
index 1e86113a79d5d40fada085e52270a2d6d098fb3e..c1c87ac10847f35b48da05086e87dd3b04814b78 100644 (file)
@@ -1,7 +1,6 @@
 #
 # HOME_DIR
 #
-ifdef(`strict_policy',`
 HOME_DIR/\.fonts\.conf --      gen_context(system_u:object_r:ROLE_fonts_config_t,s0)
 HOME_DIR/\.fonts(/.*)?         gen_context(system_u:object_r:ROLE_fonts_t,s0)
 HOME_DIR/\.fonts/auto(/.*)?    gen_context(system_u:object_r:ROLE_fonts_cache_t,s0)
@@ -9,7 +8,6 @@ HOME_DIR/\.fonts\.cache-.* --   gen_context(system_u:object_r:ROLE_fonts_cache_t,s
 HOME_DIR/\.ICEauthority.* --   gen_context(system_u:object_r:ROLE_iceauth_home_t,s0)
 HOME_DIR/\.xauth.*     --      gen_context(system_u:object_r:ROLE_xauth_home_t,s0)
 HOME_DIR/\.Xauthority.*        --      gen_context(system_u:object_r:ROLE_xauth_home_t,s0)
-')
 
 #
 # /dev
@@ -51,13 +49,10 @@ ifdef(`distro_redhat',`
 
 /tmp/\.ICE-unix                -d      gen_context(system_u:object_r:xdm_tmp_t,s0)
 /tmp/\.ICE-unix/.*     -s      <<none>>
+/tmp/\.X0-lock         --      gen_context(system_u:object_r:xdm_xserver_tmp_t,s0)
 /tmp/\.X11-unix                -d      gen_context(system_u:object_r:xdm_tmp_t,s0)
 /tmp/\.X11-unix/.*     -s      <<none>>
 
-ifdef(`strict_policy',`
-/tmp/\.X0-lock         --      gen_context(system_u:object_r:xdm_xserver_tmp_t,s0)
-')
-
 #
 # /usr
 #
index 0a32465cac3a9ad6f26d2b3e57986b8d938e4edc..c8b83754f0a141fff6563630b67d9e26a5fe984d 100644 (file)
@@ -736,12 +736,8 @@ interface(`xserver_read_all_users_xauth',`
                attribute xauth_home_type;
        ')
 
-       ifdef(`strict_policy',`
-               allow $1 xauth_home_type:file read_file_perms;
-               userdom_search_all_users_home_dirs($1)
-       ',`
-               userdom_read_generic_user_home_content_files($1)
-       ')
+       allow $1 xauth_home_type:file read_file_perms;
+       userdom_search_all_users_home_dirs($1)
 ')
 
 ########################################
index 0bfbe14d4c49c7c8b242421446e636544ab3b0e2..ae61202a56cf2218e88854dc674d8181b7e66907 100644 (file)
@@ -6,7 +6,6 @@ policy_module(xserver,1.6.0)
 # Declarations
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Allows clients to write to the X server shared
@@ -14,7 +13,6 @@ ifdef(`strict_policy',`
 ## </p>
 ## </desc>
 gen_tunable(allow_write_xshm,false)
-')
 
 ## <desc>
 ## <p>
@@ -276,20 +274,6 @@ userdom_signal_all_users(xdm_t)
 
 xserver_rw_session_template(xdm,xdm_t,xdm_tmpfs_t)
 
-ifdef(`targeted_policy',`
-       unconfined_domain(xdm_t)
-       unconfined_domtrans(xdm_t)
-       userdom_generic_user_home_dir_filetrans_generic_user_home_content(xdm_t, {file dir })
-
-       ifndef(`distro_redhat',`
-               allow xdm_t self:process { execheap execmem };
-       ')
-
-       ifdef(`distro_rhel4',`
-               allow xdm_t self:process { execheap execmem };
-       ')
-')
-
 tunable_policy(`use_nfs_home_dirs',`
        fs_manage_nfs_dirs(xdm_t)
        fs_manage_nfs_files(xdm_t)
@@ -363,6 +347,19 @@ optional_policy(`
        udev_read_db(xdm_t)
 ')
 
+optional_policy(`
+       unconfined_domain(xdm_t)
+       unconfined_domtrans(xdm_t)
+
+       ifndef(`distro_redhat',`
+               allow xdm_t self:process { execheap execmem };
+       ')
+
+       ifdef(`distro_rhel4',`
+               allow xdm_t self:process { execheap execmem };
+       ')
+')
+
 optional_policy(`
        userhelper_dontaudit_search_config(xdm_t)
 ')
@@ -427,7 +424,16 @@ tunable_policy(`use_samba_home_dirs',`
        fs_manage_cifs_symlinks(xdm_xserver_t)
 ')
 
-ifdef(`targeted_policy',`
+optional_policy(`
+       resmgr_stream_connect(xdm_t)
+')
+
+optional_policy(`
+       rhgb_rw_shm(xdm_xserver_t)
+       rhgb_rw_tmpfs_files(xdm_xserver_t)
+')
+
+optional_policy(`
        unconfined_domain_noaudit(xdm_xserver_t)
        unconfined_domtrans(xdm_xserver_t)
 
@@ -440,15 +446,6 @@ ifdef(`targeted_policy',`
        ')
 ')
 
-optional_policy(`
-       resmgr_stream_connect(xdm_t)
-')
-
-optional_policy(`
-       rhgb_rw_shm(xdm_xserver_t)
-       rhgb_rw_tmpfs_files(xdm_xserver_t)
-')
-
 ifdef(`TODO',`
 # Need to further investigate these permissions and
 # perhaps define derived types.
index ca643b645226a3dbdf1fe8ea84147637945a5695..ab0b55aad9130681be59e0ec70a3c8a7005b6d1e 100644 (file)
@@ -43,11 +43,6 @@ libs_use_shared_libs(zabbix_t)
 
 miscfiles_read_localization(zabbix_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(zabbix_t)
-       term_dontaudit_use_generic_ptys(zabbix_t)
-')
-
 optional_policy(`
        mysql_stream_connect(zabbix_t)
 ')
index 0c6112ae8f46ae32787c8daaa1b91b7cd3df63d4..013631c888bc7ddc91fc6eb0cee6eee19c060512 100644 (file)
@@ -114,13 +114,6 @@ sysnet_read_config(zebra_t)
 userdom_dontaudit_use_unpriv_user_fds(zebra_t)
 userdom_dontaudit_search_sysadm_home_dirs(zebra_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(zebra_t)
-       term_dontaudit_use_generic_ptys(zebra_t)
-       files_dontaudit_read_root_files(zebra_t)
-       unconfined_sigchld(zebra_t)
-')
-
 tunable_policy(`allow_zebra_write_config',`
        allow zebra_t zebra_conf_t:dir write;
        allow zebra_t zebra_conf_t:file write;
@@ -141,3 +134,7 @@ optional_policy(`
 optional_policy(`
        udev_read_db(zebra_t)
 ')
+
+optional_policy(`
+       unconfined_sigchld(zebra_t)
+')
index cc2c243db3ba556aa99dd8e11d480c3320a70c0d..fc5889def50716340bf2025b3e845f9afea424f5 100644 (file)
@@ -150,21 +150,12 @@ template(`authlogin_per_role_template',`
 ## </param>
 #
 template(`auth_domtrans_user_chk_passwd',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type system_chkpwd_t, chkpwd_exec_t;
-               ')
-
-               corecmd_search_bin($2)
-               domtrans_pattern($2,chkpwd_exec_t,system_chkpwd_t)
-       ',`
-               gen_require(`
-                       type $1_chkpwd_t, chkpwd_exec_t;
-               ')
-
-               corecmd_search_bin($2)
-               domtrans_pattern($2,chkpwd_exec_t,$1_chkpwd_t)
+       gen_require(`
+               type $1_chkpwd_t, chkpwd_exec_t;
        ')
+
+       corecmd_search_bin($2)
+       domtrans_pattern($2,chkpwd_exec_t,$1_chkpwd_t)
 ')
 
 ########################################
index 2b71f857e7ad2ff287aa45a20a984ae392ad257d..b52bff5e53fe3b0c0b3aeda65d9db31a4024764c 100644 (file)
@@ -216,12 +216,6 @@ seutil_read_file_contexts(pam_console_t)
 
 userdom_dontaudit_use_unpriv_user_fds(pam_console_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(pam_console_t)
-       term_dontaudit_use_generic_ptys(pam_console_t)
-       files_dontaudit_read_root_files(pam_console_t)
-')
-
 optional_policy(`
        gpm_getattr_gpmctl(pam_console_t)
        gpm_setattr_gpmctl(pam_console_t)
@@ -299,6 +293,11 @@ optional_policy(`
        nscd_socket_use(utempter_t)
 ')
 
+optional_policy(`
+       # Allow utemper to write to /tmp/.xses-*
+       unconfined_write_tmp_files(utempter_t)
+')
+
 optional_policy(`
        xserver_use_xdm_fds(utempter_t)
        xserver_rw_xdm_pipes(utempter_t)
index ba99ccfa61ba7f5624840b13cd47906387938f60..a86bb02862ff7c43ba7da80ce9d4bc46a5bc65ec 100644 (file)
@@ -63,12 +63,6 @@ logging_send_syslog_msg(hwclock_t)
 
 miscfiles_read_localization(hwclock_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(hwclock_t)
-       term_dontaudit_use_generic_ptys(hwclock_t)
-       files_dontaudit_read_root_files(hwclock_t)
-')
-
 optional_policy(`
        apm_append_log(hwclock_t)
        apm_rw_stream_sockets(hwclock_t)
index 13006385581d6dc94d2aa7b12a39af98843818f6..6ff57480ffcf583bb786988814fd157cd1549181 100644 (file)
@@ -154,11 +154,6 @@ seutil_read_config(fsadm_t)
 
 userdom_use_unpriv_users_fds(fsadm_t)
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(fsadm_t)
-       term_use_generic_ptys(fsadm_t)
-')
-
 tunable_policy(`read_default_t',`
        files_list_default(fsadm_t)
        files_read_default_files(fsadm_t)
index 31706fc6ad125c391bb83bb429f13dea6146120a..f8ba7883db982043684a042c5367b2ee235ea0f6 100644 (file)
@@ -114,11 +114,6 @@ ifdef(`distro_gentoo',`
        sysnet_dontaudit_read_config(getty_t)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(getty_t)
-       term_dontaudit_use_generic_ptys(getty_t)
-')
-
 optional_policy(`
        mta_send_mail(getty_t)
 ')
index 68469f3b7f03292c8add601fd2dd257d143d615c..69cdcb243d308798d82c4ab8d55a68e3e3b9c05d 100644 (file)
@@ -125,11 +125,6 @@ ifdef(`distro_redhat', `
        files_getattr_generic_locks(hotplug_t)
 ')
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(hotplug_t)
-       term_dontaudit_use_generic_ptys(hotplug_t)
-')
-
 optional_policy(`
        consoletype_exec(hotplug_t)
 ')
index 2e311561f8d6a0b2611a7ccbab64b6290c930dcf..8ec8ef1b069783868a4f0d5d52d85193f5467eb6 100644 (file)
@@ -9,15 +9,13 @@
 
 /etc/rc\.d/init\.d/.*  --      gen_context(system_u:object_r:initrc_exec_t,s0)
 
+/etc/X11/prefdm                --      gen_context(system_u:object_r:initrc_exec_t,s0)
+
 ifdef(`distro_gentoo',`
 /etc/vmware/init\.d/vmware --  gen_context(system_u:object_r:initrc_exec_t,s0)
 /etc/x11/startDM.sh    --      gen_context(system_u:object_r:initrc_exec_t,s0)
 ')
 
-ifdef(`strict_policy',`
-/etc/X11/prefdm                --      gen_context(system_u:object_r:initrc_exec_t,s0)
-')
-
 #
 # /dev
 #
index 0c3e3ad03d57f867e6bf70417aae0a091e0554b3..597a5cbcd1f03bb7aa46413342f659e1e642a408 100644 (file)
@@ -931,6 +931,24 @@ interface(`init_dontaudit_stream_connect_script',`
 
        dontaudit $1 initrc_t:unix_stream_socket connectto;
 ')
+########################################
+## <summary>
+##     Send messages to init scripts over dbus.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+#
+interface(`init_dbus_send_script',`
+       gen_require(`
+               type initrc_t;
+               class dbus send_msg;
+       ')
+
+       allow $1 initrc_t:dbus send_msg;
+')
 
 ########################################
 ## <summary>
index 8f67002935b6cf0dc3acd9abcfd2eb807bd22c3a..07c18604c676497b80fcc3dbec1141b580409303 100644 (file)
@@ -10,15 +10,6 @@ gen_require(`
 # Declarations
 #
 
-ifdef(`targeted_policy',`
-## <desc>
-## <p>
-## Allow all daemons the ability to use unallocated ttys
-## </p>
-## </desc>
-gen_tunable(allow_daemons_use_tty,false)
-')
-
 # used for direct running of init scripts
 # by admin domains
 attribute direct_run_init;
@@ -172,10 +163,6 @@ ifdef(`distro_redhat',`
        fs_tmpfs_filetrans(init_t,initctl_t,fifo_file)
 ')
 
-ifdef(`targeted_policy',`
-       unconfined_domain(init_t)
-')
-
 optional_policy(`
        auth_rw_login_records(init_t)
 ')
@@ -184,6 +171,10 @@ optional_policy(`
        nscd_socket_use(init_t)
 ')
 
+optional_policy(`
+       unconfined_domain(init_t)
+')
+
 # Run the shell in the sysadm_t domain for single-user mode.
 optional_policy(`
        userdom_shell_domtrans_sysadm(init_t)
@@ -505,37 +496,6 @@ ifdef(`distro_suse',`
        ')
 ')
 
-ifdef(`targeted_policy',`
-       domain_subj_id_change_exemption(initrc_t)
-       unconfined_domain(initrc_t)
-
-       ifdef(`distro_redhat',`
-               # system-config-services causes avc messages that should be dontaudited
-               unconfined_dontaudit_rw_pipes(daemon)
-       ')
-
-       tunable_policy(`allow_daemons_use_tty',`
-               term_use_unallocated_ttys(daemon)
-               term_use_generic_ptys(daemon)
-       ')
-
-       optional_policy(`
-               mono_domtrans(initrc_t)
-       ')
-',`
-       # cjp: require doesnt work in the else of optionals :\
-       # this also would result in a type transition
-       # conflict if sendmail is enabled
-#      optional_policy(`',`
-#              mta_send_mail(initrc_t)
-#      ')
-
-       # allow init scripts to su
-       optional_policy(`
-               su_restricted_domain_template(initrc,initrc_t,system_r)
-       ')
-')
-
 optional_policy(`
        amavis_search_lib(initrc_t)
        amavis_setattr_pid_files(initrc_t)
@@ -672,6 +632,12 @@ optional_policy(`
        mta_read_config(initrc_t)
        mta_dontaudit_read_spool_symlinks(initrc_t)
 ')
+# cjp: require doesnt work in the else of optionals :\
+# this also would result in a type transition
+# conflict if sendmail is enabled
+#optional_policy(`',`
+#      mta_send_mail(initrc_t)
+#')
 
 optional_policy(`
        ifdef(`distro_redhat',`
@@ -749,6 +715,11 @@ optional_policy(`
        squid_manage_logs(initrc_t)
 ')
 
+optional_policy(`
+       # allow init scripts to su
+       su_restricted_domain_template(initrc,initrc_t,system_r)
+')
+
 optional_policy(`
        ssh_dontaudit_read_server_keys(initrc_t)
 ')
@@ -765,6 +736,19 @@ optional_policy(`
        uml_setattr_util_sockets(initrc_t)
 ')
 
+optional_policy(`
+       unconfined_domain(initrc_t)
+
+       ifdef(`distro_redhat',`
+               # system-config-services causes avc messages that should be dontaudited
+               unconfined_dontaudit_rw_pipes(daemon)
+       ')
+
+       optional_policy(`
+               mono_domtrans(initrc_t)
+       ')
+')
+
 optional_policy(`
        vmware_read_system_config(initrc_t)
        vmware_append_system_config(initrc_t)
index 5be38a2f881474ce064a81c041299cce473ca4a2..ec5ea2b0ff3351520156418e72d9a2407e0ac5d2 100644 (file)
@@ -139,12 +139,6 @@ sysnet_read_config(ipsec_t)
 userdom_dontaudit_use_unpriv_user_fds(ipsec_t)
 userdom_dontaudit_search_sysadm_home_dirs(ipsec_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(ipsec_t)
-       term_dontaudit_use_generic_ptys(ipsec_t)
-       files_dontaudit_read_root_files(ipsec_t)
-')
-
 optional_policy(`
        nis_use_ypbind(ipsec_t)
 ')
index 0bb1ac177b6cf31d32f1ebfb61154d375230e3b1..31048bfadce97f7279125c0ba2854498a40bb283 100644 (file)
@@ -79,13 +79,6 @@ sysnet_dns_name_resolve(iptables_t)
 
 userdom_use_all_users_fds(iptables_t)
 
-ifdef(`targeted_policy', `
-       term_use_unallocated_ttys(iptables_t)
-       term_use_generic_ptys(iptables_t)
-       files_dontaudit_read_root_files(iptables_t)
-       unconfined_rw_pipes(iptables_t)
-')
-
 optional_policy(`
        fail2ban_append_log(iptables_t)
 ')
index 19c19e1af23a77504b2844a373972161efa43267..961b0c33556c408f37aa81a35a0095c422efe6e2 100644 (file)
@@ -76,7 +76,3 @@ logging_send_syslog_msg(iscsid_t)
 miscfiles_read_localization(iscsid_t)
 
 sysnet_dns_name_resolve(iscsid_t)
-
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(iscsid_t)
-')
index dba235d1e686de59892c5f11e1c64bb11668aaf5..50019e6e1652896c8eb724d43b3cdb4c679ba4f1 100644 (file)
@@ -3,30 +3,24 @@
 #
 ifdef(`distro_debian',`
 /emul/ia32-linux/usr(/.*)?/lib(/.*)?           gen_context(system_u:object_r:lib_t,s0)
-/emul/ia32-linux/usr(/.*)?/lib/.+\.so(\.[^/]*)*        -- gen_context(system_u:object_r:shlib_t,s0)
 /emul/ia32-linux/usr(/.*)?/lib(/.*)?/ld-[^/]*\.so(\.[^/]*)* gen_context(system_u:object_r:ld_so_t,s0)
 /emul/ia32-linux/lib(/.*)?                     gen_context(system_u:object_r:lib_t,s0)
-/emul/ia32-linux/lib/.+\.so(\.[^/]*)*  --      gen_context(system_u:object_r:shlib_t,s0)
 /emul/ia32-linux/lib(/.*)?/ld-[^/]*\.so(\.[^/]*)* -- gen_context(system_u:object_r:ld_so_t,s0)
 ')
 
 ifdef(`distro_gentoo',`
 /emul/linux/x86/usr(/.*)?/lib(/.*)?            gen_context(system_u:object_r:lib_t,s0)
-/emul/linux/x86/usr(/.*)?/lib/.+\.so(\.[^/]*)* -- gen_context(system_u:object_r:shlib_t,s0)
 /emul/linux/x86/lib(/.*)?                      gen_context(system_u:object_r:lib_t,s0)
-/emul/linux/x86/lib/.+\.so(\.[^/]*)*   --      gen_context(system_u:object_r:shlib_t,s0)
 /emul/linux/x86/lib(/.*)?/ld-[^/]*\.so(\.[^/]*)* -- gen_context(system_u:object_r:ld_so_t,s0)
 ')
 
 ifdef(`distro_redhat',`
 /emul/ia32-linux/usr(/.*)?/lib(/.*)?           gen_context(system_u:object_r:lib_t,s0)
-/emul/ia32-linux/usr(/.*)?/lib/.+\.so(\.[^/]*)*        -- gen_context(system_u:object_r:shlib_t,s0)
-/emul/ia32-linux/usr(/.*)?/java/.+\.so(\.[^/]*)* -- gen_context(system_u:object_r:shlib_t,s0)
-/emul/ia32-linux/usr(/.*)?/java/.*\.jar        --      gen_context(system_u:object_r:shlib_t,s0)
-/emul/ia32-linux/usr(/.*)?/java/.*\.jsa        --      gen_context(system_u:object_r:shlib_t,s0)
+/emul/ia32-linux/usr(/.*)?/java/.+\.so(\.[^/]*)* -- gen_context(system_u:object_r:lib_t,s0)
+/emul/ia32-linux/usr(/.*)?/java/.*\.jar        --      gen_context(system_u:object_r:lib_t,s0)
+/emul/ia32-linux/usr(/.*)?/java/.*\.jsa        --      gen_context(system_u:object_r:lib_t,s0)
 /emul/ia32-linux/usr(/.*)?/lib(/.*)?/ld-[^/]*\.so(\.[^/]*)* gen_context(system_u:object_r:ld_so_t,s0)
 /emul/ia32-linux/lib(/.*)?                     gen_context(system_u:object_r:lib_t,s0)
-/emul/ia32-linux/lib/.+\.so(\.[^/]*)*  --      gen_context(system_u:object_r:shlib_t,s0)
 /emul/ia32-linux/lib(/.*)?/ld-[^/]*\.so(\.[^/]*)* -- gen_context(system_u:object_r:ld_so_t,s0)
 ')
 
@@ -36,7 +30,7 @@ ifdef(`distro_redhat',`
 /etc/ld\.so\.cache                     --      gen_context(system_u:object_r:ld_so_cache_t,s0)
 /etc/ld\.so\.preload                   --      gen_context(system_u:object_r:ld_so_cache_t,s0)
 
-/etc/ppp/plugins/rp-pppoe\.so          --      gen_context(system_u:object_r:shlib_t,s0)
+/etc/ppp/plugins/rp-pppoe\.so          --      gen_context(system_u:object_r:lib_t,s0)
 
 #
 # /lib(64)?
@@ -45,8 +39,6 @@ ifdef(`distro_redhat',`
 /lib/.*                                                gen_context(system_u:object_r:lib_t,s0)
 /lib64                                 -d      gen_context(system_u:object_r:lib_t,s0)
 /lib64/.*                                      gen_context(system_u:object_r:lib_t,s0)
-/lib/.+\.so(\.[^/]*)*                  --      gen_context(system_u:object_r:shlib_t,s0)
-/lib64/.+\.so(\.[^/]*)*                        --      gen_context(system_u:object_r:shlib_t,s0)
 /lib/ld-[^/]*\.so(\.[^/]*)*            --      gen_context(system_u:object_r:ld_so_t,s0)
 /lib64/ld-[^/]*\.so(\.[^/]*)*          --      gen_context(system_u:object_r:ld_so_t,s0)
 
@@ -62,7 +54,6 @@ ifdef(`distro_gentoo',`
 /lib                                   -l      gen_context(system_u:object_r:lib_t,s0)
 /lib32                                 -d      gen_context(system_u:object_r:lib_t,s0)
 /lib32/.*                                      gen_context(system_u:object_r:lib_t,s0)
-/lib32/.+\.so(\.[^/]*)*                        --      gen_context(system_u:object_r:shlib_t,s0)
 /lib32/ld-[^/]*\.so(\.[^/]*)*          --      gen_context(system_u:object_r:ld_so_t,s0)
 ')
 
@@ -70,14 +61,10 @@ ifdef(`distro_gentoo',`
 # /opt
 #
 /opt/(.*/)?lib(/.*)?                           gen_context(system_u:object_r:lib_t,s0)
-/opt/(.*/)?lib/.+\.so                  --      gen_context(system_u:object_r:shlib_t,s0)
-/opt/(.*/)?lib/.+\.so\.[^/]*           --      gen_context(system_u:object_r:shlib_t,s0)
 /opt/(.*/)?lib64(/.*)?                         gen_context(system_u:object_r:lib_t,s0)
-/opt/(.*/)?lib64/.+\.so                        --      gen_context(system_u:object_r:shlib_t,s0)
-/opt/(.*/)?lib64/.+\.so\.[^/]*         --      gen_context(system_u:object_r:shlib_t,s0)
-/opt/(.*/)?java/.+\.jar                        --      gen_context(system_u:object_r:shlib_t,s0)
+/opt/(.*/)?java/.+\.jar                        --      gen_context(system_u:object_r:lib_t,s0)
 /opt/(.*/)?jre.*/.+\.so(\.[^/]*)*      --      gen_context(system_u:object_r:textrel_shlib_t,s0)
-/opt/(.*/)?jre/.+\.jar                 --      gen_context(system_u:object_r:shlib_t,s0)
+/opt/(.*/)?jre/.+\.jar                 --      gen_context(system_u:object_r:lib_t,s0)
 /opt/cisco-vpnclient/lib/libvpnapi\.so --      gen_context(system_u:object_r:textrel_shlib_t,s0)
 /opt/netbeans(.*/)?jdk.*/linux/.+\.so(\.[^/]*)* -- gen_context(system_u:object_r:textrel_shlib_t,s0)
 /opt/cxoffice/lib/wine/.+\.so          --      gen_context(system_u:object_r:textrel_shlib_t,s0)
@@ -86,24 +73,18 @@ ifdef(`distro_gentoo',`
 
 ifdef(`distro_gentoo',`
 # despite the extensions, they are actually libs
-/opt/Acrobat[5-9]/Reader/intellinux/plug_ins/.*\.api -- gen_context(system_u:object_r:shlib_t,s0)
-/opt/Acrobat[5-9]/Reader/intellinux/plug_ins3d/.*\.x3d -- gen_context(system_u:object_r:shlib_t,s0)
-/opt/Acrobat[5-9]/Reader/intellinux/SPPlugins/.*\.ap[il] -- gen_context(system_u:object_r:shlib_t,s0)
+/opt/Acrobat[5-9]/Reader/intellinux/plug_ins/.*\.api -- gen_context(system_u:object_r:lib_t,s0)
+/opt/Acrobat[5-9]/Reader/intellinux/plug_ins3d/.*\.x3d -- gen_context(system_u:object_r:lib_t,s0)
+/opt/Acrobat[5-9]/Reader/intellinux/SPPlugins/.*\.ap[il] -- gen_context(system_u:object_r:lib_t,s0)
 
 /opt/netscape/plugins(/.*)?                    gen_context(system_u:object_r:lib_t,s0)
-/opt/netscape/plugins/.*\.so           --      gen_context(system_u:object_r:shlib_t,s0)
 /opt/netscape/plugins/libflashplayer\.so --    gen_context(system_u:object_r:textrel_shlib_t,s0)
 /opt/netscape/plugins/nppdf\.so                --      gen_context(system_u:object_r:textrel_shlib_t,s0)
 /opt/RealPlayer/codecs(/.*)?                   gen_context(system_u:object_r:lib_t,s0)
-/opt/RealPlayer/codecs/.*\.so          --      gen_context(system_u:object_r:shlib_t,s0)
 /opt/RealPlayer/common(/.*)?                   gen_context(system_u:object_r:lib_t,s0)
-/opt/RealPlayer/common/.*\.so          --      gen_context(system_u:object_r:shlib_t,s0)
 /opt/RealPlayer/lib(/.*)?                      gen_context(system_u:object_r:lib_t,s0)
-/opt/RealPlayer/lib/.*\.so             --      gen_context(system_u:object_r:shlib_t,s0)
 /opt/RealPlayer/mozilla(/.*)?                  gen_context(system_u:object_r:lib_t,s0)
-/opt/RealPlayer/mozilla/.*\.so         --      gen_context(system_u:object_r:shlib_t,s0)
 /opt/RealPlayer/plugins(/.*)?                  gen_context(system_u:object_r:lib_t,s0)
-/opt/RealPlayer/plugins/.*\.so         --      gen_context(system_u:object_r:shlib_t,s0)
 ')
 
 #
@@ -118,24 +99,18 @@ ifdef(`distro_gentoo',`
 /usr/(.*/)?/RealPlayer/.+\.so(\.[^/]*)* --     gen_context(system_u:object_r:textrel_shlib_t,s0)
 
 /usr/(.*/)?java/.+\.so(\.[^/]*)*       --      gen_context(system_u:object_r:textrel_shlib_t,s0)
-/usr/(.*/)?java/.+\.jar                        --      gen_context(system_u:object_r:shlib_t,s0)
-/usr/(.*/)?java/.+\.jsa                        --      gen_context(system_u:object_r:shlib_t,s0)
+/usr/(.*/)?java/.+\.jar                        --      gen_context(system_u:object_r:lib_t,s0)
+/usr/(.*/)?java/.+\.jsa                        --      gen_context(system_u:object_r:lib_t,s0)
 
 /usr/(.*/)?lib(/.*)?                           gen_context(system_u:object_r:lib_t,s0)
-/usr/(.*/)?lib/.+\.so                  --      gen_context(system_u:object_r:shlib_t,s0)
-/usr/(.*/)?lib/.+\.so\.[^/]*           --      gen_context(system_u:object_r:shlib_t,s0)
 /usr/(.*/)?lib64(/.*)?                         gen_context(system_u:object_r:lib_t,s0)
-/usr/(.*/)?lib64/.+\.so                        --      gen_context(system_u:object_r:shlib_t,s0)
-/usr/(.*/)?lib64/.+\.so\.[^/]*         --      gen_context(system_u:object_r:shlib_t,s0)
 
 /usr/(.*/)?lib(64)?(/.*)?/ld-[^/]*\.so(\.[^/]*)* gen_context(system_u:object_r:ld_so_t,s0)
 
 /usr/(.*/)?nvidia/.+\.so(\..*)?                --      gen_context(system_u:object_r:textrel_shlib_t,s0)
 
-/usr/lib/transgaming_cedega/gddb_parser.so --  gen_context(system_u:object_r:shlib_t,s0)
 /usr/lib/vlc/codec/libdmo_plugin.so       --   gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib/vlc/codec/librealaudio_plugin.so  --  gen_context(system_u:object_r:textrel_shlib_t,s0)
-/usr/lib/win32/.*                      --      gen_context(system_u:object_r:shlib_t,s0)
 
 /usr/(.*/)?lib(64)?(/.*)?/nvidia/.+\.so(\..*)? -- gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib(64)?(/.*)?/nvidia/.+\.so(\..*)? --    gen_context(system_u:object_r:textrel_shlib_t,s0)
@@ -155,7 +130,7 @@ ifdef(`distro_gentoo',`
 /usr/lib(64)?/xulrunner-[^/]*/libgtkembedmoz\.so -- gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/lib(64)?/xulrunner-[^/]*/libxul\.so --    gen_context(system_u:object_r:textrel_shlib_t,s0)
 
-/usr/(local/)?.*\.so(\.[^/]*)*         --      gen_context(system_u:object_r:shlib_t,s0)
+/usr/(local/)?.*\.so(\.[^/]*)*         --      gen_context(system_u:object_r:lib_t,s0)
 /usr/(local/)?lib(64)?/wine/.+\.so     --      gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/(local/)?lib(64)?/(sse2/)?libfame-.*\.so.*        --      gen_context(system_u:object_r:textrel_shlib_t,s0)
 /usr/NX/lib/libXcomp\.so.*             --      gen_context(system_u:object_r:textrel_shlib_t,s0)
@@ -175,7 +150,7 @@ ifdef(`distro_gentoo',`
 ')
 
 ifdef(`distro_redhat',`
-/usr/share/rhn/rhn_applet/eggtrayiconmodule\.so -- gen_context(system_u:object_r:shlib_t,s0)
+/usr/share/rhn/rhn_applet/eggtrayiconmodule\.so -- gen_context(system_u:object_r:lib_t,s0)
 
 # The following are libraries with text relocations in need of execmod permissions
 # Some of them should be fixed and removed from this list
@@ -299,9 +274,8 @@ HOME_DIR/.*/plugins/nprhapengine\.so.* --   gen_context(system_u:object_r:textrel_
 #
 /var/ftp/lib(64)?(/.*)?                                gen_context(system_u:object_r:lib_t,s0)
 /var/ftp/lib(64)?/ld[^/]*\.so(\.[^/]*)*        --      gen_context(system_u:object_r:ld_so_t,s0)
-/var/ftp/lib(64)?/lib[^/]*\.so(\.[^/]*)* --    gen_context(system_u:object_r:shlib_t,s0)
 
-/var/mailman/pythonlib(/.*)?/.+\.so(\..*)? --  gen_context(system_u:object_r:shlib_t,s0)
+/var/mailman/pythonlib(/.*)?/.+\.so(\..*)? --  gen_context(system_u:object_r:lib_t,s0)
 
 ifdef(`distro_suse',`
 /var/lib/samba/bin/.+\.so(\.[^/]*)*    -l      gen_context(system_u:object_r:lib_t,s0)
@@ -310,6 +284,3 @@ ifdef(`distro_suse',`
 /var/spool/postfix/lib(64)?(/.*)?              gen_context(system_u:object_r:lib_t,s0)
 /var/spool/postfix/usr(/.*)?                   gen_context(system_u:object_r:lib_t,s0)
 /var/spool/postfix/lib(64)?/ld.*\.so.* --      gen_context(system_u:object_r:ld_so_t,s0)
-/var/spool/postfix/lib(64)?/lib.*\.so.*        --      gen_context(system_u:object_r:shlib_t,s0)
-/var/spool/postfix/lib(64)?/[^/]*/lib.*\.so.* -- gen_context(system_u:object_r:shlib_t,s0)
-/var/spool/postfix/lib(64)?/devfsd/.+\.so.* -- gen_context(system_u:object_r:shlib_t,s0)
index 2e71beaf6359df7066144a1ab7a0578c90f85875..db3945a8ff0b44bd6e399049aa9337f03db8f089 100644 (file)
@@ -292,14 +292,8 @@ interface(`libs_exec_lib_files',`
 ## </param>
 #
 interface(`libs_use_lib_files',`
-       gen_require(`
-               type lib_t;
-       ')
-
-       files_list_usr($1)
-       allow $1 lib_t:dir list_dir_perms;
-       read_lnk_files_pattern($1,lib_t,lib_t)
-       mmap_files_pattern($1,lib_t,lib_t)
+       refpolicywarn(`$0($*) has been deprecated, use libs_use_shared_libs() instead.')
+       libs_use_shared_libs($1)
 ')
 
 ########################################
@@ -392,10 +386,10 @@ interface(`libs_delete_lib_symlinks',`
 # cjp: added for prelink
 interface(`libs_manage_shared_libs',`
        gen_require(`
-               type lib_t, shlib_t, textrel_shlib_t;
+               type lib_t, textrel_shlib_t;
        ')
 
-       manage_files_pattern($1,lib_t,{ shlib_t textrel_shlib_t })
+       manage_files_pattern($1,lib_t,{ lib_t textrel_shlib_t })
 ')
 
 ########################################
@@ -410,13 +404,13 @@ interface(`libs_manage_shared_libs',`
 #
 interface(`libs_use_shared_libs',`
        gen_require(`
-               type lib_t, shlib_t, textrel_shlib_t;
+               type lib_t, textrel_shlib_t;
        ')
 
        files_list_usr($1)
        allow $1 lib_t:dir list_dir_perms;
-       read_lnk_files_pattern($1,lib_t,{ lib_t shlib_t textrel_shlib_t })
-       mmap_files_pattern($1,lib_t,{ shlib_t textrel_shlib_t })
+       read_lnk_files_pattern($1,lib_t,{ lib_t textrel_shlib_t })
+       mmap_files_pattern($1,lib_t,{ lib_t textrel_shlib_t })
        allow $1 textrel_shlib_t:file execmod;
 ')
 
@@ -433,11 +427,11 @@ interface(`libs_use_shared_libs',`
 #
 interface(`libs_legacy_use_shared_libs',`
        gen_require(`
-               type shlib_t, textrel_shlib_t;
+               type lib_t;
        ')
 
        libs_use_shared_libs($1)
-       allow $1 { shlib_t textrel_shlib_t }:file execmod;
+       allow $1 lib_t:file execmod;
 ')
 
 ########################################
@@ -454,10 +448,10 @@ interface(`libs_legacy_use_shared_libs',`
 # cjp: added for prelink
 interface(`libs_relabel_shared_libs',`
        gen_require(`
-               type lib_t, shlib_t, textrel_shlib_t;
+               type lib_t, textrel_shlib_t;
        ')
 
-       relabel_files_pattern($1,lib_t,{ shlib_t textrel_shlib_t })
+       relabel_files_pattern($1,lib_t,{ lib_t textrel_shlib_t })
 ')
 
 ########################################
@@ -477,11 +471,7 @@ interface(`libs_relabel_shared_libs',`
 ## </param>
 #
 interface(`lib_filetrans_shared_lib',`
-       gen_require(`
-               type lib_t, shlib_t;
-       ')
-
-       filetrans_pattern($1,lib_t,shlib_t,$2)
+       refpolicywarn(`$0($*) has been deprecated.')
 ')
 
 ########################################
@@ -510,6 +500,5 @@ interface(`lib_filetrans_shared_lib',`
 ## </param>
 #
 interface(`files_lib_filetrans_shared_lib',`
-       refpolicywarn(`$0($*) has been deprecated, use lib_filetrans_shared_lib() instead.')
-       lib_filetrans_shared_lib($1,$2)
+       refpolicywarn(`$0($*) has been deprecated.')
 ')
index abb3189abc19615e943c4fafc39f60bd6fe54211..c312700a703394b11508a513e749f65c5b7c820b 100644 (file)
@@ -29,20 +29,9 @@ files_tmp_file(ldconfig_tmp_t)
 #
 # lib_t is the type of files in the system lib directories.
 #
-type lib_t;
+type lib_t alias shlib_t;
 files_type(lib_t)
 
-#
-# shlib_t is the type of shared objects in the system lib
-# directories.
-#
-ifdef(`targeted_policy',`
-       typealias lib_t alias shlib_t;
-',`
-       type shlib_t;
-       files_type(shlib_t)
-')
-
 #
 # textrel_shlib_t is the type of shared objects in the system lib
 # directories, which require text relocation.
@@ -97,13 +86,6 @@ ifdef(`hide_broken_symptoms',`
        ')
 ')
 
-ifdef(`targeted_policy',`
-       allow ldconfig_t lib_t:file read_file_perms;
-       files_read_generic_tmp_symlinks(ldconfig_t)
-       term_dontaudit_use_generic_ptys(ldconfig_t)
-       term_dontaudit_use_unallocated_ttys(ldconfig_t)
-')
-
 optional_policy(`
        # dontaudit access to /usr/lib/apache, normal programs cannot read these libs anyway
        apache_dontaudit_search_modules(ldconfig_t)
index f23717c972780dddb001d72d1dc9302a6271f0a4..21b33569b7f95b1ae03ab1bd0b92e5844097357e 100644 (file)
@@ -138,10 +138,6 @@ userdom_use_unpriv_users_fds(local_login_t)
 userdom_sigchld_all_users(local_login_t)
 userdom_create_all_users_keys(local_login_t)
 
-ifdef(`targeted_policy',`
-       unconfined_shell_domtrans(local_login_t)
-')
-
 tunable_policy(`read_default_t',`
        files_list_default(local_login_t)
        files_read_default_files(local_login_t)
@@ -161,7 +157,11 @@ tunable_policy(`use_samba_home_dirs',`
 ')
 
 optional_policy(`
-       dbus_system_bus_client_template(local_login,local_login_t)
+       alsa_domtrans(local_login_t)
+')
+
+optional_policy(`
+       dbus_system_bus_client_template(local_login, local_login_t)
        dbus_send_system_bus(local_login_t)
 
        consolekit_dbus_chat(local_login_t)
@@ -186,11 +186,11 @@ optional_policy(`
 ')
 
 optional_policy(`
-       usermanage_read_crack_db(local_login_t)
+       unconfined_domain(local_login_t)
 ')
 
 optional_policy(`
-       alsa_domtrans(local_login_t)
+       usermanage_read_crack_db(local_login_t)
 ')
 
 optional_policy(`
index d5350272844a09a1594e207eb3d4dedd7ea556d4..41114656ba4cc48aff99467bc0a4db3ab24dbcd0 100644 (file)
@@ -94,11 +94,6 @@ locallogin_dontaudit_use_fds(auditctl_t)
 
 logging_send_syslog_msg(auditctl_t)
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(auditctl_t)
-       term_use_unallocated_ttys(auditctl_t)
-')
-
 ########################################
 #
 # Auditd local policy
@@ -161,14 +156,6 @@ seutil_dontaudit_read_config(auditd_t)
 
 userdom_dontaudit_use_unpriv_user_fds(auditd_t)
 userdom_dontaudit_search_sysadm_home_dirs(auditd_t)
-# cjp: this is questionable
-userdom_use_sysadm_ttys(auditd_t)
-
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(auditd_t)
-       term_dontaudit_use_unallocated_ttys(auditd_t)
-       unconfined_dontaudit_read_pipes(auditd_t)
-')
 
 optional_policy(`
        seutil_sigchld_newrole(auditd_t)
@@ -230,11 +217,6 @@ optional_policy(`
        udev_read_db(klogd_t)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(klogd_t)
-       term_dontaudit_use_unallocated_ttys(klogd_t)
-')
-
 optional_policy(`
        seutil_sigchld_newrole(klogd_t)
 ')
@@ -363,13 +345,6 @@ ifdef(`distro_suse',`
        files_var_lib_filetrans(syslogd_t,devlog_t,sock_file)
 ')
 
-ifdef(`targeted_policy',`
-       allow syslogd_t var_run_t:fifo_file { ioctl read write };
-       term_dontaudit_use_unallocated_ttys(syslogd_t)
-       term_dontaudit_use_generic_ptys(syslogd_t)
-       files_dontaudit_read_root_files(syslogd_t)
-')
-
 optional_policy(`
        inn_manage_log(syslogd_t)
 ')
index dc23be383869efde27886b244d2c4067d3f9a2d7..a178d6a69dfc2c846f598d1f1f1eaf5689ba303e 100644 (file)
@@ -122,12 +122,6 @@ userdom_dontaudit_search_sysadm_home_dirs(clvmd_t)
 lvm_domtrans(clvmd_t)
 lvm_read_config(clvmd_t)
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(clvmd_t)
-       term_dontaudit_use_generic_ptys(clvmd_t)
-       files_dontaudit_read_root_files(clvmd_t)
-')
-
 optional_policy(`
        ccs_stream_connect(clvmd_t)
 ')
@@ -286,13 +280,6 @@ ifdef(`distro_redhat',`
        files_rw_isid_type_dirs(lvm_t)
 ')
 
-ifdef(`targeted_policy', `
-       term_use_unallocated_ttys(lvm_t)
-       term_use_generic_ptys(lvm_t)
-
-       files_dontaudit_read_root_files(lvm_t)
-')
-
 optional_policy(`
        bootloader_rw_tmp_files(lvm_t)
 ')
index 527400ff106512b8b184aaa7fca71411275ba581..8e8b003cc4ced355f2e6ce5861d407f136ca969d 100644 (file)
@@ -116,11 +116,6 @@ if( ! secure_mode_insmod ) {
        kernel_domtrans_to(insmod_t,insmod_exec_t)
 }
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(insmod_t)
-       term_use_generic_ptys(insmod_t)
-')
-
 optional_policy(`
        hotplug_search_config(insmod_t)
 ')
@@ -210,9 +205,9 @@ files_list_home(depmod_t)
 userdom_read_staff_home_content_files(depmod_t)
 userdom_read_sysadm_home_content_files(depmod_t)
 
-ifdef(`targeted_policy', `
-       term_use_unallocated_ttys(depmod_t)
-       term_use_generic_ptys(depmod_t)
+optional_policy(`
+       # Read System.map from home directories.
+       unconfined_read_home_content_files(depmod_t)
 ')
 
 optional_policy(`
@@ -287,8 +282,3 @@ ifdef(`distro_gentoo',`
                consoletype_exec(update_modules_t)
        ')
 ')
-
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(update_modules_t)
-       term_use_unallocated_ttys(update_modules_t)
-')
index e39a5e9fa923d5889bb734cc92620b73e0748e83..f9717ce11dcb343a0d4c1f1322c41020b59d9fbe 100644 (file)
@@ -49,6 +49,10 @@ interface(`mount_run',`
        mount_domtrans($1)
        role $2 types mount_t;
        allow mount_t $3:chr_file rw_file_perms;
+
+       optional_policy(`
+               samba_run_smbmount($1, $2, $3)
+       ')
 ')
 
 ########################################
@@ -128,18 +132,42 @@ interface(`mount_send_nfs_client_request',`
 ## </param>
 #
 interface(`mount_domtrans_unconfined',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type unconfined_mount_t, mount_exec_t;
-               ')
+       gen_require(`
+               type unconfined_mount_t, mount_exec_t;
+       ')
 
-               domtrans_pattern($1,mount_exec_t,unconfined_mount_t)
+       domtrans_pattern($1, mount_exec_t, unconfined_mount_t)
+')
 
-               allow $1 unconfined_mount_t:fd use;
-               allow unconfined_mount_t $1:fd use;
-               allow unconfined_mount_t $1:fifo_file rw_file_perms;
-               allow unconfined_mount_t $1:process sigchld;
-       ',`
-               mount_domtrans($1)
+########################################
+## <summary>
+##     Execute mount in the unconfined mount domain, and
+##     allow the specified role the unconfined mount domain,
+##     and use the caller's terminal.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+## <param name="role">
+##     <summary>
+##     The role to be allowed the unconfined mount domain.
+##     </summary>
+## </param>
+## <param name="terminal">
+##     <summary>
+##     The type of the terminal allow the unconfined mount domain to use.
+##     </summary>
+## </param>
+## <rolecap/>
+#
+interface(`mount_run_unconfined',`
+       gen_require(`
+               type unconfined_mount_t;
        ')
+
+       mount_domtrans_unconfined($1)
+       role $2 types unconfined_mount_t;
+       allow unconfined_mount_t $3:chr_file rw_file_perms;
 ')
index eb20fb7ec12cc19aaa487f80459fb4e14b344833..2670a9f914ebc879595a4d936b969b663b83f740 100644 (file)
@@ -6,14 +6,12 @@ policy_module(mount,1.8.0)
 # Declarations
 #
 
-ifdef(`targeted_policy',`
 ## <desc>
 ## <p>
 ## Allow mount to mount any file
 ## </p>
 ## </desc>
 gen_tunable(allow_mount_anyfile,false)
-')
 
 type mount_t;
 type mount_exec_t;
@@ -26,10 +24,11 @@ files_type(mount_loopback_t)
 type mount_tmp_t;
 files_tmp_file(mount_tmp_t)
 
-ifdef(`targeted_policy',`
-       type unconfined_mount_t;
-       application_domain(unconfined_mount_t,mount_exec_t)
-')
+# causes problems with interfaces when
+# this is optionally declared in monolithic
+# policy--duplicate type declaration
+type unconfined_mount_t;
+application_domain(unconfined_mount_t,mount_exec_t)
 
 ########################################
 #
@@ -128,12 +127,10 @@ ifdef(`distro_redhat',`
        ')
 ')
 
-ifdef(`targeted_policy',`
-       tunable_policy(`allow_mount_anyfile',`
-               auth_read_all_dirs_except_shadow(mount_t)
-               auth_read_all_files_except_shadow(mount_t)
-               files_mounton_non_security(mount_t)
-       ')
+tunable_policy(`allow_mount_anyfile',`
+       auth_read_all_dirs_except_shadow(mount_t)
+       auth_read_all_files_except_shadow(mount_t)
+       files_mounton_non_security(mount_t)
 ')
 
 optional_policy(`
@@ -201,7 +198,7 @@ optional_policy(`
 # Unconfined mount local policy
 #
 
-ifdef(`targeted_policy',`
+optional_policy(`
        files_etc_filetrans_etc_runtime(unconfined_mount_t,file)
        unconfined_domain(unconfined_mount_t)
 ')
index 7763585cea88140a17377f486a99ad82e595a86f..6c658ee05ce31a3a1a8e4a4b0b7fbb481c79af3a 100644 (file)
@@ -112,14 +112,6 @@ sysnet_manage_config(cardmgr_t)
 userdom_dontaudit_use_unpriv_user_fds(cardmgr_t)
 userdom_dontaudit_search_sysadm_home_dirs(cardmgr_t)
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(cardmgr_t)
-       term_use_generic_ptys(cardmgr_t)
-       term_dontaudit_use_unallocated_ttys(cardmgr_t)
-       term_dontaudit_use_generic_ptys(cardmgr_t)
-       files_dontaudit_read_root_files(cardmgr_t)
-')
-
 optional_policy(`
        seutil_dontaudit_read_config(cardmgr_t)
        seutil_sigchld_newrole(cardmgr_t)
index d484e806c5123ebb087bc3cdeb5f4d4e5c073100..dde999405687755537d210985fb4f31a34526154 100644 (file)
@@ -74,12 +74,6 @@ userdom_dontaudit_search_all_users_home_content(mdadm_t)
 
 mta_send_mail(mdadm_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(mdadm_t)
-       term_dontaudit_use_generic_ptys(mdadm_t)
-       files_dontaudit_read_root_files(mdadm_t)
-')
-
 optional_policy(`
        gpm_dontaudit_getattr_gpmctl(mdadm_t)
 ')
index fe267d9149ce3d1b4365a2b739a12692b499f57d..c7074353e37cb8a6f93f303b5f6b4467325a5564 100644 (file)
@@ -1,10 +1,8 @@
 
 policy_module(selinuxutil,1.7.0)
 
-ifdef(`strict_policy',`
-       gen_require(`
-               bool secure_mode;
-       ')
+gen_require(`
+       bool secure_mode;
 ')
 
 ########################################
@@ -152,11 +150,6 @@ libs_use_shared_libs(checkpolicy_t)
 
 userdom_use_all_users_fds(checkpolicy_t)
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(checkpolicy_t)
-       term_use_unallocated_ttys(checkpolicy_t)
-')
-
 ########################################
 #
 # Load_policy local policy
@@ -205,11 +198,6 @@ ifdef(`hide_broken_symptoms',`
        ')
 ')
 
-ifdef(`targeted_policy',`
-       term_use_unallocated_ttys(load_policy_t)
-       term_use_generic_ptys(load_policy_t)
-')
-
 ########################################
 #
 # Newrole local policy
@@ -294,15 +282,13 @@ userdom_use_unpriv_users_fds(newrole_t)
 userdom_dontaudit_search_all_users_home_content(newrole_t)
 userdom_search_all_users_home_dirs(newrole_t)
 
-ifdef(`strict_policy',`
-       # if secure mode is enabled, then newrole
-       # can only transition to unprivileged users
-       if(secure_mode) {
-               userdom_spec_domtrans_unpriv_users(newrole_t)
-       } else {
-               userdom_spec_domtrans_all_users(newrole_t)
-       }
-')
+# if secure mode is enabled, then newrole
+# can only transition to unprivileged users
+if(secure_mode) {
+       userdom_spec_domtrans_unpriv_users(newrole_t)
+} else {
+       userdom_spec_domtrans_all_users(newrole_t)
+}
 
 tunable_policy(`allow_polyinstantiation',`
        files_polyinstantiate_all(newrole_t)
@@ -357,11 +343,6 @@ logging_send_syslog_msg(restorecond_t)
 
 miscfiles_read_localization(restorecond_t)
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_generic_ptys(restorecond_t)
-       term_dontaudit_use_unallocated_ttys(restorecond_t)
-')
-
 optional_policy(`
        rpm_use_script_fds(restorecond_t)
 ')
@@ -488,7 +469,6 @@ auth_use_nsswitch(semanage_t)
 
 libs_use_ld_so(semanage_t)
 libs_use_shared_libs(semanage_t)
-libs_use_lib_files(semanage_t)
 
 locallogin_use_fds(semanage_t)
 
@@ -509,8 +489,6 @@ seutil_get_semanage_read_lock(semanage_t)
 # netfilter_contexts:
 seutil_manage_default_contexts(semanage_t)
 
-userdom_search_sysadm_home_dirs(semanage_t)
-
 ifdef(`distro_debian',`
        files_read_var_lib_files(semanage_t)
        files_read_var_lib_symlinks(semanage_t)
@@ -523,6 +501,11 @@ ifdef(`enable_mls',`
        # Handle pp files created in homedir and /tmp
        userdom_read_sysadm_home_content_files(semanage_t)
        userdom_read_sysadm_tmp_files(semanage_t)
+
+       optional_policy(`
+               unconfined_read_home_content_files(semanage_t)
+               unconfined_read_tmp_files(semanage_t)
+       ')
 ')
 
 ########################################
index f757419313bba16423d6d317a537518514a7b63c..d54810ee16b7622f24d865acb47c696ca93be5f1 100644 (file)
@@ -142,12 +142,6 @@ ifdef(`distro_redhat', `
        files_exec_etc_files(dhcpc_t)
 ')
 
-ifdef(`targeted_policy', `
-       term_dontaudit_use_unallocated_ttys(dhcpc_t)
-       term_dontaudit_use_generic_ptys(dhcpc_t)
-       files_dontaudit_read_root_files(dhcpc_t)
-')
-
 optional_policy(`
        consoletype_domtrans(dhcpc_t)
 ')
@@ -320,15 +314,6 @@ ifdef(`hide_broken_symptoms',`
        ')
 ')
 
-ifdef(`targeted_policy',`
-       term_use_generic_ptys(ifconfig_t)
-       term_use_unallocated_ttys(ifconfig_t)
-
-       optional_policy(`
-               unconfined_dontaudit_read_pipes(ifconfig_t)
-       ')
-')
-
 optional_policy(`
        netutils_domtrans(dhcpc_t)
 ')
index 6bdbb4a2283170664ef485c0782e49b27ba97ef7..d63c9d4eb282339c7b9a49c344b2a68531b86f81 100644 (file)
@@ -159,7 +159,6 @@ sysnet_signal_dhcpc(udev_t)
 sysnet_manage_config(udev_t)
 sysnet_etc_filetrans_config(udev_t)
 
-userdom_use_sysadm_ttys(udev_t)
 userdom_dontaudit_search_all_users_home_content(udev_t)
 
 ifdef(`distro_gentoo',`
@@ -184,11 +183,6 @@ ifdef(`distro_redhat',`
        netutils_domtrans(udev_t)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(udev_t)
-       term_dontaudit_use_generic_ptys(udev_t)
-')
-
 optional_policy(`
        brctl_domtrans(udev_t)
 ')
index 5d9bb3b4949b7c525325fdf9b88555628c97313d..967c66c3f13d9e373390ac5c6a8a2a9c2c5fb6d1 100644 (file)
@@ -2,12 +2,11 @@
 # e.g.:
 # /usr/local/bin/appsrv                --      gen_context(system_u:object_r:unconfined_exec_t,s0)
 # For the time being until someone writes a sane policy, we need initrc to transition to unconfined_t
+/usr/bin/qemu.*                        --      gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
+/usr/bin/valgrind              --      gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
 /usr/bin/vncserver             --      gen_context(system_u:object_r:unconfined_exec_t,s0)
 
-ifdef(`targeted_policy',`
+/usr/lib/ia32el/ia32x_loader   --      gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
 /usr/lib/openoffice\.org.*/program/.+\.bin -- gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
-/usr/bin/qemu.*                        --      gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
-/usr/bin/valgrind              --      gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
+
 /usr/local/RealPlayer/realplay\.bin -- gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
-/usr/lib/ia32el/ia32x_loader   --      gen_context(system_u:object_r:unconfined_execmem_exec_t,s0)
-')
index 816c263816d377f98925faf3c0ae1a7183afee8b..a49911fdb28c28d1058dfff75cb91e014e3ef46d 100644 (file)
@@ -12,6 +12,7 @@
 #
 interface(`unconfined_domain_noaudit',`
        gen_require(`
+               type unconfined_t;
                class dbus all_dbus_perms;
                class nscd all_nscd_perms;
                class passwd all_passwd_perms;
@@ -116,6 +117,56 @@ interface(`unconfined_domain',`
 #      ')
 ')
 
+########################################
+## <summary>
+##     Add an alias type to the unconfined domain.  (Deprecated)
+## </summary>
+## <desc>
+##     <p>
+##     Add an alias type to the unconfined domain.  (Deprecated)
+##     </p>
+##     <p>
+##     This is added to support targeted policy.  Its
+##     use should be limited.  It has no effect
+##     on the strict policy.
+##     </p>
+## </desc>
+## <param name="domain">
+##     <summary>
+##     New alias of the unconfined domain.
+##     </summary>
+## </param>
+#
+interface(`unconfined_alias_domain',`
+       refpolicywarn(`$0($1) has been deprecated.')
+')
+
+########################################
+## <summary>
+##     Add an alias type to the unconfined execmem
+##     program file type.  (Deprecated)
+## </summary>
+## <desc>
+##     <p>
+##     Add an alias type to the unconfined execmem
+##     program file type.  (Deprecated)
+##     </p>
+##     <p>
+##     This is added to support targeted policy.  Its
+##     use should be limited.  It has no effect
+##     on the strict policy.
+##     </p>
+## </desc>
+## <param name="domain">
+##     <summary>
+##     New alias of the unconfined execmem program type.
+##     </summary>
+## </param>
+#
+interface(`unconfined_execmem_alias_program',`
+       refpolicywarn(`$0($1) has been deprecated.')
+')
+
 ########################################
 ## <summary>
 ##     Transition to the unconfined domain.
@@ -473,74 +524,69 @@ interface(`unconfined_dbus_chat',`
 
 ########################################
 ## <summary>
-##     Add an alias type to the unconfined domain.
+##     Connect to the the unconfined DBUS
+##     for service (acquire_svc).
 ## </summary>
-## <desc>
-##     <p>
-##     Add an alias type to the unconfined domain.
-##     </p>
-##     <p>
-##     This is added to support targeted policy.  Its
-##     use should be limited.  It has no effect
-##     on the strict policy.
-##     </p>
-## </desc>
 ## <param name="domain">
 ##     <summary>
-##     New alias of the unconfined domain.
+##     Domain allowed access.
 ##     </summary>
 ## </param>
 #
-interface(`unconfined_alias_domain',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type unconfined_t;
-               ')
-
-               typealias unconfined_t alias $1;
-       ',`
-               refpolicywarn(`$0($1) has no effect in strict policy.')
+interface(`unconfined_dbus_connect',`
+       gen_require(`
+               type unconfined_t;
+               class dbus acquire_svc;
        ')
+
+       allow $1 unconfined_t:dbus acquire_svc;
 ')
 
 ########################################
 ## <summary>
-##     Add an alias type to the unconfined execmem
-##     program file type.
+##     Read files in unconfined users home directories.
 ## </summary>
-## <desc>
-##     <p>
-##     Add an alias type to the unconfined execmem
-##     program file type.
-##     </p>
-##     <p>
-##     This is added to support targeted policy.  Its
-##     use should be limited.  It has no effect
-##     on the strict policy.
-##     </p>
-## </desc>
 ## <param name="domain">
 ##     <summary>
-##     New alias of the unconfined execmem program type.
+##     Domain allowed access.
 ##     </summary>
 ## </param>
 #
-interface(`unconfined_execmem_alias_program',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type unconfined_execmem_exec_t;
-               ')
+interface(`unconfined_read_home_content_files',`
+       gen_require(`
+               type unconfined_home_dir_t, unconfined_home_t;
+       ')
 
-               typealias unconfined_execmem_exec_t alias $1;
-       ',`
-               refpolicywarn(`$0($1) has no effect in strict policy.')
+       files_search_home($1)
+       allow $1 { unconfined_home_dir_t unconfined_home_t }:dir list_dir_perms;
+       read_files_pattern($1, { unconfined_home_dir_t unconfined_home_t }, unconfined_home_t)
+       read_lnk_files_pattern($1, { unconfined_home_dir_t unconfined_home_t }, unconfined_home_t)
+')
+
+########################################
+## <summary>
+##     Read unconfined users temporary files.
+## </summary>
+## <param name="domain">
+##     <summary>
+##     Domain allowed access.
+##     </summary>
+## </param>
+#
+interface(`unconfined_read_tmp_files',`
+       gen_require(`
+               type unconfined_tmp_t;
        ')
+
+       files_search_tmp($1)
+       allow $1 unconfined_tmp_t:dir list_dir_perms;
+       read_files_pattern($1, unconfined_tmp_t, unconfined_tmp_t)
+       read_lnk_files_pattern($1, unconfined_tmp_t, unconfined_tmp_t)
 ')
 
 ########################################
 ## <summary>
-##     Connect to the the unconfined DBUS
-##     for service (acquire_svc).
+##     Write unconfined users temporary files.
 ## </summary>
 ## <param name="domain">
 ##     <summary>
@@ -548,11 +594,10 @@ interface(`unconfined_execmem_alias_program',`
 ##     </summary>
 ## </param>
 #
-interface(`unconfined_dbus_connect',`
+interface(`unconfined_write_tmp_files',`
        gen_require(`
-               type unconfined_t;
-               class dbus acquire_svc;
+               type unconfined_tmp_t;
        ')
 
-       allow $1 unconfined_t:dbus acquire_svc;
+       allow $1 unconfined_tmp_t:file { getattr write append };
 ')
index 1bba62697eb5f5e9eb9fe7c0bd862d39d1e00ef2..3b147b06393fae976eb5a372a3fc7b247eed305b 100644 (file)
@@ -6,192 +6,210 @@ policy_module(unconfined,1.7.0)
 # Declarations
 #
 
-type unconfined_t;
+# usage in this module of types created by these
+# calls is not correct, however we dont currently
+# have another method to add access to these types
+userdom_base_user_template(unconfined)
+userdom_manage_home_template(unconfined)
+userdom_manage_tmp_template(unconfined)
+userdom_manage_tmpfs_template(unconfined)
+
 type unconfined_exec_t;
-init_system_domain(unconfined_t,unconfined_exec_t)
+init_system_domain(unconfined_t, unconfined_exec_t)
 
-ifdef(`targeted_policy',`
-       type unconfined_execmem_t;
-       type unconfined_execmem_exec_t;
-       init_system_domain(unconfined_execmem_t,unconfined_execmem_exec_t)
-')
+type unconfined_execmem_t;
+type unconfined_execmem_exec_t;
+init_system_domain(unconfined_execmem_t, unconfined_execmem_exec_t)
+role unconfined_r types unconfined_execmem_t;
 
 ########################################
 #
 # Local policy
 #
 
-unconfined_domain(unconfined_t)
+domtrans_pattern(unconfined_t, unconfined_execmem_exec_t, unconfined_execmem_t)
+
+files_create_boot_flag(unconfined_t)
+
+mcs_killall(unconfined_t)
+mcs_ptrace_all(unconfined_t)
+
+init_run_daemon(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+
+libs_run_ldconfig(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
 
 logging_send_syslog_msg(unconfined_t)
+logging_run_auditctl(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
 
-ifdef(`targeted_policy',`
-       allow unconfined_t self:system syslog_read;
-       dontaudit unconfined_t self:capability sys_module;
+mount_run_unconfined(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
 
-       domain_auto_trans(unconfined_t,unconfined_execmem_exec_t,unconfined_execmem_t)
+seutil_run_setfiles(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+seutil_run_semanage(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
 
-       files_create_boot_flag(unconfined_t)
+unconfined_domain(unconfined_t)
 
-       mcs_killall(unconfined_t)
-       mcs_ptrace_all(unconfined_t)
+userdom_priveleged_home_dir_manager(unconfined_t)
 
-       init_domtrans_script(unconfined_t)
+optional_policy(`
+       ada_domtrans(unconfined_t)
+')
 
-       libs_domtrans_ldconfig(unconfined_t)
+optional_policy(`
+       apache_run_helper(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+       apache_per_role_template(unconfined, unconfined_t, unconfined_r)
+       # this is disallowed usage:
+       unconfined_domain(httpd_unconfined_script_t)
+')
 
-       logging_domtrans_auditctl(unconfined_t)
+optional_policy(`
+       bind_run_ndc(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       mount_domtrans_unconfined(unconfined_t)
+optional_policy(`
+       bootloader_run(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       seutil_domtrans_setfiles(unconfined_t)
-       seutil_domtrans_semanage(unconfined_t)
+optional_policy(`
+       cron_per_role_template(unconfined, unconfined_t, unconfined_r)
+       # this is disallowed usage:
+       unconfined_domain(unconfined_crond_t)
+')
 
-       userdom_unconfined(unconfined_t)
-       userdom_priveleged_home_dir_manager(unconfined_t)
+optional_policy(`
+       init_dbus_chat_script(unconfined_t)
 
-       optional_policy(`
-               ada_domtrans(unconfined_t)
-       ')
+       dbus_stub(unconfined_t)
 
        optional_policy(`
-               apache_domtrans_helper(unconfined_t)
+               avahi_dbus_chat(unconfined_t)
        ')
 
        optional_policy(`
-               bind_domtrans_ndc(unconfined_t)
+               bluetooth_dbus_chat(unconfined_t)
        ')
 
        optional_policy(`
-               bootloader_domtrans(unconfined_t)
+               consolekit_dbus_chat(unconfined_t)
        ')
 
        optional_policy(`
-               init_dbus_chat_script(unconfined_t)
-
-               dbus_stub(unconfined_t)
-
-               optional_policy(`
-                       avahi_dbus_chat(unconfined_t)
-               ')
-
-               optional_policy(`
-                       bluetooth_dbus_chat(unconfined_t)
-               ')
-
-               optional_policy(`
-                       consolekit_dbus_chat(unconfined_t)
-               ')
-
-               optional_policy(`
-                       cups_dbus_chat_config(unconfined_t)
-               ')
-
-               optional_policy(`
-                       hal_dbus_chat(unconfined_t)
-               ')
-
-               optional_policy(`
-                       networkmanager_dbus_chat(unconfined_t)
-               ')
-
-               optional_policy(`
-                       oddjob_dbus_chat(unconfined_t)
-               ')
+               cups_dbus_chat_config(unconfined_t)
        ')
 
        optional_policy(`
-               firstboot_domtrans(unconfined_t)
+               hal_dbus_chat(unconfined_t)
        ')
 
        optional_policy(`
-               ftp_domtrans_ftpdctl(unconfined_t)
+               networkmanager_dbus_chat(unconfined_t)
        ')
 
        optional_policy(`
-               inn_domtrans(unconfined_t)
+               oddjob_dbus_chat(unconfined_t)
        ')
+')
 
-       optional_policy(`
-               java_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       firstboot_run(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               lpd_domtrans_checkpc(unconfined_t)
-       ')
+optional_policy(`
+       ftp_run_ftpdctl(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               modutils_domtrans_update_mods(unconfined_t)
-       ')
+optional_policy(`
+       inn_domtrans(unconfined_t)
+')
 
-       optional_policy(`
-               mono_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       java_domtrans(unconfined_t)
+')
 
-       optional_policy(`
-               oddjob_domtrans_mkhomedir(unconfined_t)
-       ')
+optional_policy(`
+       lpd_run_checkpc(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               prelink_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       modutils_run_update_mods(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               portmap_domtrans_helper(unconfined_t)
-       ')
+optional_policy(`
+       mono_domtrans(unconfined_t)
+')
 
-       optional_policy(`
-               postfix_domtrans_map(unconfined_t)
-               # cjp: this should probably be removed:
-               postfix_domtrans_master(unconfined_t)
-       ')
+optional_policy(`
+       mta_per_role_template(unconfined, unconfined_t, unconfined_r)
+')
 
-       optional_policy(`
-               # cjp: this should probably be removed:
-               rpc_domtrans_nfsd(unconfined_t)
-       ')
+optional_policy(`
+       oddjob_domtrans_mkhomedir(unconfined_t)
+')
 
-       optional_policy(`
-               rpm_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       prelink_run(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               samba_domtrans_net(unconfined_t)
-               samba_domtrans_winbind_helper(unconfined_t)
-       ')
+optional_policy(`
+       portmap_run_helper(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               sendmail_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       postfix_run_map(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+       # cjp: this should probably be removed:
+       postfix_domtrans_master(unconfined_t)
+')
 
-       optional_policy(`
-               sysnet_domtrans_dhcpc(unconfined_t)
-               sysnet_dbus_chat_dhcpc(unconfined_t)
-       ')
 
-       optional_policy(`
-               tzdata_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       pyzor_per_role_template(unconfined)
+')
 
-       optional_policy(`
-               usermanage_domtrans_admin_passwd(unconfined_t)
-       ')
+optional_policy(`
+       # cjp: this should probably be removed:
+       rpc_domtrans_nfsd(unconfined_t)
+')
 
-       optional_policy(`
-               vpn_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       rpm_run(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               webalizer_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       samba_per_role_template(unconfined)
+       samba_run_net(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+       samba_run_winbind_helper(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
 
-       optional_policy(`
-               wine_domtrans(unconfined_t)
-       ')
+optional_policy(`
+       spamassassin_per_role_template(unconfined, unconfined_t, unconfined_r)
+')
 
-       optional_policy(`
-               xserver_domtrans_xdm_xserver(unconfined_t)
-       ')
+optional_policy(`
+       sysnet_run_dhcpc(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+       sysnet_dbus_chat_dhcpc(unconfined_t)
+')
+
+optional_policy(`
+       tzdata_run(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
+
+optional_policy(`
+       usermanage_run_admin_passwd(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
+
+optional_policy(`
+       vpn_run(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
+
+optional_policy(`
+       webalizer_run(unconfined_t, unconfined_r, { unconfined_devpts_t unconfined_tty_device_t })
+')
+
+optional_policy(`
+       wine_domtrans(unconfined_t)
+')
+
+optional_policy(`
+       xserver_domtrans_xdm_xserver(unconfined_t)
 ')
 
 ########################################
@@ -199,18 +217,16 @@ ifdef(`targeted_policy',`
 # Unconfined Execmem Local policy
 #
 
-ifdef(`targeted_policy',`
-       allow unconfined_execmem_t self:process { execstack execmem };
-       unconfined_domain_noaudit(unconfined_execmem_t)
+allow unconfined_execmem_t self:process { execstack execmem };
+unconfined_domain_noaudit(unconfined_execmem_t)
 
-       optional_policy(`
-               dbus_stub(unconfined_execmem_t)
+optional_policy(`
+       dbus_stub(unconfined_execmem_t)
 
-               init_dbus_chat_script(unconfined_execmem_t)
-               unconfined_dbus_chat(unconfined_execmem_t)
+       init_dbus_chat_script(unconfined_execmem_t)
+       unconfined_dbus_chat(unconfined_execmem_t)
 
-               optional_policy(`
-                       hal_dbus_chat(unconfined_execmem_t)
-               ')
+       optional_policy(`
+               hal_dbus_chat(unconfined_execmem_t)
        ')
 ')
index f01c490fb8dd12b7517a8f1cd611eba091f426f8..ab74d5a384b4ac7a12c9758c60deab5cff2ce3d5 100644 (file)
@@ -1353,11 +1353,7 @@ template(`userdom_security_admin_template',`
 ## <rolecap/>
 #
 template(`userdom_role_change_generic_user',`
-       ifdef(`strict_policy',`
-               userdom_role_change_template($1,user)
-       ',`
-               refpolicywarn(`$0($*) has no effect in targeted policy.')
-       ')
+       userdom_role_change_template($1, user)
 ')
 
 ########################################
@@ -1384,11 +1380,7 @@ template(`userdom_role_change_generic_user',`
 ## <rolecap/>
 #
 template(`userdom_role_change_from_generic_user',`
-       ifdef(`strict_policy',`
-               userdom_role_change_template(user,$1)
-       ',`
-               refpolicywarn(`$0($*) has no effect in targeted policy.')
-       ')
+       userdom_role_change_template(user, $1)
 ')
 
 ########################################
@@ -1414,11 +1406,7 @@ template(`userdom_role_change_from_generic_user',`
 ## <rolecap/>
 #
 template(`userdom_role_change_staff',`
-       ifdef(`strict_policy',`
-               userdom_role_change_template($1,staff)
-       ',`
-               refpolicywarn(`$0($*) has no effect in targeted policy.')
-       ')
+       userdom_role_change_template($1, staff)
 ')
 
 ########################################
@@ -1445,11 +1433,7 @@ template(`userdom_role_change_staff',`
 ## <rolecap/>
 #
 template(`userdom_role_change_from_staff',`
-       ifdef(`strict_policy',`
-               userdom_role_change_template(staff,$1)
-       ',`
-               refpolicywarn(`$0($*) has no effect in targeted policy.')
-       ')
+       userdom_role_change_template(staff, $1)
 ')
 
 ########################################
@@ -1475,11 +1459,7 @@ template(`userdom_role_change_from_staff',`
 ## <rolecap/>
 #
 template(`userdom_role_change_sysadm',`
-       ifdef(`strict_policy',`
-               userdom_role_change_template($1,sysadm)
-       ',`
-               refpolicywarn(`$0($*) has no effect in targeted policy.')
-       ')
+       userdom_role_change_template($1, sysadm)
 ')
 
 ########################################
@@ -1506,11 +1486,7 @@ template(`userdom_role_change_sysadm',`
 ## <rolecap/>
 #
 template(`userdom_role_change_from_sysadm',`
-       ifdef(`strict_policy',`
-               userdom_role_change_template(sysadm,$1)
-       ',`
-               refpolicywarn(`$0($*) has no effect in targeted policy.')
-       ')
+       userdom_role_change_template(sysadm, $1)
 ')
 
 ########################################
@@ -1698,13 +1674,11 @@ template(`userdom_user_home_content',`
 ## </param>
 #
 template(`userdom_setattr_user_ptys',`
-       ifdef(`strict_policy',`
-               gen_require(`
-                       type $1_devpts_t;
-               ')
-
-               allow $2 $1_devpts_t:chr_file setattr;
+       gen_require(`
+               type $1_devpts_t;
        ')
+
+       allow $2 $1_devpts_t:chr_file setattr;
 ')
 
 ########################################
@@ -1733,13 +1707,11 @@ template(`userdom_setattr_user_ptys',`
 ## </param>
 #
 template(`userdom_create_user_pty',`
-       ifdef(`strict_policy',`
-               gen_require(`
-                       type $1_devpts_t;
-               ')
-
-               term_create_pty($2,$1_devpts_t)
+       gen_require(`
+               type $1_devpts_t;
        ')
+
+       term_create_pty($2, $1_devpts_t)
 ')
 
 ########################################
@@ -3622,15 +3594,11 @@ interface(`userdom_read_all_tmp_untrusted_content',`
 ## </param>
 #
 template(`userdom_setattr_user_ttys',`
-       ifdef(`targeted_policy',`
-               term_setattr_unallocated_ttys($2)
-       ',`
-               gen_require(`
-                       type $1_tty_device_t;
-               ')
-
-               allow $2 $1_tty_device_t:chr_file setattr;
+       gen_require(`
+               type $1_tty_device_t;
        ')
+
+       allow $2 $1_tty_device_t:chr_file setattr;
 ')
 
 ########################################
@@ -3659,15 +3627,11 @@ template(`userdom_setattr_user_ttys',`
 ## </param>
 #
 template(`userdom_use_user_ttys',`
-       ifdef(`targeted_policy',`
-               term_use_unallocated_ttys($2)
-       ',`
-               gen_require(`
-                       type $1_tty_device_t;
-               ')
-
-               allow $2 $1_tty_device_t:chr_file rw_term_perms;
+       gen_require(`
+               type $1_tty_device_t;
        ')
+
+       allow $2 $1_tty_device_t:chr_file rw_term_perms;
 ')
 
 ########################################
@@ -3696,18 +3660,13 @@ template(`userdom_use_user_ttys',`
 ## </param>
 #
 template(`userdom_use_user_terminals',`
-       ifdef(`targeted_policy',`
-               term_use_unallocated_ttys($2)
-               term_use_generic_ptys($2)
-       ',`
-               gen_require(`
-                       type $1_tty_device_t, $1_devpts_t;
-               ')
-
-               allow $2 $1_tty_device_t:chr_file rw_term_perms;
-               allow $2 $1_devpts_t:chr_file rw_term_perms;
-               term_list_ptys($2)
+       gen_require(`
+               type $1_tty_device_t, $1_devpts_t;
        ')
+
+       allow $2 $1_tty_device_t:chr_file rw_term_perms;
+       allow $2 $1_devpts_t:chr_file rw_term_perms;
+       term_list_ptys($2)
 ')
 
 ########################################
@@ -3949,19 +3908,14 @@ interface(`userdom_entry_spec_domtrans_unpriv_users',`
 ## </param>
 #
 interface(`userdom_shell_domtrans_sysadm',`
-       ifdef(`targeted_policy',`
-               #cjp: need to doublecheck this one
-               unconfined_shell_domtrans($1)
-       ',`
-               gen_require(`
-                       type sysadm_t;
-               ')
-
-               corecmd_shell_domtrans($1,sysadm_t)
-               allow sysadm_t $1:fd use;
-               allow sysadm_t $1:fifo_file rw_file_perms;
-               allow sysadm_t $1:process sigchld;
+       gen_require(`
+               type sysadm_t;
        ')
+
+       corecmd_shell_domtrans($1, sysadm_t)
+       allow sysadm_t $1:fd use;
+       allow sysadm_t $1:fifo_file rw_file_perms;
+       allow sysadm_t $1:process sigchld;
 ')
 
 ########################################
@@ -4170,16 +4124,12 @@ interface(`userdom_dontaudit_search_staff_home_dirs',`
 ## </param>
 #
 interface(`userdom_manage_staff_home_dirs',`
-       ifdef(`targeted_policy',`
-               userdom_manage_generic_user_home_dirs($1)
-       ',`
-               gen_require(`
-                       type staff_home_dir_t;
-               ')
-
-               files_search_home($1)
-               allow $1 staff_home_dir_t:dir manage_dir_perms;
+       gen_require(`
+               type staff_home_dir_t;
        ')
+
+       files_search_home($1)
+       allow $1 staff_home_dir_t:dir manage_dir_perms;
 ')
 
 ########################################
@@ -4193,16 +4143,12 @@ interface(`userdom_manage_staff_home_dirs',`
 ## </param>
 #
 interface(`userdom_relabelto_staff_home_dirs',`
-       ifdef(`targeted_policy',`
-               userdom_relabelto_generic_user_home_dirs($1)
-       ',`
-               gen_require(`
-                       type staff_home_dir_t;
-               ')
-
-               files_search_home($1)
-               allow $1 staff_home_dir_t:dir relabelto;
+       gen_require(`
+               type staff_home_dir_t;
        ')
+
+       files_search_home($1)
+       allow $1 staff_home_dir_t:dir relabelto;
 ')
 
 ########################################
@@ -4256,15 +4202,11 @@ interface(`userdom_read_staff_home_content_files',`
 ## </param>
 #
 interface(`userdom_sigchld_sysadm',`
-       ifdef(`targeted_policy',`
-               unconfined_sigchld($1)
-       ',`
-               gen_require(`
-                       type sysadm_t;
-               ')
-
-               allow $1 sysadm_t:process sigchld;
+       gen_require(`
+               type sysadm_t;
        ')
+
+       allow $1 sysadm_t:process sigchld;
 ')
 
 ########################################
@@ -4279,15 +4221,11 @@ interface(`userdom_sigchld_sysadm',`
 ## </param>
 #
 interface(`userdom_dontaudit_getattr_sysadm_ttys',`
-       ifdef(`targeted_policy',`
-               term_dontaudit_getattr_unallocated_ttys($1)
-       ',`
-               gen_require(`
-                       type sysadm_tty_device_t;
-               ')
-
-               dontaudit $1 sysadm_tty_device_t:chr_file getattr;
+       gen_require(`
+               type sysadm_tty_device_t;
        ')
+
+       dontaudit $1 sysadm_tty_device_t:chr_file getattr;
 ')
 
 ########################################
@@ -4301,17 +4239,13 @@ interface(`userdom_dontaudit_getattr_sysadm_ttys',`
 ## </param>
 #
 interface(`userdom_use_sysadm_ttys',`
-       ifdef(`targeted_policy',`
-               term_use_unallocated_ttys($1)
-       ',`
-               gen_require(`
-                       type sysadm_tty_device_t;
-               ')
-
-               dev_list_all_dev_nodes($1)
-               term_list_ptys($1)
-               allow $1 sysadm_tty_device_t:chr_file rw_term_perms;
+       gen_require(`
+               type sysadm_tty_device_t;
        ')
+
+       dev_list_all_dev_nodes($1)
+       term_list_ptys($1)
+       allow $1 sysadm_tty_device_t:chr_file rw_term_perms;
 ')
 
 ########################################
@@ -4325,15 +4259,11 @@ interface(`userdom_use_sysadm_ttys',`
 ## </param>
 #
 interface(`userdom_dontaudit_use_sysadm_ttys',`
-       ifdef(`targeted_policy',`
-               term_dontaudit_use_unallocated_ttys($1)
-       ',`
-               gen_require(`
-                       type sysadm_tty_device_t;
-               ')
-
-               dontaudit $1 sysadm_tty_device_t:chr_file { read write };
+       gen_require(`
+               type sysadm_tty_device_t;
        ')
+
+       dontaudit $1 sysadm_tty_device_t:chr_file { read write };
 ')
 
 ########################################
@@ -4347,17 +4277,13 @@ interface(`userdom_dontaudit_use_sysadm_ttys',`
 ## </param>
 #
 interface(`userdom_use_sysadm_ptys',`
-       ifdef(`targeted_policy',`
-               term_use_generic_ptys($1)
-       ',`
-               gen_require(`
-                       type sysadm_devpts_t;
-               ')
-
-               dev_list_all_dev_nodes($1)
-               term_list_ptys($1)
-               allow $1 sysadm_devpts_t:chr_file rw_term_perms;
+       gen_require(`
+               type sysadm_devpts_t;
        ')
+
+       dev_list_all_dev_nodes($1)
+       term_list_ptys($1)
+       allow $1 sysadm_devpts_t:chr_file rw_term_perms;
 ')
 
 ########################################
@@ -4371,15 +4297,11 @@ interface(`userdom_use_sysadm_ptys',`
 ## </param>
 #
 interface(`userdom_dontaudit_use_sysadm_ptys',`
-       ifdef(`targeted_policy',`
-               term_dontaudit_use_generic_ptys($1)
-       ',`
-               gen_require(`
-                       type sysadm_devpts_t;
-               ')
-
-               dontaudit $1 sysadm_devpts_t:chr_file { read write };
+       gen_require(`
+               type sysadm_devpts_t;
        ')
+
+       dontaudit $1 sysadm_devpts_t:chr_file { read write };
 ')
 
 ########################################
@@ -4408,15 +4330,11 @@ interface(`userdom_use_sysadm_terms',`
 ## </param>
 #
 interface(`userdom_dontaudit_use_sysadm_terms',`
-       ifdef(`targeted_policy',`
-               term_dontaudit_use_generic_ptys($1)
-       ',`
-               gen_require(`
-                       attribute admin_terminal;
-               ')
-
-               dontaudit $1 admin_terminal:chr_file { read write };
+       gen_require(`
+               attribute admin_terminal;
        ')
+
+       dontaudit $1 admin_terminal:chr_file { read write };
 ')
 
 ########################################
@@ -4430,15 +4348,11 @@ interface(`userdom_dontaudit_use_sysadm_terms',`
 ## </param>
 #
 interface(`userdom_use_sysadm_fds',`
-       ifdef(`targeted_policy',`
-               unconfined_use_fds($1)
-       ',`
-               gen_require(`
-                       type sysadm_t;
-               ')
-
-               allow $1 sysadm_t:fd use;
+       gen_require(`
+               type sysadm_t;
        ')
+
+       allow $1 sysadm_t:fd use;
 ')
 
 ########################################
@@ -4452,16 +4366,11 @@ interface(`userdom_use_sysadm_fds',`
 ## </param>
 #
 interface(`userdom_rw_sysadm_pipes',`
-       ifdef(`targeted_policy',`
-               #cjp: need to doublecheck this one
-               unconfined_rw_pipes($1)
-       ',`
-               gen_require(`
-                       type sysadm_t;
-               ')
-
-               allow $1 sysadm_t:fifo_file rw_fifo_file_perms;
+       gen_require(`
+               type sysadm_t;
        ')
+
+       allow $1 sysadm_t:fifo_file rw_fifo_file_perms;
 ')
 
 ########################################
@@ -4496,19 +4405,11 @@ interface(`userdom_getattr_sysadm_home_dirs',`
 ## </param>
 #
 interface(`userdom_dontaudit_getattr_sysadm_home_dirs',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type user_home_dir_t;
-               ')
-
-               dontaudit $1 user_home_dir_t:dir getattr;
-       ', `
-               gen_require(`
-                       type sysadm_home_dir_t;
-               ')
-
-               dontaudit $1 sysadm_home_dir_t:dir getattr;
+       gen_require(`
+               type sysadm_home_dir_t;
        ')
+
+       dontaudit $1 sysadm_home_dir_t:dir getattr;
 ')
 
 ########################################
@@ -4541,19 +4442,11 @@ interface(`userdom_search_sysadm_home_dirs',`
 ## </param>
 #
 interface(`userdom_dontaudit_search_sysadm_home_dirs',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type user_home_dir_t;
-               ')
-
-               dontaudit $1 user_home_dir_t:dir search_dir_perms;
-       ',`
-               gen_require(`
-                       type sysadm_home_dir_t;
-               ')
-
-               dontaudit $1 sysadm_home_dir_t:dir search_dir_perms;
+       gen_require(`
+               type sysadm_home_dir_t;
        ')
+
+       dontaudit $1 sysadm_home_dir_t:dir search_dir_perms;
 ')
 
 ########################################
@@ -4605,23 +4498,13 @@ interface(`userdom_dontaudit_list_sysadm_home_dirs',`
 ## </param>
 #
 interface(`userdom_dontaudit_read_sysadm_home_content_files',`
-       ifdef(`targeted_policy',`
-               gen_require(`
-                       type user_home_dir_t, user_home_t;
-               ')
-
-               dontaudit $1 user_home_dir_t:dir search_dir_perms;
-               dontaudit $1 user_home_t:dir search_dir_perms;
-               dontaudit $1 user_home_t:file r_file_perms;
-       ',`
-               gen_require(`
-                       type sysadm_home_dir_t, sysadm_home_t;
-               ')
-
-               dontaudit $1 sysadm_home_dir_t:dir search_dir_perms;
-               dontaudit $1 sysadm_home_t:dir search_dir_perms;
-               dontaudit $1 sysadm_home_t:file r_file_perms;
+       gen_require(`
+               type sysadm_home_dir_t, sysadm_home_t;
        ')
+
+       dontaudit $1 sysadm_home_dir_t:dir search_dir_perms;
+       dontaudit $1 sysadm_home_t:dir search_dir_perms;
+       dontaudit $1 sysadm_home_t:file read_file_perms;
 ')
 
 ########################################
@@ -4683,23 +4566,19 @@ interface(`userdom_search_sysadm_home_content_dirs',`
 ## </param>
 #
 interface(`userdom_read_sysadm_home_content_files',`
-       ifdef(`strict_policy',`
-               gen_require(`
-                       type sysadm_home_dir_t, sysadm_home_t;
-               ')
-
-               files_search_home($1)
-               allow $1 { sysadm_home_dir_t sysadm_home_t }:dir list_dir_perms;
-               read_files_pattern($1,{ sysadm_home_dir_t sysadm_home_t },sysadm_home_t)
-               read_lnk_files_pattern($1,{ sysadm_home_dir_t sysadm_home_t },sysadm_home_t)
-       ',`
-               userdom_read_generic_user_home_content_files($1)
+       gen_require(`
+               type sysadm_home_dir_t, sysadm_home_t;
        ')
+
+       files_search_home($1)
+       allow $1 { sysadm_home_dir_t sysadm_home_t }:dir list_dir_perms;
+       read_files_pattern($1, { sysadm_home_dir_t sysadm_home_t }, sysadm_home_t)
+       read_lnk_files_pattern($1, { sysadm_home_dir_t sysadm_home_t }, sysadm_home_t)
 ')
 
 ########################################
 ## <summary>
-##     Read files in the sysadm users home directory.
+##     Read sysadm temporary files.
 ## </summary>
 ## <param name="domain">
 ##     <summary>
@@ -4708,18 +4587,14 @@ interface(`userdom_read_sysadm_home_content_files',`
 ## </param>
 #
 interface(`userdom_read_sysadm_tmp_files',`
-       ifdef(`strict_policy',`
-               gen_require(`
-                       type sysadm_tmp_t;
-               ')
-
-               files_search_tmp($1)
-               allow $1 sysadm_tmp_t:dir list_dir_perms;
-               read_files_pattern($1,sysadm_tmp_t,sysadm_tmp_t)
-               read_lnk_files_pattern($1,sysadm_tmp_t,sysadm_tmp_t)
-       ',`
-               files_read_generic_tmp_files($1)
+       gen_require(`
+               type sysadm_tmp_t;
        ')
+
+       files_search_tmp($1)
+       allow $1 sysadm_tmp_t:dir list_dir_perms;
+       read_files_pattern($1, sysadm_tmp_t, sysadm_tmp_t)
+       read_lnk_files_pattern($1, sysadm_tmp_t, sysadm_tmp_t)
 ')
 
 ########################################
@@ -5351,16 +5226,12 @@ interface(`userdom_setattr_unpriv_users_ptys',`
 ## </param>
 #
 interface(`userdom_use_unpriv_users_ptys',`
-       ifdef(`targeted_policy',`
-               term_use_generic_ptys($1)
-       ',`
-               gen_require(`
-                       attribute user_ptynode;
-               ')
-
-               term_search_ptys($1)
-               allow $1 user_ptynode:chr_file rw_file_perms;
+       gen_require(`
+               attribute user_ptynode;
        ')
+
+       term_search_ptys($1)
+       allow $1 user_ptynode:chr_file rw_file_perms;
 ')
 
 ########################################
@@ -5375,15 +5246,11 @@ interface(`userdom_use_unpriv_users_ptys',`
 ## </param>
 #
 interface(`userdom_dontaudit_use_unpriv_users_ptys',`
-       ifdef(`targeted_policy',`
-               term_dontaudit_use_generic_ptys($1)
-       ',`
-               gen_require(`
-                       attribute user_ptynode;
-               ')
-
-               dontaudit $1 user_ptynode:chr_file rw_file_perms;
+       gen_require(`
+               attribute user_ptynode;
        ')
+
+       dontaudit $1 user_ptynode:chr_file rw_file_perms;
 ')
 
 ########################################
@@ -5434,15 +5301,11 @@ interface(`userdom_dontaudit_relabelfrom_unpriv_users_ptys',`
 ## </param>
 #
 interface(`userdom_list_unpriv_users_tmp',`
-       ifdef(`targeted_policy',`
-               files_list_tmp($1)
-       ',`
-               gen_require(`
-                       attribute user_tmpfile;
-               ')
-
-               allow $1 user_tmpfile:dir list_dir_perms;
+       gen_require(`
+               attribute user_tmpfile;
        ')
+
+       allow $1 user_tmpfile:dir list_dir_perms;
 ')
 
 ########################################
@@ -5456,15 +5319,11 @@ interface(`userdom_list_unpriv_users_tmp',`
 ## </param>
 #
 interface(`userdom_read_unpriv_users_tmp_files',`
-       ifdef(`targeted_policy',`
-               files_read_generic_tmp_files($1)
-       ',`
-               gen_require(`
-                       attribute user_tmpfile;
-               ')
-
-               allow $1 user_tmpfile:file { read getattr };
+       gen_require(`
+               attribute user_tmpfile;
        ')
+
+       allow $1 user_tmpfile:file { read getattr };
 ')
 
 ########################################
@@ -5478,15 +5337,11 @@ interface(`userdom_read_unpriv_users_tmp_files',`
 ## </param>
 #
 interface(`userdom_read_unpriv_users_tmp_symlinks',`
-       ifdef(`targeted_policy',`
-               files_read_generic_tmp_symlinks($1)
-       ',`
-               gen_require(`
-                       attribute user_tmpfile;
-               ')
-
-               allow $1 user_tmpfile:lnk_file { getattr read };
+       gen_require(`
+               attribute user_tmpfile;
        ')
+
+       allow $1 user_tmpfile:lnk_file { getattr read };
 ')
 
 ########################################
@@ -5518,15 +5373,11 @@ interface(`userdom_write_unpriv_users_tmp_files',`
 ## </param>
 #
 interface(`userdom_use_unpriv_users_ttys',`
-       ifdef(`targeted_policy',`
-               term_use_unallocated_ttys($1)
-       ',`
-               gen_require(`
-                       attribute user_ttynode;
-               ')
-
-               allow $1 user_ttynode:chr_file rw_term_perms;
+       gen_require(`
+               attribute user_ttynode;
        ')
+
+       allow $1 user_ttynode:chr_file rw_term_perms;
 ')
 
 ########################################
@@ -5541,15 +5392,11 @@ interface(`userdom_use_unpriv_users_ttys',`
 ## </param>
 #
 interface(`userdom_dontaudit_use_unpriv_users_ttys',`
-       ifdef(`targeted_policy',`
-               term_dontaudit_use_unallocated_ttys($1)
-       ',`
-               gen_require(`
-                       attribute user_ttynode;
-               ')
-
-               dontaudit $1 user_ttynode:chr_file rw_file_perms;
+       gen_require(`
+               attribute user_ttynode;
        ')
+
+       dontaudit $1 user_ttynode:chr_file rw_file_perms;
 ')
 
 ########################################
@@ -5673,15 +5520,11 @@ interface(`userdom_sigchld_all_users',`
 ## </param>
 #
 interface(`userdom_create_all_users_keys',`
-       ifdef(`strict_policy',`
-               gen_require(`
-                       attribute userdomain;
-               ')
-
-               allow $1 userdomain:key create;
-       ',`
-               unconfined_create_keys($1)
+       gen_require(`
+               attribute userdomain;
        ')
+
+       allow $1 userdomain:key create;
 ')
 
 ########################################
@@ -5705,7 +5548,7 @@ interface(`userdom_dbus_send_all_users',`
 
 ########################################
 ## <summary>
-##     Unconfined access to user domains.
+##     Unconfined access to user domains.  (Deprecated)
 ## </summary>
 ## <param name="domain">
 ##     <summary>
@@ -5714,10 +5557,5 @@ interface(`userdom_dbus_send_all_users',`
 ## </param>
 #
 interface(`userdom_unconfined',`
-       gen_require(`
-               type user_home_dir_t;
-       ')
-
-       allow $1 user_home_dir_t:dir manage_dir_perms;
-       files_home_filetrans($1,user_home_dir_t,dir)
+       refpolicywarn(`$0($*) has been deprecated.')
 ')
index eb915d1253d8f7618bd0ce1438a9b2ba990ea26d..80c230040e201a1af97cb79a3683bac1632c0aea 100644 (file)
@@ -15,7 +15,6 @@ gen_require(`
 # Declarations
 #
 
-ifdef(`strict_policy',`
 ## <desc>
 ## <p>
 ## Allow sysadm to ptrace all processes
@@ -65,7 +64,6 @@ gen_tunable(user_rw_noexattrfile,false)
 ## </p>
 ## </desc>
 gen_tunable(user_ttyfile_stat,false)
-')
 
 # admin users terminals (tty and pty)
 attribute admin_terminal;
@@ -108,451 +106,391 @@ attribute untrusted_content_tmp_type;
 # Local policy
 #
 
-ifdef(`strict_policy',`
-       userdom_admin_user_template(sysadm)
-       userdom_unpriv_user_template(staff)
-       userdom_unpriv_user_template(user)
+userdom_admin_user_template(sysadm)
+userdom_unpriv_user_template(staff)
+userdom_unpriv_user_template(user)
 
-       # user role change rules:
-       # sysadm_r can change to user roles
-       userdom_role_change_template(sysadm, user)
-       userdom_role_change_template(sysadm, staff)
+# user role change rules:
+# sysadm_r can change to user roles
+userdom_role_change_template(sysadm, user)
+userdom_role_change_template(sysadm, staff)
 
-       # only staff_r can change to sysadm_r
-       userdom_role_change_template(staff, sysadm)
-       dontaudit staff_t admin_terminal:chr_file { read write };
+# only staff_r can change to sysadm_r
+userdom_role_change_template(staff, sysadm)
+dontaudit staff_t admin_terminal:chr_file { read write };
 
-       ifdef(`enable_mls',`
-               userdom_unpriv_user_template(secadm)
-               userdom_unpriv_user_template(auditadm)
+ifdef(`enable_mls',`
+       userdom_unpriv_user_template(secadm)
+       userdom_unpriv_user_template(auditadm)
 
-               userdom_role_change_template(staff,auditadm)
-               userdom_role_change_template(staff,secadm)
+       userdom_role_change_template(staff, auditadm)
+       userdom_role_change_template(staff, secadm)
 
-               userdom_role_change_template(sysadm,secadm)
-               userdom_role_change_template(sysadm,auditadm)
+       userdom_role_change_template(sysadm, secadm)
+       userdom_role_change_template(sysadm, auditadm)
 
-               userdom_role_change_template(auditadm,secadm)
-               userdom_role_change_template(auditadm,sysadm)
+       userdom_role_change_template(auditadm, secadm)
+       userdom_role_change_template(auditadm, sysadm)
 
-               userdom_role_change_template(secadm,auditadm)
-               userdom_role_change_template(secadm,sysadm)
-       ')
+       userdom_role_change_template(secadm, auditadm)
+       userdom_role_change_template(secadm, sysadm)
+')
 
-       # this should be tunable_policy, but
-       # currently type_change and RBAC allow
-       # do not work in conditionals
-       ifdef(`user_canbe_sysadm',`
-               userdom_role_change_template(user,sysadm)
-       ')
+# this should be tunable_policy, but
+# currently type_change and RBAC allow
+# do not work in conditionals
+ifdef(`user_canbe_sysadm',`
+       userdom_role_change_template(user, sysadm)
+')
 
-       ########################################
-       #
-       # Sysadm local policy
-       #
+########################################
+#
+# Sysadm local policy
+#
 
-       # for su
-       allow sysadm_t userdomain:fd use;
+# for su
+allow sysadm_t userdomain:fd use;
 
-       # Add/remove user home directories
-       allow sysadm_t user_home_dir_t:dir manage_dir_perms;
-       files_home_filetrans(sysadm_t,user_home_dir_t,dir)
+# Add/remove user home directories
+allow sysadm_t user_home_dir_t:dir manage_dir_perms;
+files_home_filetrans(sysadm_t, user_home_dir_t, dir)
 
-       corecmd_exec_shell(sysadm_t)
+corecmd_exec_shell(sysadm_t)
 
-       mls_process_read_up(sysadm_t)
+mls_process_read_up(sysadm_t)
 
-       init_exec(sysadm_t)
+init_exec(sysadm_t)
 
-       # Following for sending reboot and wall messages
-       userdom_use_unpriv_users_ptys(sysadm_t)
-       userdom_use_unpriv_users_ttys(sysadm_t)
+# Following for sending reboot and wall messages
+userdom_use_unpriv_users_ptys(sysadm_t)
+userdom_use_unpriv_users_ttys(sysadm_t)
 
-       ifdef(`direct_sysadm_daemon',`
-               optional_policy(`
-                       init_run_daemon(sysadm_t,sysadm_r,admin_terminal)
-               ')
-       ',`
-               ifdef(`distro_gentoo',`
-                       optional_policy(`
-                               seutil_init_script_run_runinit(sysadm_t,sysadm_r,admin_terminal)
-                       ')
-               ')
+ifdef(`direct_sysadm_daemon',`
+       optional_policy(`
+               init_run_daemon(sysadm_t, sysadm_r, admin_terminal)
        ')
-
-       ifdef(`enable_mls',`
-               allow auditadm_t self:capability { dac_read_search dac_override };
-               seutil_run_runinit(auditadm_t, auditadm_r, { auditadm_tty_device_t auditadm_devpts_t })
-               domain_kill_all_domains(auditadm_t)
-               seutil_read_bin_policy(auditadm_t)
-               corecmd_exec_shell(auditadm_t)
-               logging_send_syslog_msg(auditadm_t)
-               logging_read_generic_logs(auditadm_t)
-               logging_manage_audit_log(auditadm_t)
-               logging_manage_audit_config(auditadm_t)
-               logging_run_auditctl(auditadm_t,auditadm_r,{ auditadm_tty_device_t auditadm_devpts_t })
-               logging_run_auditd(auditadm_t, auditadm_r, { auditadm_tty_device_t auditadm_devpts_t })
-               userdom_dontaudit_read_sysadm_home_content_files(auditadm_t)
-
-               allow secadm_t self:capability { dac_read_search dac_override };
-               corecmd_exec_shell(secadm_t)
-               domain_obj_id_change_exemption(secadm_t)
-               mls_process_read_up(secadm_t)
-               mls_file_read_all_levels(secadm_t)
-               mls_file_write_all_levels(secadm_t)
-               mls_file_upgrade(secadm_t)
-               mls_file_downgrade(secadm_t)
-               auth_relabel_all_files_except_shadow(secadm_t)
-               dev_relabel_all_dev_nodes(secadm_t)
-               auth_relabel_shadow(secadm_t)
-               init_exec(secadm_t)
-               logging_read_audit_log(secadm_t)
-               logging_read_generic_logs(secadm_t)
-               logging_read_audit_config(secadm_t)
-               userdom_dontaudit_append_staff_home_content_files(secadm_t)
-               userdom_dontaudit_read_sysadm_home_content_files(secadm_t)
-
+',`
+       ifdef(`distro_gentoo',`
                optional_policy(`
-                       aide_run(secadm_t,secadm_r, { secadm_tty_device_t secadm_devpts_t })
+                       seutil_init_script_run_runinit(sysadm_t, sysadm_r, admin_terminal)
                ')
-
-               optional_policy(`
-                       netlabel_run_mgmt(secadm_t,secadm_r, { secadm_tty_device_t secadm_devpts_t })
-               ')
-       ',`
-               logging_manage_audit_log(sysadm_t)
-               logging_manage_audit_config(sysadm_t)
-               logging_run_auditctl(sysadm_t,sysadm_r,admin_terminal)
-       ')
-
-       tunable_policy(`allow_ptrace',`
-               domain_ptrace_all_domains(sysadm_t)
-       ')
-
-       optional_policy(`
-               amanda_run_recover(sysadm_t,sysadm_r,admin_terminal)
-       ')
-
-       optional_policy(`
-               apache_run_helper(sysadm_t,sysadm_r,admin_terminal)
-               #apache_run_all_scripts(sysadm_t,sysadm_r)
-               #apache_domtrans_sys_script(sysadm_t)
        ')
+')
 
-       optional_policy(`
-               tzdata_domtrans(sysadm_t)
-       ')
+ifdef(`enable_mls',`
+       allow auditadm_t self:capability { dac_read_search dac_override };
+       seutil_run_runinit(auditadm_t, auditadm_r, { auditadm_tty_device_t auditadm_devpts_t })
+       domain_kill_all_domains(auditadm_t)
+        seutil_read_bin_policy(auditadm_t)
+       corecmd_exec_shell(auditadm_t)
+       logging_send_syslog_msg(auditadm_t)
+        logging_read_generic_logs(auditadm_t)
+       logging_manage_audit_log(auditadm_t)
+       logging_manage_audit_config(auditadm_t)
+       logging_run_auditctl(auditadm_t, auditadm_r, { auditadm_tty_device_t auditadm_devpts_t })
+       logging_run_auditd(auditadm_t, auditadm_r, { auditadm_tty_device_t auditadm_devpts_t })
+       userdom_dontaudit_read_sysadm_home_content_files(auditadm_t)
+
+       allow secadm_t self:capability { dac_read_search dac_override };
+       corecmd_exec_shell(secadm_t)
+       domain_obj_id_change_exemption(secadm_t)
+       mls_process_read_up(secadm_t)
+       mls_file_read_all_levels(secadm_t)
+       mls_file_write_all_levels(secadm_t)
+       mls_file_upgrade(secadm_t)
+       mls_file_downgrade(secadm_t)
+        auth_relabel_all_files_except_shadow(secadm_t)
+       dev_relabel_all_dev_nodes(secadm_t)
+       auth_relabel_shadow(secadm_t)
+       init_exec(secadm_t)
+       logging_read_audit_log(secadm_t)
+        logging_read_generic_logs(secadm_t)
+       logging_read_audit_config(secadm_t)
+       userdom_dontaudit_append_staff_home_content_files(secadm_t)
+       userdom_dontaudit_read_sysadm_home_content_files(secadm_t)
+
+       optional_policy(`
+               aide_run(secadm_t, secadm_r, { secadm_tty_device_t secadm_devpts_t })
+       ')
+
+       optional_policy(`
+               netlabel_run_mgmt(secadm_t, secadm_r, { secadm_tty_device_t secadm_devpts_t })
+       ')
+',`
+       logging_manage_audit_log(sysadm_t)
+       logging_manage_audit_config(sysadm_t)
+       logging_run_auditctl(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               raid_domtrans_mdadm(sysadm_t)
-       ')
+tunable_policy(`allow_ptrace',`
+       domain_ptrace_all_domains(sysadm_t)
+')
 
-       optional_policy(`
-               # cjp: why is this not apm_run_client
-               apm_domtrans_client(sysadm_t)
-       ')
+optional_policy(`
+       amanda_run_recover(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               apt_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       apache_run_helper(sysadm_t, sysadm_r, admin_terminal)
+       #apache_run_all_scripts(sysadm_t, sysadm_r)
+       #apache_domtrans_sys_script(sysadm_t)
+')
 
-       optional_policy(`
-               backup_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       tzdata_domtrans(sysadm_t)
+')
 
-       optional_policy(`
-               bootloader_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       raid_domtrans_mdadm(sysadm_t)
+')
 
-       optional_policy(`
-               bind_run_ndc(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       # cjp: why is this not apm_run_client
+       apm_domtrans_client(sysadm_t)
+')
 
-       optional_policy(`
-               bluetooth_run_helper(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       apt_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               consoletype_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       backup_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               clock_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       bootloader_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               clockspeed_run_cli(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       bind_run_ndc(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               certwatch_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       certwatch_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               cvs_exec(sysadm_t)
-       ')
+optional_policy(`
+       consoletype_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               consoletype_exec(sysadm_t)
+optional_policy(`
+       clock_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-               ifdef(`enable_mls',`
-                       consoletype_exec(auditadm_t)
-               ')
-       ')
+optional_policy(`
+       clockspeed_run_cli(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               cron_admin_template(sysadm,sysadm_t,sysadm_r)
-       ')
+optional_policy(`
+       cvs_exec(sysadm_t)
+')
 
-       optional_policy(`
-               dcc_run_cdcc(sysadm_t,sysadm_r,admin_terminal)
-               dcc_run_client(sysadm_t,sysadm_r,admin_terminal)
-               dcc_run_dbclean(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       consoletype_exec(sysadm_t)
 
-       optional_policy(`
-               ddcprobe_run(sysadm_t,sysadm_r,admin_terminal)
+       ifdef(`enable_mls',`
+               consoletype_exec(auditadm_t)
        ')
+')
 
-       optional_policy(`
-               dmesg_exec(sysadm_t)
+optional_policy(`
+       cron_admin_template(sysadm, sysadm_t, sysadm_r)
+')
 
-               ifdef(`enable_mls',`
-                       dmesg_exec(auditadm_t)
-               ')
-       ')
+optional_policy(`
+       dcc_run_cdcc(sysadm_t, sysadm_r, admin_terminal)
+       dcc_run_client(sysadm_t, sysadm_r, admin_terminal)
+       dcc_run_dbclean(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               dmidecode_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       ddcprobe_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               dpkg_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       dmesg_exec(sysadm_t)
 
-       optional_policy(`
-               ethereal_run_tethereal(sysadm_t,sysadm_r,admin_terminal)
-               ethereal_admin_template(sysadm,sysadm_t,sysadm_r)
+       ifdef(`enable_mls',`
+               dmesg_exec(auditadm_t)
        ')
+')
 
-       optional_policy(`
-               firstboot_run(sysadm_t,sysadm_r,sysadm_tty_device_t)
-       ')
+optional_policy(`
+       dmidecode_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               fstools_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       dpkg_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               hostname_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       ethereal_run_tethereal(sysadm_t, sysadm_r, admin_terminal)
+       ethereal_admin_template(sysadm, sysadm_t, sysadm_r)
+')
 
-       optional_policy(`
-               # allow system administrator to use the ipsec script to look
-               # at things (e.g., ipsec auto --status)
-               # probably should create an ipsec_admin role for this kind of thing
-               ipsec_exec_mgmt(sysadm_t)
-               ipsec_stream_connect(sysadm_t)
-               # for lsof
-               ipsec_getattr_key_sockets(sysadm_t)
-       ')
+optional_policy(`
+       firstboot_run(sysadm_t, sysadm_r, sysadm_tty_device_t)
+')
 
-       optional_policy(`
-               iptables_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       fstools_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               libs_run_ldconfig(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       hostname_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               lvm_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       # allow system administrator to use the ipsec script to look
+       # at things (e.g., ipsec auto --status)
+       # probably should create an ipsec_admin role for this kind of thing
+       ipsec_exec_mgmt(sysadm_t)
+       ipsec_stream_connect(sysadm_t)
+       # for lsof
+       ipsec_getattr_key_sockets(sysadm_t)
+')
 
-       optional_policy(`
-               logrotate_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       iptables_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               lpd_run_checkpc(sysadm_t,sysadm_r,admin_terminal)
-               lpr_admin_template(sysadm,sysadm_t,sysadm_r)
-       ')
+optional_policy(`
+       libs_run_ldconfig(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               kudzu_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       lvm_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               modutils_run_depmod(sysadm_t,sysadm_r,admin_terminal)
-               modutils_run_insmod(sysadm_t,sysadm_r,admin_terminal)
-               modutils_run_update_mods(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       logrotate_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               mount_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       lpd_run_checkpc(sysadm_t, sysadm_r, admin_terminal)
+       lpr_admin_template(sysadm, sysadm_t, sysadm_r)
+')
 
-       optional_policy(`
-               mta_admin_template(sysadm,sysadm_t,sysadm_r)
-       ')
+optional_policy(`
+       kudzu_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               mysql_stream_connect(sysadm_t)
-       ')
+optional_policy(`
+       modutils_run_depmod(sysadm_t, sysadm_r, admin_terminal)
+       modutils_run_insmod(sysadm_t, sysadm_r, admin_terminal)
+       modutils_run_update_mods(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               netutils_run(sysadm_t,sysadm_r,admin_terminal)
-               netutils_run_ping(sysadm_t,sysadm_r,admin_terminal)
-               netutils_run_traceroute(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       mount_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               rpc_domtrans_nfsd(sysadm_t)
-       ')
+optional_policy(`
+       mta_admin_template(sysadm, sysadm_t, sysadm_r)
+')
 
-       optional_policy(`
-               munin_stream_connect(sysadm_t)
-       ')
+optional_policy(`
+       mysql_stream_connect(sysadm_t)
+')
 
-       optional_policy(`
-               ntp_stub()
-               corenet_udp_bind_ntp_port(sysadm_t)
-       ')
+optional_policy(`
+       netutils_run(sysadm_t, sysadm_r, admin_terminal)
+       netutils_run_ping(sysadm_t, sysadm_r, admin_terminal)
+       netutils_run_traceroute(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               oav_run_update(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       rpc_domtrans_nfsd(sysadm_t)
+')
 
-       optional_policy(`
-               pcmcia_run_cardctl(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       munin_stream_connect(sysadm_t)
+')
 
-       optional_policy(`
-               portage_run(sysadm_t,sysadm_r,admin_terminal)
-               portage_run_gcc_config(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       ntp_stub()
+       corenet_udp_bind_ntp_port(sysadm_t)
+')
 
-       optional_policy(`
-               portmap_run_helper(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       oav_run_update(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               quota_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       pcmcia_run_cardctl(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               rpm_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       portage_run(sysadm_t, sysadm_r, admin_terminal)
+       portage_run_gcc_config(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               rsync_exec(sysadm_t)
-       ')
+optional_policy(`
+       portmap_run_helper(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               samba_run_net(sysadm_t,sysadm_r,admin_terminal)
-               samba_run_winbind_helper(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       quota_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               seutil_run_setfiles(sysadm_t,sysadm_r,admin_terminal)
-               seutil_run_runinit(sysadm_t,sysadm_r,admin_terminal)
+optional_policy(`
+       rpm_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-               ifdef(`enable_mls',`
-                       userdom_security_admin_template(secadm_t,secadm_r,{ secadm_tty_device_t sysadm_devpts_t })
-               ', `
-                       userdom_security_admin_template(sysadm_t,sysadm_r,admin_terminal)
-               ')
-       ')
+optional_policy(`
+       rsync_exec(sysadm_t)
+')
 
-       optional_policy(`
-               sysnet_run_ifconfig(sysadm_t,sysadm_r,admin_terminal)
-               sysnet_run_dhcpc(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       samba_run_net(sysadm_t, sysadm_r, admin_terminal)
+       samba_run_winbind_helper(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               tripwire_run_siggen(sysadm_t,sysadm_r,admin_terminal)
-               tripwire_run_tripwire(sysadm_t,sysadm_r,admin_terminal)
-               tripwire_run_twadmin(sysadm_t,sysadm_r,admin_terminal)
-               tripwire_run_twprint(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       seutil_run_setfiles(sysadm_t, sysadm_r, admin_terminal)
+       seutil_run_runinit(sysadm_t, sysadm_r, admin_terminal)
 
-       optional_policy(`
-               unconfined_domtrans(sysadm_t,sysadm_r,admin_terminal)
+       ifdef(`enable_mls',`
+               userdom_security_admin_template(secadm_t, secadm_r, { secadm_tty_device_t sysadm_devpts_t })
+       ', `
+               userdom_security_admin_template(sysadm_t, sysadm_r, admin_terminal)
        ')
+')
 
-       optional_policy(`
-               usbmodules_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       sysnet_run_ifconfig(sysadm_t, sysadm_r, admin_terminal)
+       sysnet_run_dhcpc(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               usermanage_run_admin_passwd(sysadm_t,sysadm_r,admin_terminal)
-               usermanage_run_groupadd(sysadm_t,sysadm_r,admin_terminal)
-               usermanage_run_useradd(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       tripwire_run_siggen(sysadm_t, sysadm_r, admin_terminal)
+       tripwire_run_tripwire(sysadm_t, sysadm_r, admin_terminal)
+       tripwire_run_twadmin(sysadm_t, sysadm_r, admin_terminal)
+       tripwire_run_twprint(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               vpn_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       unconfined_domtrans(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               webalizer_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       usbmodules_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               yam_run(sysadm_t,sysadm_r,admin_terminal)
-       ')
+optional_policy(`
+       usermanage_run_admin_passwd(sysadm_t, sysadm_r, admin_terminal)
+       usermanage_run_groupadd(sysadm_t, sysadm_r, admin_terminal)
+       usermanage_run_useradd(sysadm_t, sysadm_r, admin_terminal)
 ')
 
-ifdef(`targeted_policy',`
-       # Define some type aliases to help with compatibility with
-       # strict policy.
-       unconfined_alias_domain(secadm_t)
-       unconfined_alias_domain(auditadm_t)
-       unconfined_alias_domain(sysadm_t)
-
-       # User home directory type.
-       type user_home_t alias { staff_home_t sysadm_home_t }, home_type, user_home_type;
-       files_type(user_home_t)
-       files_associate_tmp(user_home_t)
-       fs_associate_tmpfs(user_home_t)
-
-       type user_home_dir_t alias { staff_home_dir_t sysadm_home_dir_t }, home_dir_type, home_type, user_home_dir_type;
-       files_type(user_home_dir_t)
-       files_associate_tmp(user_home_dir_t)
-       fs_associate_tmpfs(user_home_dir_t)
-
-       # compatibility for switching from strict
-#      dominance { role secadm_r { role system_r; }}
-#      dominance { role auditadm_r { role system_r; }}
-#      dominance { role sysadm_r { role system_r; }}
-#      dominance { role user_r { role system_r; }}
-#      dominance { role staff_r { role system_r; }}
-
-       # dont need to use the full role_change()
-       allow sysadm_r system_r;
-       allow sysadm_r user_r;
-       allow user_r system_r;
-       allow user_r sysadm_r;
-       allow system_r sysadm_r;
-       allow system_r sysadm_r;
-
-       manage_dirs_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
-       manage_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
-       manage_lnk_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
-       manage_sock_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
-       manage_fifo_files_pattern(privhome,{ user_home_dir_t user_home_t },user_home_t)
-       filetrans_pattern(privhome,user_home_dir_t,user_home_t,{ dir file lnk_file sock_file fifo_file })
-       files_search_home(privhome)
+optional_policy(`
+       vpn_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       ifdef(`enable_mls',`
-               allow secadm_r system_r;
-               allow auditadm_r system_r;
-               allow secadm_r user_r;
-               allow staff_r secadm_r;
-               allow staff_r auditadm_r;
-       ')
+optional_policy(`
+       webalizer_run(sysadm_t, sysadm_r, admin_terminal)
+')
 
-       optional_policy(`
-               samba_per_role_template(user)
-       ')
+optional_policy(`
+       yam_run(sysadm_t, sysadm_r, admin_terminal)
 ')
index 031b7cf39681d06cf44a51d6c6513c2c452d872b..cbe65025557c139fdfd11f80ed78e8be33a8faa6 100644 (file)
@@ -217,15 +217,6 @@ optional_policy(`
        consoletype_exec(xend_t)
 ')
 
-ifdef(`targeted_policy',`
-       term_dontaudit_use_unallocated_ttys(xend_t)
-       term_dontaudit_use_generic_ptys(xend_t)
-
-       optional_policy(`
-               unconfined_rw_pipes(xend_t)
-       ')
-')
-
 ########################################
 #
 # Xen console local policy
index 3e8d368849da33768d76a89aec4db606feead3a2..729ed88cb3303c34daa39fb080d96ae32bb6c0de 100644 (file)
@@ -8,13 +8,11 @@
 # syntax: role prefix user_domain
 #
 
-ifdef(`strict_policy',`
-       user_r user user_t
-       staff_r staff staff_t
-       sysadm_r sysadm sysadm_t
+user_r user user_t
+staff_r staff staff_t
+sysadm_r sysadm sysadm_t
 
-       ifdef(`enable_mls',`
-               secadm_r secadm secadm_t
-               auditadm_r auditadm auditadm_t
-       ')
+ifdef(`enable_mls',`
+       secadm_r secadm secadm_t
+       auditadm_r auditadm auditadm_t
 ')
index e2053ab3a0d0fa08676143a95b641e7817ca49f5..f82b604d15537ae5a56e0c198d515d297e4c5d2f 100644 (file)
@@ -25,13 +25,12 @@ gen_user(system_u,, system_r, s0, s0 - mls_systemhigh, mcs_allcats)
 # SELinux user identity for a Linux user.  If you do not want to
 # permit any access to such users, then remove this entry.
 #
-ifdef(`targeted_policy',`
-gen_user(user_u, user, user_r sysadm_r system_r, s0, s0 - mls_systemhigh, mcs_allcats)
-',`
 gen_user(user_u, user, user_r, s0, s0)
 gen_user(staff_u, staff, staff_r sysadm_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats)
 gen_user(sysadm_u, sysadm, sysadm_r, s0, s0 - mls_systemhigh, mcs_allcats)
-')
+
+# Until order dependence is fixed for users:
+gen_user(unconfined_u, unconfined, unconfined_r, s0, s0 - mls_systemhigh, mcs_allcats)
 
 #
 # The following users correspond to Unix identities.
@@ -40,12 +39,8 @@ gen_user(sysadm_u, sysadm, sysadm_r, s0, s0 - mls_systemhigh, mcs_allcats)
 # role should use the staff_r role instead of the user_r role when
 # not in the sysadm_r.
 #
-ifdef(`targeted_policy',`
-       gen_user(root, user, user_r sysadm_r system_r, s0, s0 - mls_systemhigh, mcs_allcats)
+ifdef(`direct_sysadm_daemon',`
+       gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r') system_r, s0, s0 - mls_systemhigh, mcs_allcats)
 ',`
-       ifdef(`direct_sysadm_daemon',`
-               gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r') system_r, s0, s0 - mls_systemhigh, mcs_allcats)
-       ',`
-               gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats)
-       ')
+       gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats)
 ')
index 34fd708b885b1d9a8067aefefd7969f2225aa7b6..a944df0070047a74b7dc76fb0393d718a8c0c382 100644 (file)
@@ -24,7 +24,7 @@ SEMOD_PKG := $(BINDIR)/semodule_package
 XMLLINT := $(BINDIR)/xmllint
 
 # set default build options if missing
-TYPE ?= strict
+TYPE ?= standard
 DIRECT_INITRC ?= n
 POLY ?= n
 QUIET ?= y
@@ -39,25 +39,15 @@ metaxml := metadata.xml
 globaltun = $(HEADERDIR)/global_tunables.xml
 globalbool = $(HEADERDIR)/global_booleans.xml
 
-# compile strict policy if requested.
-ifneq ($(findstring strict,$(TYPE)),)
-       M4PARAM += -D strict_policy
-endif
-
-# compile targeted policy if requested.
-ifneq ($(findstring targeted,$(TYPE)),)
-       M4PARAM += -D targeted_policy
-endif
-
 # enable MLS if requested.
-ifneq ($(findstring -mls,$(TYPE)),)
+ifeq "$(TYPE)" "mls"
        M4PARAM += -D enable_mls
        CHECKPOLICY += -M
        CHECKMODULE += -M
 endif
 
 # enable MLS if MCS requested.
-ifneq ($(findstring -mcs,$(TYPE)),)
+ifeq "$(TYPE)" "mcs"
        M4PARAM += -D enable_mcs
        CHECKPOLICY += -M
        CHECKMODULE += -M