diff --git a/policy-F16.patch b/policy-F16.patch index d704566..9da3d36 100644 --- a/policy-F16.patch +++ b/policy-F16.patch @@ -47,6 +47,29 @@ index 16e8b13..87925e6 100644 .EX httpd_sys_content_ra_t .EE +diff --git a/policy/constraints b/policy/constraints +index 1308871..c994c93 100644 +--- a/policy/constraints ++++ b/policy/constraints +@@ -107,9 +107,17 @@ constrain process { transition noatsecure siginh rlimitinh } + + constrain process dyntransition + ( +- u1 == u2 and r1 == r2 ++ u1 == u2 ++ or ( t1 == can_change_process_identity and t2 == process_user_target ) ++); ++ ++constrain process dyntransition ++( ++ r1 == r2 ++ or ( t1 == can_change_process_identity and t2 == process_user_target ) + ); + ++ + # These permissions do not have ubac constraints: + # fork + # setexec diff --git a/policy/flask/access_vectors b/policy/flask/access_vectors index bf24160..468e0fd 100644 --- a/policy/flask/access_vectors @@ -1612,10 +1635,10 @@ index 0000000..bd83148 +## No Interfaces diff --git a/policy/modules/admin/permissivedomains.te b/policy/modules/admin/permissivedomains.te new file mode 100644 -index 0000000..3b8c1e9 +index 0000000..bb587b1 --- /dev/null +++ b/policy/modules/admin/permissivedomains.te -@@ -0,0 +1,217 @@ +@@ -0,0 +1,228 @@ +policy_module(permissivedomains,16) + +optional_policy(` @@ -1833,6 +1856,17 @@ index 0000000..3b8c1e9 + + permissive telepathy_logger_t; +') ++ ++optional_policy(` ++ gen_require(` ++ type glance_registry_t; ++ type glance_api_t; ++ ') ++ ++ permissive glance_registry_t; ++ permissive glance_api_t; ++') ++ diff --git a/policy/modules/admin/portage.fc b/policy/modules/admin/portage.fc index db46387..b665b08 100644 --- a/policy/modules/admin/portage.fc @@ -6227,7 +6261,7 @@ index 40e0a2a..93d212c 100644 ## ## Send generic signals to user gpg processes. diff --git a/policy/modules/apps/gpg.te b/policy/modules/apps/gpg.te -index 9050e8c..65d207a 100644 +index 9050e8c..538d39e 100644 --- a/policy/modules/apps/gpg.te +++ b/policy/modules/apps/gpg.te @@ -4,6 +4,7 @@ policy_module(gpg, 2.4.0) @@ -6338,7 +6372,7 @@ index 9050e8c..65d207a 100644 tunable_policy(`use_nfs_home_dirs',` fs_dontaudit_rw_nfs_files(gpg_helper_t) -@@ -205,6 +229,7 @@ tunable_policy(`use_samba_home_dirs',` +@@ -205,11 +229,12 @@ tunable_policy(`use_samba_home_dirs',` # # GPG agent local policy # @@ -6346,7 +6380,13 @@ index 9050e8c..65d207a 100644 # rlimit: gpg-agent wants to prevent coredumps allow gpg_agent_t self:process setrlimit; -@@ -239,12 +264,13 @@ fs_dontaudit_list_inotifyfs(gpg_agent_t) + +-allow gpg_agent_t self:unix_stream_socket create_stream_socket_perms ; ++allow gpg_agent_t self:unix_stream_socket { create_stream_socket_perms connectto } ; + allow gpg_agent_t self:fifo_file rw_fifo_file_perms; + + # read and write ~/.gnupg (gpg-agent stores secret keys in ~/.gnupg/private-keys-v1.d ) +@@ -239,19 +264,20 @@ fs_dontaudit_list_inotifyfs(gpg_agent_t) miscfiles_read_localization(gpg_agent_t) # Write to the user domain tty. @@ -6361,6 +6401,14 @@ index 9050e8c..65d207a 100644 ') tunable_policy(`gpg_agent_env_file',` + # write ~/.gpg-agent-info or a similar to the users home dir + # or subdir (gpg-agent --write-env-file option) + # +- userdom_user_home_dir_filetrans_user_home_content(gpg_agent_t, file) ++ userdom_user_home_dir_filetrans_user_home_content(gpg_agent_t, { dir file }) + userdom_manage_user_home_content_dirs(gpg_agent_t) + userdom_manage_user_home_content_files(gpg_agent_t) + ') @@ -332,6 +358,9 @@ miscfiles_read_localization(gpg_pinentry_t) # for .Xauthority userdom_read_user_home_content_files(gpg_pinentry_t) @@ -12275,7 +12323,7 @@ index 4f3b542..5a41e58 100644 corenet_udp_recvfrom_labeled($1, $2) corenet_raw_recvfrom_labeled($1, $2) diff --git a/policy/modules/kernel/corenetwork.te.in b/policy/modules/kernel/corenetwork.te.in -index 99b71cb..2039d50 100644 +index 99b71cb..85d03ed 100644 --- a/policy/modules/kernel/corenetwork.te.in +++ b/policy/modules/kernel/corenetwork.te.in @@ -11,11 +11,14 @@ attribute netif_type; @@ -12370,7 +12418,7 @@ index 99b71cb..2039d50 100644 network_port(cvs, tcp,2401,s0, udp,2401,s0) network_port(cyphesis, tcp,6767,s0, tcp,6769,s0, tcp,6780-6799,s0, udp,32771,s0) network_port(daap, tcp,3689,s0, udp,3689,s0) -@@ -99,9 +126,14 @@ network_port(dhcpc, udp,68,s0, tcp,68,s0, udp,546,s0, tcp, 546,s0) +@@ -99,14 +126,20 @@ network_port(dhcpc, udp,68,s0, tcp,68,s0, udp,546,s0, tcp, 546,s0) network_port(dhcpd, udp,67,s0, udp,547,s0, tcp, 547,s0, udp,548,s0, tcp, 548,s0, tcp,647,s0, udp,647,s0, tcp,847,s0, udp,847,s0, tcp,7911,s0) network_port(dict, tcp,2628,s0) network_port(distccd, tcp,3632,s0) @@ -12385,7 +12433,13 @@ index 99b71cb..2039d50 100644 network_port(ftp, tcp,21,s0, tcp,990,s0, udp,990,s0) network_port(ftp_data, tcp,20,s0) network_port(gatekeeper, udp,1718,s0, udp,1719,s0, tcp,1721,s0, tcp,7000,s0) -@@ -114,12 +146,13 @@ network_port(hadoop_namenode, tcp,8020,s0) + network_port(giftd, tcp,1213,s0) + network_port(git, tcp,9418,s0, udp,9418,s0) ++network_port(glance_registry, tcp,9191,s0, udp,9191,s0) + network_port(gopher, tcp,70,s0, udp,70,s0) + network_port(gpsd, tcp,2947,s0) + network_port(hadoop_datanode, tcp,50010,s0) +@@ -114,12 +147,13 @@ network_port(hadoop_namenode, tcp,8020,s0) network_port(hddtemp, tcp,7634,s0) network_port(howl, tcp,5335,s0, udp,5353,s0) network_port(hplip, tcp,1782,s0, tcp,2207,s0, tcp,2208,s0, tcp, 8290,s0, tcp,50000,s0, tcp,50002,s0, tcp,8292,s0, tcp,9100,s0, tcp,9101,s0, tcp,9102,s0, tcp,9220,s0, tcp,9221,s0, tcp,9222,s0, tcp,9280,s0, tcp,9281,s0, tcp,9282,s0, tcp,9290,s0, tcp,9291,s0, tcp,9292,s0) @@ -12400,7 +12454,7 @@ index 99b71cb..2039d50 100644 network_port(ipmi, udp,623,s0, udp,664,s0) network_port(ipp, tcp,631,s0, udp,631,s0, tcp,8610-8614,s0, udp,8610-8614,s0) network_port(ipsecnat, tcp,4500,s0, udp,4500,s0) -@@ -129,20 +162,25 @@ network_port(iscsi, tcp,3260,s0) +@@ -129,20 +163,25 @@ network_port(iscsi, tcp,3260,s0) network_port(isns, tcp,3205,s0, udp,3205,s0) network_port(jabber_client, tcp,5222,s0, tcp,5223,s0) network_port(jabber_interserver, tcp,5269,s0) @@ -12429,7 +12483,7 @@ index 99b71cb..2039d50 100644 network_port(mpd, tcp,6600,s0) network_port(msnp, tcp,1863,s0, udp,1863,s0) network_port(mssql, tcp,1433-1434,s0, udp,1433-1434,s0) -@@ -155,13 +193,21 @@ network_port(netsupport, tcp,5404,s0, udp,5404,s0, tcp,5405,s0, udp,5405,s0) +@@ -155,13 +194,21 @@ network_port(netsupport, tcp,5404,s0, udp,5404,s0, tcp,5405,s0, udp,5405,s0) network_port(nmbd, udp,137,s0, udp,138,s0) network_port(ntop, tcp,3000-3001,s0, udp,3000-3001,s0) network_port(ntp, udp,123,s0) @@ -12452,7 +12506,7 @@ index 99b71cb..2039d50 100644 network_port(pop, tcp,106,s0, tcp,109,s0, tcp,110,s0, tcp,143,s0, tcp,220,s0, tcp,993,s0, tcp,995,s0, tcp,1109,s0) network_port(portmap, udp,111,s0, tcp,111,s0) network_port(postfix_policyd, tcp,10031,s0) -@@ -179,30 +225,35 @@ network_port(radacct, udp,1646,s0, udp,1813,s0) +@@ -179,30 +226,35 @@ network_port(radacct, udp,1646,s0, udp,1813,s0) network_port(radius, udp,1645,s0, udp,1812,s0) network_port(radsec, tcp,2083,s0) network_port(razor, tcp,2703,s0) @@ -12492,7 +12546,7 @@ index 99b71cb..2039d50 100644 network_port(tcs, tcp, 30003, s0) network_port(telnetd, tcp,23,s0) network_port(tftp, udp,69,s0) -@@ -215,7 +266,7 @@ network_port(uucpd, tcp,540,s0) +@@ -215,7 +267,7 @@ network_port(uucpd, tcp,540,s0) network_port(varnishd, tcp,6081-6082,s0) network_port(virt, tcp,16509,s0, udp,16509,s0, tcp,16514,s0, udp,16514,s0) network_port(virt_migration, tcp,49152-49216,s0) @@ -12501,7 +12555,7 @@ index 99b71cb..2039d50 100644 network_port(wccp, udp,2048,s0) network_port(whois, tcp,43,s0, udp,43,s0, tcp, 4321, s0 , udp, 4321, s0 ) network_port(xdmcp, udp,177,s0, tcp,177,s0) -@@ -229,6 +280,7 @@ network_port(zookeeper_client, tcp,2181,s0) +@@ -229,6 +281,7 @@ network_port(zookeeper_client, tcp,2181,s0) network_port(zookeeper_election, tcp,3888,s0) network_port(zookeeper_leader, tcp,2888,s0) network_port(zebra, tcp,2600-2604,s0, tcp,2606,s0, udp,2600-2604,s0, udp,2606,s0) @@ -12509,7 +12563,7 @@ index 99b71cb..2039d50 100644 network_port(zope, tcp,8021,s0) # Defaults for reserved ports. Earlier portcon entries take precedence; -@@ -238,6 +290,8 @@ portcon tcp 512-1023 gen_context(system_u:object_r:hi_reserved_port_t, s0) +@@ -238,6 +291,8 @@ portcon tcp 512-1023 gen_context(system_u:object_r:hi_reserved_port_t, s0) portcon udp 512-1023 gen_context(system_u:object_r:hi_reserved_port_t, s0) portcon tcp 1-511 gen_context(system_u:object_r:reserved_port_t, s0) portcon udp 1-511 gen_context(system_u:object_r:reserved_port_t, s0) @@ -12518,7 +12572,7 @@ index 99b71cb..2039d50 100644 ######################################## # -@@ -282,9 +336,10 @@ typealias netif_t alias { lo_netif_t netif_lo_t }; +@@ -282,9 +337,10 @@ typealias netif_t alias { lo_netif_t netif_lo_t }; allow corenet_unconfined_type node_type:node *; allow corenet_unconfined_type netif_type:netif *; allow corenet_unconfined_type packet_type:packet *; @@ -16121,7 +16175,7 @@ index 22821ff..20251b0 100644 ######################################## # diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if -index 97fcdac..e2e6c3b 100644 +index 97fcdac..63e494f 100644 --- a/policy/modules/kernel/filesystem.if +++ b/policy/modules/kernel/filesystem.if @@ -631,6 +631,27 @@ interface(`fs_getattr_cgroup',` @@ -16230,15 +16284,16 @@ index 97fcdac..e2e6c3b 100644 dev_search_sysfs($1) ') -@@ -724,6 +787,7 @@ interface(`fs_read_cgroup_files',` +@@ -724,6 +787,8 @@ interface(`fs_read_cgroup_files',` ') read_files_pattern($1, cgroup_t, cgroup_t) ++ read_lnk_files_pattern($1, cgroup_t, cgroup_t) + fs_search_tmpfs($1) dev_search_sysfs($1) ') -@@ -743,6 +807,7 @@ interface(`fs_write_cgroup_files', ` +@@ -743,6 +808,7 @@ interface(`fs_write_cgroup_files', ` ') write_files_pattern($1, cgroup_t, cgroup_t) @@ -16246,7 +16301,7 @@ index 97fcdac..e2e6c3b 100644 dev_search_sysfs($1) ') -@@ -763,6 +828,7 @@ interface(`fs_rw_cgroup_files',` +@@ -763,6 +829,7 @@ interface(`fs_rw_cgroup_files',` ') rw_files_pattern($1, cgroup_t, cgroup_t) @@ -16254,7 +16309,7 @@ index 97fcdac..e2e6c3b 100644 dev_search_sysfs($1) ') -@@ -803,6 +869,7 @@ interface(`fs_manage_cgroup_files',` +@@ -803,6 +870,7 @@ interface(`fs_manage_cgroup_files',` ') manage_files_pattern($1, cgroup_t, cgroup_t) @@ -16262,7 +16317,7 @@ index 97fcdac..e2e6c3b 100644 dev_search_sysfs($1) ') -@@ -1107,6 +1174,24 @@ interface(`fs_read_noxattr_fs_files',` +@@ -1107,6 +1175,24 @@ interface(`fs_read_noxattr_fs_files',` ######################################## ## @@ -16287,7 +16342,7 @@ index 97fcdac..e2e6c3b 100644 ## Do not audit attempts to read all ## noxattrfs files. ## -@@ -1265,6 +1350,42 @@ interface(`fs_dontaudit_append_cifs_files',` +@@ -1265,6 +1351,42 @@ interface(`fs_dontaudit_append_cifs_files',` ######################################## ## @@ -16330,7 +16385,7 @@ index 97fcdac..e2e6c3b 100644 ## Do not audit attempts to read or ## write files on a CIFS or SMB filesystem. ## -@@ -1279,7 +1400,7 @@ interface(`fs_dontaudit_rw_cifs_files',` +@@ -1279,7 +1401,7 @@ interface(`fs_dontaudit_rw_cifs_files',` type cifs_t; ') @@ -16339,7 +16394,7 @@ index 97fcdac..e2e6c3b 100644 ') ######################################## -@@ -1542,6 +1663,25 @@ interface(`fs_cifs_domtrans',` +@@ -1542,6 +1664,25 @@ interface(`fs_cifs_domtrans',` domain_auto_transition_pattern($1, cifs_t, $2) ') @@ -16365,7 +16420,7 @@ index 97fcdac..e2e6c3b 100644 ####################################### ## ## Create, read, write, and delete dirs -@@ -2148,6 +2288,7 @@ interface(`fs_list_inotifyfs',` +@@ -2148,6 +2289,7 @@ interface(`fs_list_inotifyfs',` ') allow $1 inotifyfs_t:dir list_dir_perms; @@ -16373,7 +16428,7 @@ index 97fcdac..e2e6c3b 100644 ') ######################################## -@@ -2480,6 +2621,7 @@ interface(`fs_read_nfs_files',` +@@ -2480,6 +2622,7 @@ interface(`fs_read_nfs_files',` type nfs_t; ') @@ -16381,7 +16436,7 @@ index 97fcdac..e2e6c3b 100644 allow $1 nfs_t:dir list_dir_perms; read_files_pattern($1, nfs_t, nfs_t) ') -@@ -2518,6 +2660,7 @@ interface(`fs_write_nfs_files',` +@@ -2518,6 +2661,7 @@ interface(`fs_write_nfs_files',` type nfs_t; ') @@ -16389,7 +16444,7 @@ index 97fcdac..e2e6c3b 100644 allow $1 nfs_t:dir list_dir_perms; write_files_pattern($1, nfs_t, nfs_t) ') -@@ -2544,6 +2687,25 @@ interface(`fs_exec_nfs_files',` +@@ -2544,6 +2688,25 @@ interface(`fs_exec_nfs_files',` ######################################## ## @@ -16415,7 +16470,7 @@ index 97fcdac..e2e6c3b 100644 ## Append files ## on a NFS filesystem. ## -@@ -2584,6 +2746,42 @@ interface(`fs_dontaudit_append_nfs_files',` +@@ -2584,6 +2747,42 @@ interface(`fs_dontaudit_append_nfs_files',` ######################################## ## @@ -16458,7 +16513,7 @@ index 97fcdac..e2e6c3b 100644 ## Do not audit attempts to read or ## write files on a NFS filesystem. ## -@@ -2598,7 +2796,7 @@ interface(`fs_dontaudit_rw_nfs_files',` +@@ -2598,7 +2797,7 @@ interface(`fs_dontaudit_rw_nfs_files',` type nfs_t; ') @@ -16467,7 +16522,7 @@ index 97fcdac..e2e6c3b 100644 ') ######################################## -@@ -2736,7 +2934,7 @@ interface(`fs_search_removable',` +@@ -2736,7 +2935,7 @@ interface(`fs_search_removable',` ## ## ## @@ -16476,7 +16531,7 @@ index 97fcdac..e2e6c3b 100644 ## ## # -@@ -2772,7 +2970,7 @@ interface(`fs_read_removable_files',` +@@ -2772,7 +2971,7 @@ interface(`fs_read_removable_files',` ## ## ## @@ -16485,7 +16540,7 @@ index 97fcdac..e2e6c3b 100644 ## ## # -@@ -2965,6 +3163,7 @@ interface(`fs_manage_nfs_dirs',` +@@ -2965,6 +3164,7 @@ interface(`fs_manage_nfs_dirs',` type nfs_t; ') @@ -16493,7 +16548,7 @@ index 97fcdac..e2e6c3b 100644 allow $1 nfs_t:dir manage_dir_perms; ') -@@ -3005,6 +3204,7 @@ interface(`fs_manage_nfs_files',` +@@ -3005,6 +3205,7 @@ interface(`fs_manage_nfs_files',` type nfs_t; ') @@ -16501,7 +16556,7 @@ index 97fcdac..e2e6c3b 100644 manage_files_pattern($1, nfs_t, nfs_t) ') -@@ -3045,6 +3245,7 @@ interface(`fs_manage_nfs_symlinks',` +@@ -3045,6 +3246,7 @@ interface(`fs_manage_nfs_symlinks',` type nfs_t; ') @@ -16509,7 +16564,7 @@ index 97fcdac..e2e6c3b 100644 manage_lnk_files_pattern($1, nfs_t, nfs_t) ') -@@ -3958,6 +4159,42 @@ interface(`fs_dontaudit_list_tmpfs',` +@@ -3958,6 +4160,42 @@ interface(`fs_dontaudit_list_tmpfs',` ######################################## ## @@ -16552,7 +16607,7 @@ index 97fcdac..e2e6c3b 100644 ## Create, read, write, and delete ## tmpfs directories ## -@@ -4175,6 +4412,24 @@ interface(`fs_dontaudit_use_tmpfs_chr_dev',` +@@ -4175,6 +4413,24 @@ interface(`fs_dontaudit_use_tmpfs_chr_dev',` ######################################## ## @@ -16577,7 +16632,7 @@ index 97fcdac..e2e6c3b 100644 ## Relabel character nodes on tmpfs filesystems. ## ## -@@ -4457,6 +4712,8 @@ interface(`fs_mount_all_fs',` +@@ -4457,6 +4713,8 @@ interface(`fs_mount_all_fs',` ') allow $1 filesystem_type:filesystem mount; @@ -16586,7 +16641,7 @@ index 97fcdac..e2e6c3b 100644 ') ######################################## -@@ -4503,7 +4760,7 @@ interface(`fs_unmount_all_fs',` +@@ -4503,7 +4761,7 @@ interface(`fs_unmount_all_fs',` ## ##

## Allow the specified domain to @@ -16595,7 +16650,7 @@ index 97fcdac..e2e6c3b 100644 ## Example attributes: ##

##