summaryrefslogtreecommitdiff
blob: 938ab975b74b84f8d88986124d2adebcd78664be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- apps/links.te	1970-01-01 01:00:00.000000000 +0100
+++ apps/links.te	2011-01-22 15:01:55.272000135 +0100
@@ -0,0 +1,58 @@
+policy_module(links, 1.0.0)
+
+############################
+# 
+# Declarations
+#
+
+type links_t;
+type links_exec_t;
+application_domain(links_t, links_exec_t)
+
+type links_home_t;
+typealias links_home_t alias { user_links_home_t staff_links_home_t sysadm_links_home_t };
+userdom_user_home_content(links_home_t)
+
+type links_tmpfs_t;
+typealias links_tmpfs_t alias { user_links_tmpfs_t staff_links_tmpfs_t sysadm_links_tmpfs_t };
+files_tmpfs_file(links_tmpfs_t)
+ubac_constrained(links_tmpfs_t)
+
+############################
+#
+# Policy
+#
+
+allow links_t self:process signal_perms;
+allow links_t self:unix_stream_socket create_stream_socket_perms;
+
+manage_dirs_pattern(links_t, links_home_t, links_home_t)
+manage_files_pattern(links_t, links_home_t, links_home_t)
+manage_lnk_files_pattern(links_t, links_home_t, links_home_t)
+manage_sock_files_pattern(links_t, links_home_t, links_home_t)
+manage_fifo_files_pattern(links_t, links_home_t, links_home_t)
+userdom_user_home_dir_filetrans(links_t, links_home_t, dir)
+
+manage_fifo_files_pattern(links_t, links_t, links_t)
+
+manage_files_pattern(links_t, links_tmpfs_t, links_tmpfs_t)
+manage_lnk_files_pattern(links_t, links_tmpfs_t, links_tmpfs_t)
+manage_fifo_files_pattern(links_t, links_tmpfs_t, links_tmpfs_t)
+manage_sock_files_pattern(links_t, links_tmpfs_t, links_tmpfs_t)
+fs_tmpfs_filetrans(links_t, links_tmpfs_t, { file lnk_file sock_file fifo_file })
+
+xserver_user_x_domain_template(links, links_t, links_tmpfs_t)
+
+domain_use_interactive_fds(links_t)
+
+userdom_manage_user_home_content_dirs(links_t)
+userdom_manage_user_home_content_files(links_t)
+
+auth_use_nsswitch(links_t)
+
+userdom_use_user_terminals(links_t)
+
+corenet_tcp_connect_http_port(links_t)
+
+miscfiles_read_localization(links_t)
+
--- apps/links.fc	1970-01-01 01:00:00.000000000 +0100
+++ apps/links.fc	2011-01-16 10:50:48.058999501 +0100
@@ -0,0 +1,2 @@
+/usr/bin/links         -- gen_context(system_u:object_r:links_exec_t,s0)
+HOME_DIR/\.links(/.*)?    gen_context(system_u:object_r:links_home_t,s0)