Gentoo Archives: gentoo-commits

From: Sven Vermeulen <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/system/
Date: Thu, 02 Mar 2017 10:17:55
Message-Id: 1488449808.93880cc289e815e9a31a08a0832f80583ae15cb9.swift@gentoo
1 commit: 93880cc289e815e9a31a08a0832f80583ae15cb9
2 Author: cgzones <cgzones <AT> googlemail <DOT> com>
3 AuthorDate: Thu Feb 16 13:30:48 2017 +0000
4 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 2 10:16:48 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=93880cc2
7
8 improve documentation for user_user_(inherited_)?user_terminals
9
10 policy/modules/system/userdomain.if | 52 +++++++++++++++++++++----------------
11 1 file changed, 30 insertions(+), 22 deletions(-)
12
13 diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if
14 index 0799c18c..a43c756e 100644
15 --- a/policy/modules/system/userdomain.if
16 +++ b/policy/modules/system/userdomain.if
17 @@ -3275,41 +3275,48 @@ interface(`userdom_use_user_ptys',`
18 type user_devpts_t;
19 ')
20
21 + term_list_ptys($1)
22 allow $1 user_devpts_t:chr_file rw_term_perms;
23 ')
24
25 ########################################
26 ## <summary>
27 -## Read and write a inherited user TTYs and PTYs.
28 +## Read and write a user TTYs and PTYs.
29 ## </summary>
30 ## <desc>
31 -## <p>
32 -## Allow the specified domain to read and write inherited user
33 -## TTYs and PTYs. This will allow the domain to
34 -## interact with the user via the terminal. Typically
35 -## all interactive applications will require this
36 -## access.
37 -## </p>
38 +## <p>
39 +## Allow the specified domain to read and write user
40 +## TTYs and PTYs. This will allow the domain to
41 +## interact with the user via the terminal. Typically
42 +## all interactive applications will require this
43 +## access.
44 +## </p>
45 +## <p>
46 +## However, this also allows the applications to spy
47 +## on user sessions or inject information into the
48 +## user session. Thus, this access should likely
49 +## not be allowed for non-interactive domains.
50 +## </p>
51 ## </desc>
52 ## <param name="domain">
53 -## <summary>
54 -## Domain allowed access.
55 -## </summary>
56 +## <summary>
57 +## Domain allowed access.
58 +## </summary>
59 ## </param>
60 ## <infoflow type="both" weight="10"/>
61 #
62 interface(`userdom_use_inherited_user_terminals',`
63 gen_require(`
64 - type user_tty_device_t, user_devpts_t;
65 + type user_devpts_t, user_tty_device_t;
66 ')
67
68 - allow $1 user_tty_device_t:chr_file rw_inherited_term_perms;
69 - allow $1 user_devpts_t:chr_file rw_inherited_term_perms;
70 + term_list_ptys($1)
71 + allow $1 { user_devpts_t user_tty_device_t }:chr_file rw_inherited_term_perms;
72 ')
73
74 ########################################
75 ## <summary>
76 -## Read and write a user TTYs and PTYs.
77 +## Read, write and open a user TTYs and PTYs.
78 ## </summary>
79 ## <desc>
80 ## <p>
81 @@ -3320,6 +3327,12 @@ interface(`userdom_use_inherited_user_terminals',`
82 ## access.
83 ## </p>
84 ## <p>
85 +## This interface will also allow to open these user
86 +## terminals, which should not be necessary in general
87 +## and userdom_use_inherited_user_terminals() should
88 +## be sufficient.
89 +## </p>
90 +## <p>
91 ## However, this also allows the applications to spy
92 ## on user sessions or inject information into the
93 ## user session. Thus, this access should likely
94 @@ -3334,13 +3347,8 @@ interface(`userdom_use_inherited_user_terminals',`
95 ## <infoflow type="both" weight="10"/>
96 #
97 interface(`userdom_use_user_terminals',`
98 - gen_require(`
99 - type user_tty_device_t, user_devpts_t;
100 - ')
101 -
102 - allow $1 user_tty_device_t:chr_file rw_term_perms;
103 - allow $1 user_devpts_t:chr_file rw_term_perms;
104 - term_list_ptys($1)
105 + userdom_use_user_ptys($1)
106 + userdom_use_user_ttys($1)
107 ')
108
109 ########################################