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 <[email protected]>
Cc: Pavel Emelyanov <[email protected]>
Cc: Serge E. Hallyn <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: James Morris <[email protected]>
Cc: Chris Wright <[email protected]>
Cc: Stephen Smalley <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Li Zefan 2008-07-04 10:00:07 -07:00 • committed by Linus Torvalds
commit d823f6bfec
2 changed files with 8 additions and 2 deletions

View file

@ -382,6 +382,8 @@ static ssize_t devcgroup_access_write(struct cgroup *cgroup, struct cftype *cft,
case 'a':
wh.type = DEV_ALL;
wh.access = ACC_MASK;
wh.major = ~0;
wh.minor = ~0;
goto handle;
case 'b':
wh.type = DEV_BLOCK;