diff options
author | Al Viro | 2008-07-26 03:33:14 -0400 |
---|---|---|
committer | Al Viro | 2008-07-26 20:53:41 -0400 |
commit | 964bd183624c03680796b63b4ab97ee3905a806a (patch) | |
tree | 801fa25ccd01a7c7bf8ee793ba910edc8ce3f55a /fs/exec.c | |
parent | 516e0cc5646f377ab80fcc2ee639892eccb99853 (diff) |
[PATCH] get rid of __user_path_lookup_open
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c index eca58c29eded..9696bbf0f0b1 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -106,11 +106,17 @@ static inline void put_binfmt(struct linux_binfmt * fmt) */ asmlinkage long sys_uselib(const char __user * library) { - struct file * file; + struct file *file; struct nameidata nd; - int error; - - error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC); + char *tmp = getname(library); + int error = PTR_ERR(tmp); + + if (!IS_ERR(tmp)) { + error = path_lookup_open(AT_FDCWD, tmp, + LOOKUP_FOLLOW, &nd, + FMODE_READ|FMODE_EXEC); + putname(tmp); + } if (error) goto out; |