diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -123,7 +123,7 @@ SYSCALL_DEFINE1(uselib, const char __user *, library) | |||
123 | goto out; | 123 | goto out; |
124 | 124 | ||
125 | error = -EINVAL; | 125 | error = -EINVAL; |
126 | if (!S_ISREG(file->f_path.dentry->d_inode->i_mode)) | 126 | if (!S_ISREG(file_inode(file)->i_mode)) |
127 | goto exit; | 127 | goto exit; |
128 | 128 | ||
129 | error = -EACCES; | 129 | error = -EACCES; |
@@ -355,7 +355,7 @@ static bool valid_arg_len(struct linux_binprm *bprm, long len) | |||
355 | * flags, permissions, and offset, so we use temporary values. We'll update | 355 | * flags, permissions, and offset, so we use temporary values. We'll update |
356 | * them later in setup_arg_pages(). | 356 | * them later in setup_arg_pages(). |
357 | */ | 357 | */ |
358 | int bprm_mm_init(struct linux_binprm *bprm) | 358 | static int bprm_mm_init(struct linux_binprm *bprm) |
359 | { | 359 | { |
360 | int err; | 360 | int err; |
361 | struct mm_struct *mm = NULL; | 361 | struct mm_struct *mm = NULL; |
@@ -764,7 +764,7 @@ struct file *open_exec(const char *name) | |||
764 | goto out; | 764 | goto out; |
765 | 765 | ||
766 | err = -EACCES; | 766 | err = -EACCES; |
767 | if (!S_ISREG(file->f_path.dentry->d_inode->i_mode)) | 767 | if (!S_ISREG(file_inode(file)->i_mode)) |
768 | goto exit; | 768 | goto exit; |
769 | 769 | ||
770 | if (file->f_path.mnt->mnt_flags & MNT_NOEXEC) | 770 | if (file->f_path.mnt->mnt_flags & MNT_NOEXEC) |
@@ -1098,7 +1098,7 @@ EXPORT_SYMBOL(flush_old_exec); | |||
1098 | 1098 | ||
1099 | void would_dump(struct linux_binprm *bprm, struct file *file) | 1099 | void would_dump(struct linux_binprm *bprm, struct file *file) |
1100 | { | 1100 | { |
1101 | if (inode_permission(file->f_path.dentry->d_inode, MAY_READ) < 0) | 1101 | if (inode_permission(file_inode(file), MAY_READ) < 0) |
1102 | bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP; | 1102 | bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP; |
1103 | } | 1103 | } |
1104 | EXPORT_SYMBOL(would_dump); | 1104 | EXPORT_SYMBOL(would_dump); |
@@ -1270,7 +1270,7 @@ static int check_unsafe_exec(struct linux_binprm *bprm) | |||
1270 | int prepare_binprm(struct linux_binprm *bprm) | 1270 | int prepare_binprm(struct linux_binprm *bprm) |
1271 | { | 1271 | { |
1272 | umode_t mode; | 1272 | umode_t mode; |
1273 | struct inode * inode = bprm->file->f_path.dentry->d_inode; | 1273 | struct inode * inode = file_inode(bprm->file); |
1274 | int retval; | 1274 | int retval; |
1275 | 1275 | ||
1276 | mode = inode->i_mode; | 1276 | mode = inode->i_mode; |