diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -110,13 +110,14 @@ SYSCALL_DEFINE1(uselib, const char __user *, library) | |||
110 | static const struct open_flags uselib_flags = { | 110 | static const struct open_flags uselib_flags = { |
111 | .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC, | 111 | .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC, |
112 | .acc_mode = MAY_READ | MAY_EXEC | MAY_OPEN, | 112 | .acc_mode = MAY_READ | MAY_EXEC | MAY_OPEN, |
113 | .intent = LOOKUP_OPEN | 113 | .intent = LOOKUP_OPEN, |
114 | .lookup_flags = LOOKUP_FOLLOW, | ||
114 | }; | 115 | }; |
115 | 116 | ||
116 | if (IS_ERR(tmp)) | 117 | if (IS_ERR(tmp)) |
117 | goto out; | 118 | goto out; |
118 | 119 | ||
119 | file = do_filp_open(AT_FDCWD, tmp, &uselib_flags, LOOKUP_FOLLOW); | 120 | file = do_filp_open(AT_FDCWD, tmp, &uselib_flags); |
120 | putname(tmp); | 121 | putname(tmp); |
121 | error = PTR_ERR(file); | 122 | error = PTR_ERR(file); |
122 | if (IS_ERR(file)) | 123 | if (IS_ERR(file)) |
@@ -756,10 +757,11 @@ struct file *open_exec(const char *name) | |||
756 | static const struct open_flags open_exec_flags = { | 757 | static const struct open_flags open_exec_flags = { |
757 | .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC, | 758 | .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC, |
758 | .acc_mode = MAY_EXEC | MAY_OPEN, | 759 | .acc_mode = MAY_EXEC | MAY_OPEN, |
759 | .intent = LOOKUP_OPEN | 760 | .intent = LOOKUP_OPEN, |
761 | .lookup_flags = LOOKUP_FOLLOW, | ||
760 | }; | 762 | }; |
761 | 763 | ||
762 | file = do_filp_open(AT_FDCWD, &tmp, &open_exec_flags, LOOKUP_FOLLOW); | 764 | file = do_filp_open(AT_FDCWD, &tmp, &open_exec_flags); |
763 | if (IS_ERR(file)) | 765 | if (IS_ERR(file)) |
764 | goto out; | 766 | goto out; |
765 | 767 | ||