Commit 20f37034 authored by Heiko Carstens's avatar Heiko Carstens

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

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 3cdad428
......@@ -187,7 +187,8 @@ efault:
return -EFAULT;
}
asmlinkage long sys_getdents(unsigned int fd, struct linux_dirent __user * dirent, unsigned int count)
SYSCALL_DEFINE3(getdents, unsigned int, fd,
struct linux_dirent __user *, dirent, unsigned int, count)
{
struct file * file;
struct linux_dirent __user * lastdirent;
......@@ -268,7 +269,8 @@ efault:
return -EFAULT;
}
asmlinkage long sys_getdents64(unsigned int fd, struct linux_dirent64 __user * dirent, unsigned int count)
SYSCALL_DEFINE3(getdents64, unsigned int, fd,
struct linux_dirent64 __user *, dirent, unsigned int, count)
{
struct file * file;
struct linux_dirent64 __user * lastdirent;
......
......@@ -1356,7 +1356,7 @@ out_fd1:
* the protocol layer (having also checked the address is ok).
*/
asmlinkage long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen)
SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen)
{
struct socket *sock;
struct sockaddr_storage address;
......@@ -1418,8 +1418,8 @@ asmlinkage long sys_listen(int fd, int backlog)
* clean when we restucture accept also.
*/
asmlinkage long sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen, int flags)
SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
int __user *, upeer_addrlen, int, flags)
{
struct socket *sock, *newsock;
struct file *newfile;
......@@ -1502,8 +1502,8 @@ out_fd:
goto out_put;
}
asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr,
int __user *upeer_addrlen)
SYSCALL_DEFINE3(accept, int, fd, struct sockaddr __user *, upeer_sockaddr,
int __user *, upeer_addrlen)
{
return sys_accept4(fd, upeer_sockaddr, upeer_addrlen, 0);
}
......@@ -1520,8 +1520,8 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr,
* include the -EINPROGRESS status for such sockets.
*/
asmlinkage long sys_connect(int fd, struct sockaddr __user *uservaddr,
int addrlen)
SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr,
int, addrlen)
{
struct socket *sock;
struct sockaddr_storage address;
......@@ -1552,8 +1552,8 @@ out:
* name to user space.
*/
asmlinkage long sys_getsockname(int fd, struct sockaddr __user *usockaddr,
int __user *usockaddr_len)
SYSCALL_DEFINE3(getsockname, int, fd, struct sockaddr __user *, usockaddr,
int __user *, usockaddr_len)
{
struct socket *sock;
struct sockaddr_storage address;
......@@ -1583,8 +1583,8 @@ out:
* name to user space.
*/
asmlinkage long sys_getpeername(int fd, struct sockaddr __user *usockaddr,
int __user *usockaddr_len)
SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr,
int __user *, usockaddr_len)
{
struct socket *sock;
struct sockaddr_storage address;
......@@ -1725,8 +1725,8 @@ asmlinkage long sys_recv(int fd, void __user *ubuf, size_t size,
* to pass the user mode parameter for the protocols to sort out.
*/
asmlinkage long sys_setsockopt(int fd, int level, int optname,
char __user *optval, int optlen)
SYSCALL_DEFINE5(setsockopt, int, fd, int, level, int, optname,
char __user *, optval, int, optlen)
{
int err, fput_needed;
struct socket *sock;
......@@ -1759,8 +1759,8 @@ out_put:
* to pass a user mode parameter for the protocols to sort out.
*/
asmlinkage long sys_getsockopt(int fd, int level, int optname,
char __user *optval, int __user *optlen)
SYSCALL_DEFINE5(getsockopt, int, fd, int, level, int, optname,
char __user *, optval, int __user *, optlen)
{
int err, fput_needed;
struct socket *sock;
......
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