diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:19 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:25 -0500 |
commit | ca013e945b1ba5828b151ee646946f1297b67a4c (patch) | |
tree | d277caa7b4581492ab9c4bb42912de3b3d931f50 | |
parent | 002c8976ee537724b20a5e179d9b349309438836 (diff) |
[CVE-2009-0029] System call wrappers part 17
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r-- | fs/open.c | 16 | ||||
-rw-r--r-- | kernel/uid16.c | 6 |
2 files changed, 10 insertions, 12 deletions
@@ -517,7 +517,7 @@ out: | |||
517 | return res; | 517 | return res; |
518 | } | 518 | } |
519 | 519 | ||
520 | asmlinkage long sys_access(const char __user *filename, int mode) | 520 | SYSCALL_DEFINE2(access, const char __user *, filename, int, mode) |
521 | { | 521 | { |
522 | return sys_faccessat(AT_FDCWD, filename, mode); | 522 | return sys_faccessat(AT_FDCWD, filename, mode); |
523 | } | 523 | } |
@@ -688,7 +688,7 @@ static int chown_common(struct dentry * dentry, uid_t user, gid_t group) | |||
688 | return error; | 688 | return error; |
689 | } | 689 | } |
690 | 690 | ||
691 | asmlinkage long sys_chown(const char __user * filename, uid_t user, gid_t group) | 691 | SYSCALL_DEFINE3(chown, const char __user *, filename, uid_t, user, gid_t, group) |
692 | { | 692 | { |
693 | struct path path; | 693 | struct path path; |
694 | int error; | 694 | int error; |
@@ -732,7 +732,7 @@ out: | |||
732 | return error; | 732 | return error; |
733 | } | 733 | } |
734 | 734 | ||
735 | asmlinkage long sys_lchown(const char __user * filename, uid_t user, gid_t group) | 735 | SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group) |
736 | { | 736 | { |
737 | struct path path; | 737 | struct path path; |
738 | int error; | 738 | int error; |
@@ -751,8 +751,7 @@ out: | |||
751 | return error; | 751 | return error; |
752 | } | 752 | } |
753 | 753 | ||
754 | 754 | SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) | |
755 | asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group) | ||
756 | { | 755 | { |
757 | struct file * file; | 756 | struct file * file; |
758 | int error = -EBADF; | 757 | int error = -EBADF; |
@@ -1048,7 +1047,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode) | |||
1048 | return fd; | 1047 | return fd; |
1049 | } | 1048 | } |
1050 | 1049 | ||
1051 | asmlinkage long sys_open(const char __user *filename, int flags, int mode) | 1050 | SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode) |
1052 | { | 1051 | { |
1053 | long ret; | 1052 | long ret; |
1054 | 1053 | ||
@@ -1117,7 +1116,7 @@ EXPORT_SYMBOL(filp_close); | |||
1117 | * releasing the fd. This ensures that one clone task can't release | 1116 | * releasing the fd. This ensures that one clone task can't release |
1118 | * an fd while another clone is opening it. | 1117 | * an fd while another clone is opening it. |
1119 | */ | 1118 | */ |
1120 | asmlinkage long sys_close(unsigned int fd) | 1119 | SYSCALL_DEFINE1(close, unsigned int, fd) |
1121 | { | 1120 | { |
1122 | struct file * filp; | 1121 | struct file * filp; |
1123 | struct files_struct *files = current->files; | 1122 | struct files_struct *files = current->files; |
@@ -1150,14 +1149,13 @@ out_unlock: | |||
1150 | spin_unlock(&files->file_lock); | 1149 | spin_unlock(&files->file_lock); |
1151 | return -EBADF; | 1150 | return -EBADF; |
1152 | } | 1151 | } |
1153 | |||
1154 | EXPORT_SYMBOL(sys_close); | 1152 | EXPORT_SYMBOL(sys_close); |
1155 | 1153 | ||
1156 | /* | 1154 | /* |
1157 | * This routine simulates a hangup on the tty, to arrange that users | 1155 | * This routine simulates a hangup on the tty, to arrange that users |
1158 | * are given clean terminals at login time. | 1156 | * are given clean terminals at login time. |
1159 | */ | 1157 | */ |
1160 | asmlinkage long sys_vhangup(void) | 1158 | SYSCALL_DEFINE0(vhangup) |
1161 | { | 1159 | { |
1162 | if (capable(CAP_SYS_TTY_CONFIG)) { | 1160 | if (capable(CAP_SYS_TTY_CONFIG)) { |
1163 | tty_vhangup_self(); | 1161 | tty_vhangup_self(); |
diff --git a/kernel/uid16.c b/kernel/uid16.c index 2460c3199b5a..37f48c049a2a 100644 --- a/kernel/uid16.c +++ b/kernel/uid16.c | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
19 | 19 | ||
20 | asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group) | 20 | SYSCALL_DEFINE3(chown16, const char __user *, filename, old_uid_t, user, old_gid_t, group) |
21 | { | 21 | { |
22 | long ret = sys_chown(filename, low2highuid(user), low2highgid(group)); | 22 | long ret = sys_chown(filename, low2highuid(user), low2highgid(group)); |
23 | /* avoid REGPARM breakage on x86: */ | 23 | /* avoid REGPARM breakage on x86: */ |
@@ -25,7 +25,7 @@ asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gi | |||
25 | return ret; | 25 | return ret; |
26 | } | 26 | } |
27 | 27 | ||
28 | asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group) | 28 | SYSCALL_DEFINE3(lchown16, const char __user *, filename, old_uid_t, user, old_gid_t, group) |
29 | { | 29 | { |
30 | long ret = sys_lchown(filename, low2highuid(user), low2highgid(group)); | 30 | long ret = sys_lchown(filename, low2highuid(user), low2highgid(group)); |
31 | /* avoid REGPARM breakage on x86: */ | 31 | /* avoid REGPARM breakage on x86: */ |
@@ -33,7 +33,7 @@ asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_g | |||
33 | return ret; | 33 | return ret; |
34 | } | 34 | } |
35 | 35 | ||
36 | asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) | 36 | SYSCALL_DEFINE3(fchown16, unsigned int, fd, old_uid_t, user, old_gid_t, group) |
37 | { | 37 | { |
38 | long ret = sys_fchown(fd, low2highuid(user), low2highgid(group)); | 38 | long ret = sys_fchown(fd, low2highuid(user), low2highgid(group)); |
39 | /* avoid REGPARM breakage on x86: */ | 39 | /* avoid REGPARM breakage on x86: */ |