Skip to content

Commit

Permalink
[CVE-2009-0029] System call wrappers part 12
Browse files Browse the repository at this point in the history
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
  • Loading branch information
heicarst committed Jan 14, 2009
1 parent 257ac26 commit 64fd1de
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value,
return error;
}

asmlinkage long
sys_setxattr(const char __user *pathname, const char __user *name,
const void __user *value, size_t size, int flags)
SYSCALL_DEFINE5(setxattr, const char __user *, pathname,
const char __user *, name, const void __user *, value,
size_t, size, int, flags)
{
struct path path;
int error;
Expand All @@ -270,9 +270,9 @@ sys_setxattr(const char __user *pathname, const char __user *name,
return error;
}

asmlinkage long
sys_lsetxattr(const char __user *pathname, const char __user *name,
const void __user *value, size_t size, int flags)
SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname,
const char __user *, name, const void __user *, value,
size_t, size, int, flags)
{
struct path path;
int error;
Expand All @@ -289,9 +289,8 @@ sys_lsetxattr(const char __user *pathname, const char __user *name,
return error;
}

asmlinkage long
sys_fsetxattr(int fd, const char __user *name, const void __user *value,
size_t size, int flags)
SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
const void __user *,value, size_t, size, int, flags)
{
struct file *f;
struct dentry *dentry;
Expand Down Expand Up @@ -349,9 +348,8 @@ getxattr(struct dentry *d, const char __user *name, void __user *value,
return error;
}

asmlinkage long
sys_getxattr(const char __user *pathname, const char __user *name,
void __user *value, size_t size)
SYSCALL_DEFINE4(getxattr, const char __user *, pathname,
const char __user *, name, void __user *, value, size_t, size)
{
struct path path;
ssize_t error;
Expand All @@ -364,9 +362,8 @@ sys_getxattr(const char __user *pathname, const char __user *name,
return error;
}

asmlinkage long
sys_lgetxattr(const char __user *pathname, const char __user *name, void __user *value,
size_t size)
SYSCALL_DEFINE4(lgetxattr, const char __user *, pathname,
const char __user *, name, void __user *, value, size_t, size)
{
struct path path;
ssize_t error;
Expand All @@ -379,8 +376,8 @@ sys_lgetxattr(const char __user *pathname, const char __user *name, void __user
return error;
}

asmlinkage long
sys_fgetxattr(int fd, const char __user *name, void __user *value, size_t size)
SYSCALL_DEFINE4(fgetxattr, int, fd, const char __user *, name,
void __user *, value, size_t, size)
{
struct file *f;
ssize_t error = -EBADF;
Expand Down Expand Up @@ -424,8 +421,8 @@ listxattr(struct dentry *d, char __user *list, size_t size)
return error;
}

asmlinkage long
sys_listxattr(const char __user *pathname, char __user *list, size_t size)
SYSCALL_DEFINE3(listxattr, const char __user *, pathname, char __user *, list,
size_t, size)
{
struct path path;
ssize_t error;
Expand All @@ -438,8 +435,8 @@ sys_listxattr(const char __user *pathname, char __user *list, size_t size)
return error;
}

asmlinkage long
sys_llistxattr(const char __user *pathname, char __user *list, size_t size)
SYSCALL_DEFINE3(llistxattr, const char __user *, pathname, char __user *, list,
size_t, size)
{
struct path path;
ssize_t error;
Expand All @@ -452,8 +449,7 @@ sys_llistxattr(const char __user *pathname, char __user *list, size_t size)
return error;
}

asmlinkage long
sys_flistxattr(int fd, char __user *list, size_t size)
SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)
{
struct file *f;
ssize_t error = -EBADF;
Expand Down Expand Up @@ -485,8 +481,8 @@ removexattr(struct dentry *d, const char __user *name)
return vfs_removexattr(d, kname);
}

asmlinkage long
sys_removexattr(const char __user *pathname, const char __user *name)
SYSCALL_DEFINE2(removexattr, const char __user *, pathname,
const char __user *, name)
{
struct path path;
int error;
Expand Down

0 comments on commit 64fd1de

Please sign in to comment.