diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:17 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:24 -0500 |
commit | a26eab2400f0477bfac0255600552394855016f7 (patch) | |
tree | f5554eddf4928cc83e572c15c0b314daaa7cba66 /fs | |
parent | 3480b25743cb7404928d57efeaa3d085708b04c2 (diff) |
[CVE-2009-0029] System call wrappers part 15
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fcntl.c | 11 | ||||
-rw-r--r-- | fs/ioctl.c | 2 | ||||
-rw-r--r-- | fs/namei.c | 2 | ||||
-rw-r--r-- | fs/open.c | 4 |
4 files changed, 10 insertions, 9 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index cdc141946724..bd215cc791da 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -50,7 +50,7 @@ static int get_close_on_exec(unsigned int fd) | |||
50 | return res; | 50 | return res; |
51 | } | 51 | } |
52 | 52 | ||
53 | asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags) | 53 | SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags) |
54 | { | 54 | { |
55 | int err = -EBADF; | 55 | int err = -EBADF; |
56 | struct file * file, *tofree; | 56 | struct file * file, *tofree; |
@@ -113,7 +113,7 @@ out_unlock: | |||
113 | return err; | 113 | return err; |
114 | } | 114 | } |
115 | 115 | ||
116 | asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd) | 116 | SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd) |
117 | { | 117 | { |
118 | if (unlikely(newfd == oldfd)) { /* corner case */ | 118 | if (unlikely(newfd == oldfd)) { /* corner case */ |
119 | struct files_struct *files = current->files; | 119 | struct files_struct *files = current->files; |
@@ -126,7 +126,7 @@ asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd) | |||
126 | return sys_dup3(oldfd, newfd, 0); | 126 | return sys_dup3(oldfd, newfd, 0); |
127 | } | 127 | } |
128 | 128 | ||
129 | asmlinkage long sys_dup(unsigned int fildes) | 129 | SYSCALL_DEFINE1(dup, unsigned int, fildes) |
130 | { | 130 | { |
131 | int ret = -EBADF; | 131 | int ret = -EBADF; |
132 | struct file *file = fget(fildes); | 132 | struct file *file = fget(fildes); |
@@ -335,7 +335,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, | |||
335 | return err; | 335 | return err; |
336 | } | 336 | } |
337 | 337 | ||
338 | asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) | 338 | SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) |
339 | { | 339 | { |
340 | struct file *filp; | 340 | struct file *filp; |
341 | long err = -EBADF; | 341 | long err = -EBADF; |
@@ -358,7 +358,8 @@ out: | |||
358 | } | 358 | } |
359 | 359 | ||
360 | #if BITS_PER_LONG == 32 | 360 | #if BITS_PER_LONG == 32 |
361 | asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) | 361 | SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, |
362 | unsigned long, arg) | ||
362 | { | 363 | { |
363 | struct file * filp; | 364 | struct file * filp; |
364 | long err; | 365 | long err; |
diff --git a/fs/ioctl.c b/fs/ioctl.c index 20b0a8a24c6b..240ec63984cb 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c | |||
@@ -542,7 +542,7 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | |||
542 | return error; | 542 | return error; |
543 | } | 543 | } |
544 | 544 | ||
545 | asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | 545 | SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) |
546 | { | 546 | { |
547 | struct file *filp; | 547 | struct file *filp; |
548 | int error = -EBADF; | 548 | int error = -EBADF; |
diff --git a/fs/namei.c b/fs/namei.c index 43fa25259728..00c4f37a0391 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2718,7 +2718,7 @@ exit: | |||
2718 | return error; | 2718 | return error; |
2719 | } | 2719 | } |
2720 | 2720 | ||
2721 | asmlinkage long sys_rename(const char __user *oldname, const char __user *newname) | 2721 | SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newname) |
2722 | { | 2722 | { |
2723 | return sys_renameat(AT_FDCWD, oldname, AT_FDCWD, newname); | 2723 | return sys_renameat(AT_FDCWD, oldname, AT_FDCWD, newname); |
2724 | } | 2724 | } |
@@ -594,7 +594,7 @@ out: | |||
594 | return error; | 594 | return error; |
595 | } | 595 | } |
596 | 596 | ||
597 | asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) | 597 | SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode) |
598 | { | 598 | { |
599 | struct inode * inode; | 599 | struct inode * inode; |
600 | struct dentry * dentry; | 600 | struct dentry * dentry; |
@@ -658,7 +658,7 @@ out: | |||
658 | return error; | 658 | return error; |
659 | } | 659 | } |
660 | 660 | ||
661 | asmlinkage long sys_chmod(const char __user *filename, mode_t mode) | 661 | SYSCALL_DEFINE2(chmod, const char __user *, filename, mode_t, mode) |
662 | { | 662 | { |
663 | return sys_fchmodat(AT_FDCWD, filename, mode); | 663 | return sys_fchmodat(AT_FDCWD, filename, mode); |
664 | } | 664 | } |