Commit b290ebe2 authored by Heiko Carstens's avatar Heiko Carstens

[CVE-2009-0029] System call wrappers part 04

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent ae1251ab
...@@ -277,7 +277,7 @@ static int acct_on(char *name) ...@@ -277,7 +277,7 @@ static int acct_on(char *name)
* should be written. If the filename is NULL, accounting will be * should be written. If the filename is NULL, accounting will be
* shutdown. * shutdown.
*/ */
asmlinkage long sys_acct(const char __user *name) SYSCALL_DEFINE1(acct, const char __user *, name)
{ {
int error; int error;
......
...@@ -161,7 +161,7 @@ static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, ...@@ -161,7 +161,7 @@ static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp,
* *
* Returns 0 on success and < 0 on error. * Returns 0 on success and < 0 on error.
*/ */
asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr)
{ {
int ret = 0; int ret = 0;
pid_t pid; pid_t pid;
...@@ -235,7 +235,7 @@ asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) ...@@ -235,7 +235,7 @@ asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr)
* *
* Returns 0 on success and < 0 on error. * Returns 0 on success and < 0 on error.
*/ */
asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data) SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data)
{ {
struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S]; struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S];
unsigned i, tocopy; unsigned i, tocopy;
......
...@@ -209,8 +209,7 @@ static int __init proc_execdomains_init(void) ...@@ -209,8 +209,7 @@ static int __init proc_execdomains_init(void)
module_init(proc_execdomains_init); module_init(proc_execdomains_init);
#endif #endif
asmlinkage long SYSCALL_DEFINE1(personality, u_long, personality)
sys_personality(u_long personality)
{ {
u_long old = current->personality; u_long old = current->personality;
......
...@@ -100,7 +100,7 @@ int do_getitimer(int which, struct itimerval *value) ...@@ -100,7 +100,7 @@ int do_getitimer(int which, struct itimerval *value)
return 0; return 0;
} }
asmlinkage long sys_getitimer(int which, struct itimerval __user *value) SYSCALL_DEFINE2(getitimer, int, which, struct itimerval __user *, value)
{ {
int error = -EFAULT; int error = -EFAULT;
struct itimerval get_buffer; struct itimerval get_buffer;
......
...@@ -2434,8 +2434,7 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s ...@@ -2434,8 +2434,7 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s
#ifdef __ARCH_WANT_SYS_SIGPENDING #ifdef __ARCH_WANT_SYS_SIGPENDING
asmlinkage long SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
sys_sigpending(old_sigset_t __user *set)
{ {
return do_sigpending(set, sizeof(*set)); return do_sigpending(set, sizeof(*set));
} }
...@@ -2446,8 +2445,8 @@ sys_sigpending(old_sigset_t __user *set) ...@@ -2446,8 +2445,8 @@ sys_sigpending(old_sigset_t __user *set)
/* Some platforms have their own version with special arguments others /* Some platforms have their own version with special arguments others
support only sys_rt_sigprocmask. */ support only sys_rt_sigprocmask. */
asmlinkage long SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset) old_sigset_t __user *, oset)
{ {
int error; int error;
old_sigset_t old_set, new_set; old_sigset_t old_set, new_set;
......
...@@ -944,7 +944,7 @@ SYSCALL_DEFINE1(times, struct tms __user *, tbuf) ...@@ -944,7 +944,7 @@ SYSCALL_DEFINE1(times, struct tms __user *, tbuf)
* Auch. Had to add the 'did_exec' flag to conform completely to POSIX. * Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
* LBT 04.03.94 * LBT 04.03.94
*/ */
asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid)
{ {
struct task_struct *p; struct task_struct *p;
struct task_struct *group_leader = current->group_leader; struct task_struct *group_leader = current->group_leader;
...@@ -1080,7 +1080,7 @@ SYSCALL_DEFINE1(getsid, pid_t, pid) ...@@ -1080,7 +1080,7 @@ SYSCALL_DEFINE1(getsid, pid_t, pid)
return retval; return retval;
} }
asmlinkage long sys_setsid(void) SYSCALL_DEFINE0(setsid)
{ {
struct task_struct *group_leader = current->group_leader; struct task_struct *group_leader = current->group_leader;
struct pid *sid = task_pid(group_leader); struct pid *sid = task_pid(group_leader);
...@@ -1340,7 +1340,7 @@ SYSCALL_DEFINE2(getgroups, int, gidsetsize, gid_t __user *, grouplist) ...@@ -1340,7 +1340,7 @@ SYSCALL_DEFINE2(getgroups, int, gidsetsize, gid_t __user *, grouplist)
* without another task interfering. * without another task interfering.
*/ */
asmlinkage long sys_setgroups(int gidsetsize, gid_t __user *grouplist) SYSCALL_DEFINE2(setgroups, int, gidsetsize, gid_t __user *, grouplist)
{ {
struct group_info *group_info; struct group_info *group_info;
int retval; int retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment