]> git.ipfire.org Git - people/stevee/selinux-policy.git/commitdiff
clean up 6a192f70d42013fcbd4eefe1f35cab3de313cedb
authorChris PeBenito <cpebenito@tresys.com>
Wed, 29 Jul 2009 19:12:48 +0000 (15:12 -0400)
committerChris PeBenito <cpebenito@tresys.com>
Wed, 29 Jul 2009 19:12:48 +0000 (15:12 -0400)
policy/modules/admin/apt.if
policy/modules/admin/apt.te

index aaa4153bceb95e41f4db2162f1fd0184dbc071c4..df4b461ab957f56ca9cb9ddad19f8d9f922418e9 100644 (file)
@@ -1,4 +1,4 @@
-## <summary>APT advanced package toll.</summary>
+## <summary>APT advanced package tool.</summary>
 
 ########################################
 ## <summary>
index 48afcdab5cc63c74e2301ac6ee9dda1b5ed4722c..55df140c31888a829e6fae793a37b97b9646d87e 100644 (file)
@@ -16,23 +16,23 @@ role system_r types apt_t;
 type apt_devpts_t;
 term_pty(apt_devpts_t)
 
+# aptitude lock file
+type apt_lock_t;
+files_lock_file(apt_lock_t)
+
 type apt_tmp_t;
 files_tmp_file(apt_tmp_t)
 
 type apt_tmpfs_t;
 files_tmpfs_file(apt_tmpfs_t)
 
-# status files
-type apt_var_lib_t alias var_lib_apt_t;
-files_type(apt_var_lib_t)
-
 # package cache
 type apt_var_cache_t alias var_cache_apt_t;
 files_type(apt_var_cache_t)
 
-# aptitude lock file
-type apt_lock_t;
-files_lock_file(apt_lock_t)
+# status files
+type apt_var_lib_t alias var_lib_apt_t;
+files_type(apt_var_lib_t)
 
 # aptitude log file
 type apt_var_log_t;
@@ -57,13 +57,13 @@ allow apt_t self:shm create_shm_perms;
 allow apt_t self:sem create_sem_perms;
 allow apt_t self:msgq create_msgq_perms;
 allow apt_t self:msg { send receive };
-
 # Run update
 allow apt_t self:netlink_route_socket r_netlink_socket_perms;
 
-# Access /var/cache/apt files
-manage_files_pattern(apt_t, apt_var_cache_t, apt_var_cache_t)
-files_var_filetrans(apt_t, apt_var_cache_t, dir)
+# lock files
+allow apt_t apt_lock_t:dir manage_dir_perms;
+allow apt_t apt_lock_t:file manage_file_perms;
+files_lock_filetrans(apt_t,apt_lock_t,{dir file})
 
 manage_dirs_pattern(apt_t, apt_tmp_t, apt_tmp_t)
 manage_files_pattern(apt_t, apt_tmp_t, apt_tmp_t)
@@ -76,17 +76,17 @@ manage_fifo_files_pattern(apt_t, apt_tmpfs_t, apt_tmpfs_t)
 manage_sock_files_pattern(apt_t, apt_tmpfs_t, apt_tmpfs_t)
 fs_tmpfs_filetrans(apt_t, apt_tmpfs_t, { dir file lnk_file sock_file fifo_file })
 
+# Access /var/cache/apt files
+manage_files_pattern(apt_t, apt_var_cache_t, apt_var_cache_t)
+files_var_filetrans(apt_t, apt_var_cache_t, dir)
+
 # Access /var/lib/apt files
 manage_files_pattern(apt_t, apt_var_lib_t, apt_var_lib_t)
 files_var_lib_filetrans(apt_t, apt_var_lib_t, dir)
 
-# lock files
-allow apt_t apt_lock_t:dir manage_dir_perms;
-allow apt_t apt_lock_t:file manage_file_perms;
-files_lock_filetrans(apt_t,apt_lock_t,{dir file})
-
 # log files
 allow apt_t apt_var_log_t:file manage_file_perms;
+logging_log_filetrans(apt_t, apt_var_log_t, file)
 
 kernel_read_system_state(apt_t)
 kernel_read_kernel_sysctls(apt_t)
@@ -103,7 +103,7 @@ corenet_tcp_sendrecv_generic_node(apt_t)
 corenet_udp_sendrecv_generic_node(apt_t)
 corenet_tcp_sendrecv_all_ports(apt_t)
 corenet_udp_sendrecv_all_ports(apt_t)
-# TODO: reall allow all these?
+# TODO: really allow all these?
 corenet_tcp_bind_generic_node(apt_t)
 corenet_udp_bind_generic_node(apt_t)
 corenet_tcp_connect_all_ports(apt_t)
@@ -128,7 +128,6 @@ libs_exec_ld_so(apt_t)
 libs_exec_lib_files(apt_t)
 
 logging_send_syslog_msg(apt_t)
-logging_log_filetrans(apt_t, apt_var_log_t, file)
 
 miscfiles_read_localization(apt_t)