diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:13 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:23 -0500 |
commit | 257ac264d69017270fbc3cf5536953525db4076c (patch) | |
tree | 4638386ef7a5ac2b5140b055807e973e52c47f4d | |
parent | bdc480e3bef6eb0e7071770834cbdda7e30a5436 (diff) |
[CVE-2009-0029] System call wrappers part 11
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r-- | fs/open.c | 2 | ||||
-rw-r--r-- | fs/stat.c | 20 | ||||
-rw-r--r-- | fs/super.c | 2 |
3 files changed, 14 insertions, 10 deletions
@@ -174,7 +174,7 @@ out: | |||
174 | return error; | 174 | return error; |
175 | } | 175 | } |
176 | 176 | ||
177 | asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, struct statfs64 __user *buf) | 177 | SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, size_t, sz, struct statfs64 __user *, buf) |
178 | { | 178 | { |
179 | struct file * file; | 179 | struct file * file; |
180 | struct statfs64 tmp; | 180 | struct statfs64 tmp; |
@@ -162,7 +162,8 @@ SYSCALL_DEFINE2(stat, char __user *, filename, struct __old_kernel_stat __user * | |||
162 | 162 | ||
163 | return error; | 163 | return error; |
164 | } | 164 | } |
165 | asmlinkage long sys_lstat(char __user * filename, struct __old_kernel_stat __user * statbuf) | 165 | |
166 | SYSCALL_DEFINE2(lstat, char __user *, filename, struct __old_kernel_stat __user *, statbuf) | ||
166 | { | 167 | { |
167 | struct kstat stat; | 168 | struct kstat stat; |
168 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); | 169 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); |
@@ -172,7 +173,8 @@ asmlinkage long sys_lstat(char __user * filename, struct __old_kernel_stat __use | |||
172 | 173 | ||
173 | return error; | 174 | return error; |
174 | } | 175 | } |
175 | asmlinkage long sys_fstat(unsigned int fd, struct __old_kernel_stat __user * statbuf) | 176 | |
177 | SYSCALL_DEFINE2(fstat, unsigned int, fd, struct __old_kernel_stat __user *, statbuf) | ||
176 | { | 178 | { |
177 | struct kstat stat; | 179 | struct kstat stat; |
178 | int error = vfs_fstat(fd, &stat); | 180 | int error = vfs_fstat(fd, &stat); |
@@ -235,7 +237,7 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf) | |||
235 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 237 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
236 | } | 238 | } |
237 | 239 | ||
238 | asmlinkage long sys_newstat(char __user *filename, struct stat __user *statbuf) | 240 | SYSCALL_DEFINE2(newstat, char __user *, filename, struct stat __user *, statbuf) |
239 | { | 241 | { |
240 | struct kstat stat; | 242 | struct kstat stat; |
241 | int error = vfs_stat_fd(AT_FDCWD, filename, &stat); | 243 | int error = vfs_stat_fd(AT_FDCWD, filename, &stat); |
@@ -246,7 +248,7 @@ asmlinkage long sys_newstat(char __user *filename, struct stat __user *statbuf) | |||
246 | return error; | 248 | return error; |
247 | } | 249 | } |
248 | 250 | ||
249 | asmlinkage long sys_newlstat(char __user *filename, struct stat __user *statbuf) | 251 | SYSCALL_DEFINE2(newlstat, char __user *, filename, struct stat __user *, statbuf) |
250 | { | 252 | { |
251 | struct kstat stat; | 253 | struct kstat stat; |
252 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); | 254 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); |
@@ -280,7 +282,7 @@ out: | |||
280 | } | 282 | } |
281 | #endif | 283 | #endif |
282 | 284 | ||
283 | asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf) | 285 | SYSCALL_DEFINE2(newfstat, unsigned int, fd, struct stat __user *, statbuf) |
284 | { | 286 | { |
285 | struct kstat stat; | 287 | struct kstat stat; |
286 | int error = vfs_fstat(fd, &stat); | 288 | int error = vfs_fstat(fd, &stat); |
@@ -365,7 +367,7 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf) | |||
365 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 367 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
366 | } | 368 | } |
367 | 369 | ||
368 | asmlinkage long sys_stat64(char __user * filename, struct stat64 __user * statbuf) | 370 | SYSCALL_DEFINE2(stat64, char __user *, filename, struct stat64 __user *, statbuf) |
369 | { | 371 | { |
370 | struct kstat stat; | 372 | struct kstat stat; |
371 | int error = vfs_stat(filename, &stat); | 373 | int error = vfs_stat(filename, &stat); |
@@ -375,7 +377,8 @@ asmlinkage long sys_stat64(char __user * filename, struct stat64 __user * statbu | |||
375 | 377 | ||
376 | return error; | 378 | return error; |
377 | } | 379 | } |
378 | asmlinkage long sys_lstat64(char __user * filename, struct stat64 __user * statbuf) | 380 | |
381 | SYSCALL_DEFINE2(lstat64, char __user *, filename, struct stat64 __user *, statbuf) | ||
379 | { | 382 | { |
380 | struct kstat stat; | 383 | struct kstat stat; |
381 | int error = vfs_lstat(filename, &stat); | 384 | int error = vfs_lstat(filename, &stat); |
@@ -385,7 +388,8 @@ asmlinkage long sys_lstat64(char __user * filename, struct stat64 __user * statb | |||
385 | 388 | ||
386 | return error; | 389 | return error; |
387 | } | 390 | } |
388 | asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf) | 391 | |
392 | SYSCALL_DEFINE2(fstat64, unsigned long, fd, struct stat64 __user *, statbuf) | ||
389 | { | 393 | { |
390 | struct kstat stat; | 394 | struct kstat stat; |
391 | int error = vfs_fstat(fd, &stat); | 395 | int error = vfs_fstat(fd, &stat); |
diff --git a/fs/super.c b/fs/super.c index ed080c417167..645e5403f2a0 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -544,7 +544,7 @@ rescan: | |||
544 | return NULL; | 544 | return NULL; |
545 | } | 545 | } |
546 | 546 | ||
547 | asmlinkage long sys_ustat(unsigned dev, struct ustat __user * ubuf) | 547 | SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf) |
548 | { | 548 | { |
549 | struct super_block *s; | 549 | struct super_block *s; |
550 | struct ustat tmp; | 550 | struct ustat tmp; |