Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/system/
Date: Thu, 26 May 2016 15:54:31
Message-Id: 1464276811.17881c395704cfc066a765dccdd2f812053a795c.perfinion@gentoo
1 commit: 17881c395704cfc066a765dccdd2f812053a795c
2 Author: Jason Zaman <jason <AT> perfinion <DOT> com>
3 AuthorDate: Thu May 26 15:09:27 2016 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Thu May 26 15:33:31 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=17881c39
7
8 userdomain: filetrans interfaces for user_runtime
9
10 policy/modules/system/userdomain.if | 98 +++++++++++++++++++++++++++++++++++++
11 1 file changed, 98 insertions(+)
12
13 diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if
14 index 0d6d9b1..4029359 100644
15 --- a/policy/modules/system/userdomain.if
16 +++ b/policy/modules/system/userdomain.if
17 @@ -2753,6 +2753,104 @@ interface(`userdom_tmp_filetrans_user_tmp',`
18
19 ########################################
20 ## <summary>
21 +## Create objects in the pid directory
22 +## with an automatic type transition to
23 +## the user runtime root type.
24 +## </summary>
25 +## <param name="domain">
26 +## <summary>
27 +## Domain allowed access.
28 +## </summary>
29 +## </param>
30 +## <param name="object_class">
31 +## <summary>
32 +## The class of the object to be created.
33 +## </summary>
34 +## </param>
35 +## <param name="name" optional="true">
36 +## <summary>
37 +## The name of the object being created.
38 +## </summary>
39 +## </param>
40 +#
41 +interface(`userdom_pid_filetrans_user_runtime_root',`
42 + gen_require(`
43 + type user_runtime_root_t;
44 + ')
45 +
46 + files_pid_filetrans($1, user_runtime_root_t, $2, $3)
47 +')
48 +
49 +########################################
50 +## <summary>
51 +## Create objects in a user runtime
52 +## directory with an automatic type
53 +## transition to a specified private
54 +## type.
55 +## </summary>
56 +## <param name="domain">
57 +## <summary>
58 +## Domain allowed access.
59 +## </summary>
60 +## </param>
61 +## <param name="private_type">
62 +## <summary>
63 +## The type of the object to create.
64 +## </summary>
65 +## </param>
66 +## <param name="object_class">
67 +## <summary>
68 +## The class of the object to be created.
69 +## </summary>
70 +## </param>
71 +## <param name="name" optional="true">
72 +## <summary>
73 +## The name of the object being created.
74 +## </summary>
75 +## </param>
76 +#
77 +interface(`userdom_user_runtime_dir_filetrans',`
78 + gen_require(`
79 + type user_runtime_dir_t;
80 + ')
81 +
82 + filetrans_pattern($1, user_runtime_dir_t, $2, $3, $4)
83 + allow $1 user_runtime_root_t:dir search_dir_perms;
84 + files_search_pids($1)
85 +')
86 +
87 +########################################
88 +## <summary>
89 +## Create objects in the user runtime directory
90 +## with an automatic type transition to
91 +## the user temporary type.
92 +## </summary>
93 +## <param name="domain">
94 +## <summary>
95 +## Domain allowed access.
96 +## </summary>
97 +## </param>
98 +## <param name="object_class">
99 +## <summary>
100 +## The class of the object to be created.
101 +## </summary>
102 +## </param>
103 +## <param name="name" optional="true">
104 +## <summary>
105 +## The name of the object being created.
106 +## </summary>
107 +## </param>
108 +#
109 +interface(`userdom_user_runtime_dir_filetrans_user_tmp',`
110 + gen_require(`
111 + type user_tmp_t;
112 + ')
113 +
114 + userdom_user_runtime_dir_filetrans($1, user_tmp_t, $2, $3)
115 +')
116 +
117 +########################################
118 +## <summary>
119 ## Read and write user tmpfs files.
120 ## </summary>
121 ## <param name="domain">