aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:14:19 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2009-01-14 08:15:25 -0500
commitca013e945b1ba5828b151ee646946f1297b67a4c (patch)
treed277caa7b4581492ab9c4bb42912de3b3d931f50 /fs/open.c
parent002c8976ee537724b20a5e179d9b349309438836 (diff)
[CVE-2009-0029] System call wrappers part 17
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/open.c b/fs/open.c
index 293408b1c165..4a6d80064746 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -517,7 +517,7 @@ out:
517 return res; 517 return res;
518} 518}
519 519
520asmlinkage long sys_access(const char __user *filename, int mode) 520SYSCALL_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
691asmlinkage long sys_chown(const char __user * filename, uid_t user, gid_t group) 691SYSCALL_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
735asmlinkage long sys_lchown(const char __user * filename, uid_t user, gid_t group) 735SYSCALL_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 754SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group)
755asmlinkage 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
1051asmlinkage long sys_open(const char __user *filename, int flags, int mode) 1050SYSCALL_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 */
1120asmlinkage long sys_close(unsigned int fd) 1119SYSCALL_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
1154EXPORT_SYMBOL(sys_close); 1152EXPORT_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 */
1160asmlinkage long sys_vhangup(void) 1158SYSCALL_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();