diff options
author | James Morris <jmorris@namei.org> | 2009-05-22 04:40:59 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-05-22 04:40:59 -0400 |
commit | 2c9e703c618106f5383226fbb1f526cb11034f8a (patch) | |
tree | 87d7548001ea82f655fede0640466fc16aabcdf7 /fs/namei.c | |
parent | 6470c077cae12227318f40f3e6d756caadcce4b0 (diff) | |
parent | 5805977e63a36ad56594a623f3bd2bebcb7db233 (diff) |
Merge branch 'master' into next
Conflicts:
fs/exec.c
Removed IMA changes (the IMA checks are now performed via may_open()).
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c index b05a2b1dea64..c82805d088e1 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1131,8 +1131,8 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt, | |||
1131 | * @nd: pointer to nameidata | 1131 | * @nd: pointer to nameidata |
1132 | * @open_flags: open intent flags | 1132 | * @open_flags: open intent flags |
1133 | */ | 1133 | */ |
1134 | int path_lookup_open(int dfd, const char *name, unsigned int lookup_flags, | 1134 | static int path_lookup_open(int dfd, const char *name, |
1135 | struct nameidata *nd, int open_flags) | 1135 | unsigned int lookup_flags, struct nameidata *nd, int open_flags) |
1136 | { | 1136 | { |
1137 | struct file *filp = get_empty_filp(); | 1137 | struct file *filp = get_empty_filp(); |
1138 | int err; | 1138 | int err; |
@@ -1639,18 +1639,19 @@ static int open_will_write_to_fs(int flag, struct inode *inode) | |||
1639 | * open_to_namei_flags() for more details. | 1639 | * open_to_namei_flags() for more details. |
1640 | */ | 1640 | */ |
1641 | struct file *do_filp_open(int dfd, const char *pathname, | 1641 | struct file *do_filp_open(int dfd, const char *pathname, |
1642 | int open_flag, int mode) | 1642 | int open_flag, int mode, int acc_mode) |
1643 | { | 1643 | { |
1644 | struct file *filp; | 1644 | struct file *filp; |
1645 | struct nameidata nd; | 1645 | struct nameidata nd; |
1646 | int acc_mode, error; | 1646 | int error; |
1647 | struct path path; | 1647 | struct path path; |
1648 | struct dentry *dir; | 1648 | struct dentry *dir; |
1649 | int count = 0; | 1649 | int count = 0; |
1650 | int will_write; | 1650 | int will_write; |
1651 | int flag = open_to_namei_flags(open_flag); | 1651 | int flag = open_to_namei_flags(open_flag); |
1652 | 1652 | ||
1653 | acc_mode = MAY_OPEN | ACC_MODE(flag); | 1653 | if (!acc_mode) |
1654 | acc_mode = MAY_OPEN | ACC_MODE(flag); | ||
1654 | 1655 | ||
1655 | /* O_TRUNC implies we need access checks for write permissions */ | 1656 | /* O_TRUNC implies we need access checks for write permissions */ |
1656 | if (flag & O_TRUNC) | 1657 | if (flag & O_TRUNC) |
@@ -1871,7 +1872,7 @@ do_link: | |||
1871 | */ | 1872 | */ |
1872 | struct file *filp_open(const char *filename, int flags, int mode) | 1873 | struct file *filp_open(const char *filename, int flags, int mode) |
1873 | { | 1874 | { |
1874 | return do_filp_open(AT_FDCWD, filename, flags, mode); | 1875 | return do_filp_open(AT_FDCWD, filename, flags, mode, 0); |
1875 | } | 1876 | } |
1876 | EXPORT_SYMBOL(filp_open); | 1877 | EXPORT_SYMBOL(filp_open); |
1877 | 1878 | ||