1 |
commit: 17d97f0a9bb787b5feb0fa8aaf23a87bfdc79d00 |
2 |
Author: Nicolas Iooss <nicolas.iooss <AT> m4x <DOT> org> |
3 |
AuthorDate: Sun Dec 20 15:28:49 2015 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 30 17:16:56 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=17d97f0a |
7 |
|
8 |
Label OpenSSH files correctly on Arch Linux |
9 |
|
10 |
On Arch Linux, OpenSSH installs these binary files in /usr/lib/ssh: |
11 |
|
12 |
* sftp-server (labeled with ssh_keysign_exec_t type in refpolicy) |
13 |
* ssh-askpass (symlink to x11-ssh-askpass) |
14 |
* ssh-keysign |
15 |
* ssh-pkcs11-helper |
16 |
* x11-ssh-askpass (from x11-ssh-askpass package) |
17 |
|
18 |
Label all these files but sftp-server as bin_t. |
19 |
|
20 |
policy/modules/kernel/corecommands.fc | 1 + |
21 |
policy/modules/services/ssh.fc | 3 ++- |
22 |
2 files changed, 3 insertions(+), 1 deletion(-) |
23 |
|
24 |
diff --git a/policy/modules/kernel/corecommands.fc b/policy/modules/kernel/corecommands.fc |
25 |
index 8f12446..beb3ad8 100644 |
26 |
--- a/policy/modules/kernel/corecommands.fc |
27 |
+++ b/policy/modules/kernel/corecommands.fc |
28 |
@@ -240,6 +240,7 @@ ifdef(`distro_gentoo',` |
29 |
/usr/lib/rpm/rpmq -- gen_context(system_u:object_r:bin_t,s0) |
30 |
/usr/lib/rpm/rpmv -- gen_context(system_u:object_r:bin_t,s0) |
31 |
/usr/lib/sftp-server -- gen_context(system_u:object_r:bin_t,s0) |
32 |
+/usr/lib/ssh(/.*)? gen_context(system_u:object_r:bin_t,s0) |
33 |
/usr/lib/sudo/sesh -- gen_context(system_u:object_r:shell_exec_t,s0) |
34 |
/usr/lib/systemd/systemd.* -- gen_context(system_u:object_r:bin_t,s0) |
35 |
/usr/lib/systemd/system-generators(/.*)? gen_context(system_u:object_r:bin_t,s0) |
36 |
|
37 |
diff --git a/policy/modules/services/ssh.fc b/policy/modules/services/ssh.fc |
38 |
index 8168244..fd6c218 100644 |
39 |
--- a/policy/modules/services/ssh.fc |
40 |
+++ b/policy/modules/services/ssh.fc |
41 |
@@ -7,7 +7,8 @@ HOME_DIR/\.ssh(/.*)? gen_context(system_u:object_r:ssh_home_t,s0) |
42 |
/usr/bin/ssh-agent -- gen_context(system_u:object_r:ssh_agent_exec_t,s0) |
43 |
/usr/bin/ssh-keygen -- gen_context(system_u:object_r:ssh_keygen_exec_t,s0) |
44 |
|
45 |
-/usr/lib/openssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0) |
46 |
+/usr/lib/openssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0) |
47 |
+/usr/lib/ssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0) |
48 |
|
49 |
/usr/libexec/openssh/ssh-keysign -- gen_context(system_u:object_r:ssh_keysign_exec_t,s0) |