Skip to content

Commit

Permalink
[CVE-2009-0029] System call wrappers part 04
Browse files Browse the repository at this point in the history
Signed-off-by: Heiko Carstens <[email protected]>
  • Loading branch information
heicarst committed Jan 14, 2009
1 parent ae1251a commit b290ebe
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion kernel/acct.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ static int acct_on(char *name)
* should be written. If the filename is NULL, accounting will be
* shutdown.
*/
asmlinkage long sys_acct(const char __user *name)
SYSCALL_DEFINE1(acct, const char __user *, name)
{
int error;

Expand Down
4 changes: 2 additions & 2 deletions kernel/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
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;
pid_t pid;
Expand Down Expand Up @@ -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.
*/
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];
unsigned i, tocopy;
Expand Down
3 changes: 1 addition & 2 deletions kernel/exec_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ static int __init proc_execdomains_init(void)
module_init(proc_execdomains_init);
#endif

asmlinkage long
sys_personality(u_long personality)
SYSCALL_DEFINE1(personality, u_long, personality)
{
u_long old = current->personality;

Expand Down
2 changes: 1 addition & 1 deletion kernel/itimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int do_getitimer(int which, struct itimerval *value)
return 0;
}

asmlinkage long sys_getitimer(int which, struct itimerval __user *value)
SYSCALL_DEFINE2(getitimer, int, which, struct itimerval __user *, value)
{
int error = -EFAULT;
struct itimerval get_buffer;
Expand Down
7 changes: 3 additions & 4 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2434,8 +2434,7 @@ do_sigaltstack (const stack_t __user *uss, stack_t __user *uoss, unsigned long s

#ifdef __ARCH_WANT_SYS_SIGPENDING

asmlinkage long
sys_sigpending(old_sigset_t __user *set)
SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
{
return do_sigpending(set, sizeof(*set));
}
Expand All @@ -2446,8 +2445,8 @@ sys_sigpending(old_sigset_t __user *set)
/* Some platforms have their own version with special arguments others
support only sys_rt_sigprocmask. */

asmlinkage long
sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset)
SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set,
old_sigset_t __user *, oset)
{
int error;
old_sigset_t old_set, new_set;
Expand Down
6 changes: 3 additions & 3 deletions kernel/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@ SYSCALL_DEFINE1(times, struct tms __user *, tbuf)
* Auch. Had to add the 'did_exec' flag to conform completely to POSIX.
* 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 *group_leader = current->group_leader;
Expand Down Expand Up @@ -1080,7 +1080,7 @@ SYSCALL_DEFINE1(getsid, pid_t, pid)
return retval;
}

asmlinkage long sys_setsid(void)
SYSCALL_DEFINE0(setsid)
{
struct task_struct *group_leader = current->group_leader;
struct pid *sid = task_pid(group_leader);
Expand Down Expand Up @@ -1340,7 +1340,7 @@ SYSCALL_DEFINE2(getgroups, int, gidsetsize, gid_t __user *, grouplist)
* 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;
int retval;
Expand Down

0 comments on commit b290ebe

Please sign in to comment.