diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 4bf4807f2d44..c2fef7b12dc7 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -800,7 +800,8 @@ static void selinux_sb_clone_mnt_opts(const struct super_block *oldsb, | |||
800 | mutex_unlock(&newsbsec->lock); | 800 | mutex_unlock(&newsbsec->lock); |
801 | } | 801 | } |
802 | 802 | ||
803 | int selinux_parse_opts_str(char *options, struct security_mnt_opts *opts) | 803 | static int selinux_parse_opts_str(char *options, |
804 | struct security_mnt_opts *opts) | ||
804 | { | 805 | { |
805 | char *p; | 806 | char *p; |
806 | char *context = NULL, *defcontext = NULL; | 807 | char *context = NULL, *defcontext = NULL; |
@@ -1629,6 +1630,12 @@ static inline u32 file_to_av(struct file *file) | |||
1629 | else | 1630 | else |
1630 | av |= FILE__WRITE; | 1631 | av |= FILE__WRITE; |
1631 | } | 1632 | } |
1633 | if (!av) { | ||
1634 | /* | ||
1635 | * Special file opened with flags 3 for ioctl-only use. | ||
1636 | */ | ||
1637 | av = FILE__IOCTL; | ||
1638 | } | ||
1632 | 1639 | ||
1633 | return av; | 1640 | return av; |
1634 | } | 1641 | } |