diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-02 10:45:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-02 10:45:49 -0400 |
commit | d40c2f29f3b0f5937bace575722598dac474c478 (patch) | |
tree | a757da81f2a5e8a145ccfbecbf624bf673f41f03 | |
parent | 6be9f7b2835fa442f6b892f174dabc4023c0af2e (diff) | |
parent | 0794c66d49885a2f615618ce4940434b5b067d84 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
selinux: handle files opened with flags 3 by checking ioctl permission
-rw-r--r-- | security/selinux/hooks.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 41a049f50f58..c2fef7b12dc7 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -1630,6 +1630,12 @@ static inline u32 file_to_av(struct file *file) | |||
1630 | else | 1630 | else |
1631 | av |= FILE__WRITE; | 1631 | av |= FILE__WRITE; |
1632 | } | 1632 | } |
1633 | if (!av) { | ||
1634 | /* | ||
1635 | * Special file opened with flags 3 for ioctl-only use. | ||
1636 | */ | ||
1637 | av = FILE__IOCTL; | ||
1638 | } | ||
1633 | 1639 | ||
1634 | return av; | 1640 | return av; |
1635 | } | 1641 | } |