PCI: handle positive error codes
[cascardo/linux.git] / security / tomoyo / tomoyo.c
index bbe0042..95d3f95 100644 (file)
@@ -3,10 +3,7 @@
  *
  * LSM hooks for TOMOYO Linux.
  *
- * Copyright (C) 2005-2009  NTT DATA CORPORATION
- *
- * Version: 2.2.0   2009/04/01
- *
+ * Copyright (C) 2005-2010  NTT DATA CORPORATION
  */
 
 #include <linux/security.h>
@@ -96,8 +93,7 @@ static int tomoyo_bprm_check_security(struct linux_binprm *bprm)
        return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY);
 }
 
-static int tomoyo_path_truncate(struct path *path, loff_t length,
-                               unsigned int time_attrs)
+static int tomoyo_path_truncate(struct path *path)
 {
        return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path);
 }
@@ -146,7 +142,7 @@ static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry,
        default:
                goto no_dev;
        }
-       return tomoyo_path_number3_perm(type, &path, perm, dev);
+       return tomoyo_mkdev_perm(type, &path, perm, dev);
  no_dev:
        switch (mode & S_IFMT) {
        case S_IFIFO:
@@ -226,7 +222,7 @@ static int tomoyo_path_chroot(struct path *path)
 static int tomoyo_sb_mount(char *dev_name, struct path *path,
                           char *type, unsigned long flags, void *data)
 {
-       return tomoyo_path_perm(TOMOYO_TYPE_MOUNT, path);
+       return tomoyo_mount_permission(dev_name, path, type, flags, data);
 }
 
 static int tomoyo_sb_umount(struct vfsmount *mnt, int flags)
@@ -286,7 +282,7 @@ static int __init tomoyo_init(void)
                panic("Failure registering TOMOYO Linux");
        printk(KERN_INFO "TOMOYO Linux initialized\n");
        cred->security = &tomoyo_kernel_domain;
-       tomoyo_realpath_init();
+       tomoyo_mm_init();
        return 0;
 }