aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zefan2008-07-04 12:00:07 -0500
committerLinus Torvalds2008-07-04 12:40:10 -0500
commitd823f6bfec2844493c05961133895de21fa0e02d (patch)
tree853fac4a97ab842f9ee52adfbf72297e8b90688d /security/device_cgroup.c
parent26ff8c697a2c8f6974c2357d3f01cca91b20c964 (diff)
downloadkernel-common-d823f6bfec2844493c05961133895de21fa0e02d.tar.gz
kernel-common-d823f6bfec2844493c05961133895de21fa0e02d.tar.xz
kernel-common-d823f6bfec2844493c05961133895de21fa0e02d.zip
devcgroup: fix odd behaviour when writing 'a' to devices.allow
# cat /devcg/devices.list a *:* rwm # echo a > devices.allow # cat /devcg/devices.list a *:* rwm a 0:0 rwm This is odd and maybe confusing. With this patch, writing 'a' to devices.allow will add 'a *:* rwm' to the whitelist. Also a few fixes and updates to the document. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Serge E. Hallyn <serue@us.ibm.com> Cc: Paul Menage <menage@google.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: James Morris <jmorris@namei.org> Cc: Chris Wright <chrisw@sous-sol.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/device_cgroup.c')
-rw-r--r--security/device_cgroup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index baf348834b6..fd764a0858d 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -382,6 +382,8 @@ static ssize_t devcgroup_access_write(struct cgroup *cgroup, struct cftype *cft,
382 case 'a': 382 case 'a':
383 wh.type = DEV_ALL; 383 wh.type = DEV_ALL;
384 wh.access = ACC_MASK; 384 wh.access = ACC_MASK;
385 wh.major = ~0;
386 wh.minor = ~0;
385 goto handle; 387 goto handle;
386 case 'b': 388 case 'b':
387 wh.type = DEV_BLOCK; 389 wh.type = DEV_BLOCK;