blob: a9a0a5536873471fbde4622b085e468df7488f0a (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
From 22cd030a8118faae37c0835eb7875e482efe5dc1 Mon Sep 17 00:00:00 2001
From: Xin Ouyang <Xin.Ouyang@windriver.com>
Date: Thu, 22 Aug 2013 13:37:23 +0800
Subject: [PATCH] allow nfsd to exec shell commands.
Upstream-Status: Inappropriate [only for Poky]
Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
policy/modules/contrib/rpc.te | 2 +-
policy/modules/kernel/kernel.if | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
--- a/policy/modules/contrib/rpc.te
+++ b/policy/modules/contrib/rpc.te
@@ -224,11 +224,11 @@ allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir
kernel_read_network_state(nfsd_t)
kernel_dontaudit_getattr_core_if(nfsd_t)
kernel_setsched(nfsd_t)
kernel_request_load_module(nfsd_t)
-# kernel_mounton_proc(nfsd_t)
+kernel_mounton_proc(nfsd_t)
corenet_sendrecv_nfs_server_packets(nfsd_t)
corenet_tcp_bind_nfs_port(nfsd_t)
corenet_udp_bind_nfs_port(nfsd_t)
--- a/policy/modules/kernel/kernel.if
+++ b/policy/modules/kernel/kernel.if
@@ -880,43 +880,42 @@ interface(`kernel_unmount_proc',`
allow $1 proc_t:filesystem unmount;
')
########################################
## <summary>
-## Get the attributes of the proc filesystem.
+## Mounton a proc filesystem.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
-interface(`kernel_getattr_proc',`
+interface(`kernel_mounton_proc',`
gen_require(`
type proc_t;
')
- allow $1 proc_t:filesystem getattr;
+ allow $1 proc_t:dir mounton;
')
########################################
## <summary>
-## Mount on proc directories.
+## Get the attributes of the proc filesystem.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
-## <rolecap/>
#
-interface(`kernel_mounton_proc',`
+interface(`kernel_getattr_proc',`
gen_require(`
type proc_t;
')
- allow $1 proc_t:dir mounton;
+ allow $1 proc_t:filesystem getattr;
')
########################################
## <summary>
## Do not audit attempts to set the
|