targeted policy patch
Hi,
In order to compile the sf.net targeted policy on a gentoo system with the sf.net checkpolicy, I needed the following patch. It does several small things, the last of which I expect is actually wrong, but at least gets me a compiling policy:
1. preserves kernel.te to get its type declaration.
2. fixes what i assume is a type, 'rm -rf domains/misc/used' instead of unused
3. deletes setfiles.fc, since setfiles_exec_t is not declared in the policy
4. adds the unrestricted attribute to the insmod_t domain. This stops a conflict with the neverallow rule for ~signal -> unconfined_t.
thanks,
-serge
selinux-policy-targeted.spec +3 -1
@@ -48,8 +48,10 @@ for i in amanda.te apache.te chkpwd.te cups.te dhcpd.te dictd.te dovecot.te fingerd.te ftpd.te howl.te i18n_input.te init.te initrc.te inetd.te innd.te kerberos.te ktalkd.te ldconfig.te login.te lpd.te mailman.te modutil.te mta.te mysqld.te named.te nscd.te ntpd.te portmap.te postgresql.te privoxy.te radius.te radvd.te rlogind.te rpcd.te rshd.te rsync.te samba.te slapd.te snmpd.te spamd.te squid.te stunnel.te syslogd.te telnetd.te tftpd.te winbind.te ypbind.te ypserv.te zebra.te; do mv domains/program/unused/$i domains/program/ done +cp domains/misc/unused/kernel.te domains/misc rm -rf domains/program/unused -rm -rf domains/misc/used +rm -rf domains/misc/unused +rm file_contexts/program/setfiles.fc cp -R %{type}/* . echo "define(\`targeted_policy')" > tunables/tunable.tun echo "define(\`hide_broken_symptoms')" >> tunables/tunable.tun
domains/program/modutil.te +1 -1
@@ -70,7 +70,7 @@ # Rules for the insmod_t domain. # -type insmod_t, domain, privlog, sysctl_kernel_writer, privmem, privsysmod ifdef(`unlimitedUtils', `, admin, etc_writer, fs_domain, auth_write, privowner, privmodule' ) +type insmod_t, domain, unrestricted, privlog, sysctl_kernel_writer, privmem, privsysmod ifdef(`unlimitedUtils', `, admin, etc_writer, fs_domain, auth_write, privowner, privmodule' ) ; role system_r types insmod_t; role sysadm_r types insmod_t;
Quoted 7 lines · Serge Hallyn
Hi,
In order to compile the sf.net targeted policy on a gentoo system with the sf.net checkpolicy, I needed the following patch. It does several small things, the last of which I expect is actually wrong, but at least gets me a compiling policy:
Quoted 5 lines
1. preserves kernel.te to get its type declaration.
2. fixes what i assume is a type, 'rm -rf domains/misc/used' instead of unused
3. deletes setfiles.fc, sincesetfiles_exec_tis not declared in the policy
4. adds the unrestricted attribute to theinsmod_tdomain. This stops a conflict with the neverallow rule for ~signal ->unconfined_t.
I'd advise using the targeted policy spec file from the Fedora Core CVS tree instead; we only update our spec files occasionally (e.g. prior to an updated release on nsa.gov) and they are only intended as examples. FC4 targeted policy includes many more domains.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Ah, ok, thanks.
What about the strict policy? Should I use that out of fc as well?
thanks,
-serge
Quoted 14 lines · Stephen Smalley
Quoted 7 lines · Serge Hallyn
Hi,
In order to compile the sf.net targeted policy on a gentoo system with the sf.net checkpolicy, I needed the following patch. It does several small things, the last of which I expect is actually wrong, but at least gets me a compiling policy:
Quoted 5 lines
1. preserves kernel.te to get its type declaration.
2. fixes what i assume is a type, 'rm -rf domains/misc/used' instead of unused
3. deletes setfiles.fc, sincesetfiles_exec_tis not declared in the policy
4. adds the unrestricted attribute to theinsmod_tdomain. This stops a conflict with the neverallow rule for ~signal ->unconfined_t.
Quoted 10 lines
I'd advise using the targeted policy spec file from the Fedora Core CVS tree instead; we only update our spec files occasionally (e.g. prior to an updated release on nsa.gov) and they are only intended as examples. FC4 targeted policy includes many more domains.
--
Stephen Smalley
National Security Agency
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.