diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -240,7 +240,7 @@ static inline long do_sys_truncate(const char __user * path, loff_t length) | |||
240 | if (!S_ISREG(inode->i_mode)) | 240 | if (!S_ISREG(inode->i_mode)) |
241 | goto dput_and_out; | 241 | goto dput_and_out; |
242 | 242 | ||
243 | error = permission(inode,MAY_WRITE,&nd); | 243 | error = vfs_permission(&nd, MAY_WRITE); |
244 | if (error) | 244 | if (error) |
245 | goto dput_and_out; | 245 | goto dput_and_out; |
246 | 246 | ||
@@ -394,7 +394,7 @@ asmlinkage long sys_utime(char __user * filename, struct utimbuf __user * times) | |||
394 | goto dput_and_out; | 394 | goto dput_and_out; |
395 | 395 | ||
396 | if (current->fsuid != inode->i_uid && | 396 | if (current->fsuid != inode->i_uid && |
397 | (error = permission(inode,MAY_WRITE,&nd)) != 0) | 397 | (error = vfs_permission(&nd, MAY_WRITE)) != 0) |
398 | goto dput_and_out; | 398 | goto dput_and_out; |
399 | } | 399 | } |
400 | down(&inode->i_sem); | 400 | down(&inode->i_sem); |
@@ -447,7 +447,7 @@ long do_utimes(char __user * filename, struct timeval * times) | |||
447 | goto dput_and_out; | 447 | goto dput_and_out; |
448 | 448 | ||
449 | if (current->fsuid != inode->i_uid && | 449 | if (current->fsuid != inode->i_uid && |
450 | (error = permission(inode,MAY_WRITE,&nd)) != 0) | 450 | (error = vfs_permission(&nd, MAY_WRITE)) != 0) |
451 | goto dput_and_out; | 451 | goto dput_and_out; |
452 | } | 452 | } |
453 | down(&inode->i_sem); | 453 | down(&inode->i_sem); |
@@ -506,7 +506,7 @@ asmlinkage long sys_access(const char __user * filename, int mode) | |||
506 | 506 | ||
507 | res = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); | 507 | res = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd); |
508 | if (!res) { | 508 | if (!res) { |
509 | res = permission(nd.dentry->d_inode, mode, &nd); | 509 | res = vfs_permission(&nd, mode); |
510 | /* SuS v2 requires we report a read only fs too */ | 510 | /* SuS v2 requires we report a read only fs too */ |
511 | if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode) | 511 | if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode) |
512 | && !special_file(nd.dentry->d_inode->i_mode)) | 512 | && !special_file(nd.dentry->d_inode->i_mode)) |
@@ -530,7 +530,7 @@ asmlinkage long sys_chdir(const char __user * filename) | |||
530 | if (error) | 530 | if (error) |
531 | goto out; | 531 | goto out; |
532 | 532 | ||
533 | error = permission(nd.dentry->d_inode,MAY_EXEC,&nd); | 533 | error = vfs_permission(&nd, MAY_EXEC); |
534 | if (error) | 534 | if (error) |
535 | goto dput_and_out; | 535 | goto dput_and_out; |
536 | 536 | ||
@@ -563,7 +563,7 @@ asmlinkage long sys_fchdir(unsigned int fd) | |||
563 | if (!S_ISDIR(inode->i_mode)) | 563 | if (!S_ISDIR(inode->i_mode)) |
564 | goto out_putf; | 564 | goto out_putf; |
565 | 565 | ||
566 | error = permission(inode, MAY_EXEC, NULL); | 566 | error = file_permission(file, MAY_EXEC); |
567 | if (!error) | 567 | if (!error) |
568 | set_fs_pwd(current->fs, mnt, dentry); | 568 | set_fs_pwd(current->fs, mnt, dentry); |
569 | out_putf: | 569 | out_putf: |
@@ -581,7 +581,7 @@ asmlinkage long sys_chroot(const char __user * filename) | |||
581 | if (error) | 581 | if (error) |
582 | goto out; | 582 | goto out; |
583 | 583 | ||
584 | error = permission(nd.dentry->d_inode,MAY_EXEC,&nd); | 584 | error = vfs_permission(&nd, MAY_EXEC); |
585 | if (error) | 585 | if (error) |
586 | goto dput_and_out; | 586 | goto dput_and_out; |
587 | 587 | ||