aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo')
-rw-r--r--security/tomoyo/audit.c4
-rw-r--r--security/tomoyo/common.h2
-rw-r--r--security/tomoyo/realpath.c9
-rw-r--r--security/tomoyo/securityfs_if.c2
-rw-r--r--security/tomoyo/tomoyo.c15
5 files changed, 11 insertions, 21 deletions
diff --git a/security/tomoyo/audit.c b/security/tomoyo/audit.c
index 075c3a6d1649..5ca47ea3049f 100644
--- a/security/tomoyo/audit.c
+++ b/security/tomoyo/audit.c
@@ -112,7 +112,7 @@ out:
112 * 112 *
113 * Returns file type string. 113 * Returns file type string.
114 */ 114 */
115static inline const char *tomoyo_filetype(const mode_t mode) 115static inline const char *tomoyo_filetype(const umode_t mode)
116{ 116{
117 switch (mode & S_IFMT) { 117 switch (mode & S_IFMT) {
118 case S_IFREG: 118 case S_IFREG:
@@ -180,7 +180,7 @@ static char *tomoyo_print_header(struct tomoyo_request_info *r)
180 for (i = 0; i < TOMOYO_MAX_PATH_STAT; i++) { 180 for (i = 0; i < TOMOYO_MAX_PATH_STAT; i++) {
181 struct tomoyo_mini_stat *stat; 181 struct tomoyo_mini_stat *stat;
182 unsigned int dev; 182 unsigned int dev;
183 mode_t mode; 183 umode_t mode;
184 if (!obj->stat_valid[i]) 184 if (!obj->stat_valid[i])
185 continue; 185 continue;
186 stat = &obj->stat[i]; 186 stat = &obj->stat[i];
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h
index ed311d7a8ce0..deeab7be5b97 100644
--- a/security/tomoyo/common.h
+++ b/security/tomoyo/common.h
@@ -564,7 +564,7 @@ struct tomoyo_mini_stat {
564 uid_t uid; 564 uid_t uid;
565 gid_t gid; 565 gid_t gid;
566 ino_t ino; 566 ino_t ino;
567 mode_t mode; 567 umode_t mode;
568 dev_t dev; 568 dev_t dev;
569 dev_t rdev; 569 dev_t rdev;
570}; 570};
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index d9f3ced8756e..80a09c37cac8 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -4,15 +4,8 @@
4 * Copyright (C) 2005-2011 NTT DATA CORPORATION 4 * Copyright (C) 2005-2011 NTT DATA CORPORATION
5 */ 5 */
6 6
7#include <linux/types.h>
8#include <linux/mount.h>
9#include <linux/mnt_namespace.h>
10#include <linux/fs_struct.h>
11#include <linux/magic.h>
12#include <linux/slab.h>
13#include <net/sock.h>
14#include "common.h" 7#include "common.h"
15#include "../../fs/internal.h" 8#include <linux/magic.h>
16 9
17/** 10/**
18 * tomoyo_encode2 - Encode binary string to ascii string. 11 * tomoyo_encode2 - Encode binary string to ascii string.
diff --git a/security/tomoyo/securityfs_if.c b/security/tomoyo/securityfs_if.c
index 2672ac4f3beb..482b2a5f48f0 100644
--- a/security/tomoyo/securityfs_if.c
+++ b/security/tomoyo/securityfs_if.c
@@ -224,7 +224,7 @@ static const struct file_operations tomoyo_operations = {
224 * 224 *
225 * Returns nothing. 225 * Returns nothing.
226 */ 226 */
227static void __init tomoyo_create_entry(const char *name, const mode_t mode, 227static void __init tomoyo_create_entry(const char *name, const umode_t mode,
228 struct dentry *parent, const u8 key) 228 struct dentry *parent, const u8 key)
229{ 229{
230 securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key, 230 securityfs_create_file(name, mode, parent, ((u8 *) NULL) + key,
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index 4b327b691745..620d37c159a3 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -186,7 +186,7 @@ static int tomoyo_path_unlink(struct path *parent, struct dentry *dentry)
186 * Returns 0 on success, negative value otherwise. 186 * Returns 0 on success, negative value otherwise.
187 */ 187 */
188static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry, 188static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry,
189 int mode) 189 umode_t mode)
190{ 190{
191 struct path path = { parent->mnt, dentry }; 191 struct path path = { parent->mnt, dentry };
192 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path, 192 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path,
@@ -234,7 +234,7 @@ static int tomoyo_path_symlink(struct path *parent, struct dentry *dentry,
234 * Returns 0 on success, negative value otherwise. 234 * Returns 0 on success, negative value otherwise.
235 */ 235 */
236static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry, 236static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry,
237 int mode, unsigned int dev) 237 umode_t mode, unsigned int dev)
238{ 238{
239 struct path path = { parent->mnt, dentry }; 239 struct path path = { parent->mnt, dentry };
240 int type = TOMOYO_TYPE_CREATE; 240 int type = TOMOYO_TYPE_CREATE;
@@ -353,17 +353,14 @@ static int tomoyo_file_ioctl(struct file *file, unsigned int cmd,
353/** 353/**
354 * tomoyo_path_chmod - Target for security_path_chmod(). 354 * tomoyo_path_chmod - Target for security_path_chmod().
355 * 355 *
356 * @dentry: Pointer to "struct dentry". 356 * @path: Pointer to "struct path".
357 * @mnt: Pointer to "struct vfsmount". 357 * @mode: DAC permission mode.
358 * @mode: DAC permission mode.
359 * 358 *
360 * Returns 0 on success, negative value otherwise. 359 * Returns 0 on success, negative value otherwise.
361 */ 360 */
362static int tomoyo_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 361static int tomoyo_path_chmod(struct path *path, umode_t mode)
363 mode_t mode)
364{ 362{
365 struct path path = { mnt, dentry }; 363 return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path,
366 return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, &path,
367 mode & S_IALLUGO); 364 mode & S_IALLUGO);
368} 365}
369 366