diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-08 19:28:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:24:32 -0400 |
commit | 3f7036a071b879da017eddaedb10fba173fdf1ff (patch) | |
tree | 2160617c1812915583de79d2ee85913eb247e2a4 /security/tomoyo | |
parent | 2247386243747500977dc92b1ab833401303f9f0 (diff) |
switch security_inode_getattr() to struct path *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security/tomoyo')
-rw-r--r-- | security/tomoyo/common.h | 2 | ||||
-rw-r--r-- | security/tomoyo/file.c | 4 | ||||
-rw-r--r-- | security/tomoyo/tomoyo.c | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index 6627102c24af..f9c9fb1d56b4 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -978,7 +978,7 @@ int tomoyo_path2_perm(const u8 operation, struct path *path1, | |||
978 | struct path *path2); | 978 | struct path *path2); |
979 | int tomoyo_path_number_perm(const u8 operation, struct path *path, | 979 | int tomoyo_path_number_perm(const u8 operation, struct path *path, |
980 | unsigned long number); | 980 | unsigned long number); |
981 | int tomoyo_path_perm(const u8 operation, struct path *path, | 981 | int tomoyo_path_perm(const u8 operation, const struct path *path, |
982 | const char *target); | 982 | const char *target); |
983 | unsigned int tomoyo_poll_control(struct file *file, poll_table *wait); | 983 | unsigned int tomoyo_poll_control(struct file *file, poll_table *wait); |
984 | unsigned int tomoyo_poll_log(struct file *file, poll_table *wait); | 984 | unsigned int tomoyo_poll_log(struct file *file, poll_table *wait); |
diff --git a/security/tomoyo/file.c b/security/tomoyo/file.c index c151a1869597..2367b100cc62 100644 --- a/security/tomoyo/file.c +++ b/security/tomoyo/file.c | |||
@@ -145,7 +145,7 @@ static void tomoyo_add_slash(struct tomoyo_path_info *buf) | |||
145 | * | 145 | * |
146 | * Returns true on success, false otherwise. | 146 | * Returns true on success, false otherwise. |
147 | */ | 147 | */ |
148 | static bool tomoyo_get_realpath(struct tomoyo_path_info *buf, struct path *path) | 148 | static bool tomoyo_get_realpath(struct tomoyo_path_info *buf, const struct path *path) |
149 | { | 149 | { |
150 | buf->name = tomoyo_realpath_from_path(path); | 150 | buf->name = tomoyo_realpath_from_path(path); |
151 | if (buf->name) { | 151 | if (buf->name) { |
@@ -782,7 +782,7 @@ int tomoyo_check_open_permission(struct tomoyo_domain_info *domain, | |||
782 | * | 782 | * |
783 | * Returns 0 on success, negative value otherwise. | 783 | * Returns 0 on success, negative value otherwise. |
784 | */ | 784 | */ |
785 | int tomoyo_path_perm(const u8 operation, struct path *path, const char *target) | 785 | int tomoyo_path_perm(const u8 operation, const struct path *path, const char *target) |
786 | { | 786 | { |
787 | struct tomoyo_request_info r; | 787 | struct tomoyo_request_info r; |
788 | struct tomoyo_obj_info obj = { | 788 | struct tomoyo_obj_info obj = { |
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index f0b756e27fed..57c88d52ffa5 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c | |||
@@ -144,10 +144,9 @@ static int tomoyo_bprm_check_security(struct linux_binprm *bprm) | |||
144 | * | 144 | * |
145 | * Returns 0 on success, negative value otherwise. | 145 | * Returns 0 on success, negative value otherwise. |
146 | */ | 146 | */ |
147 | static int tomoyo_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) | 147 | static int tomoyo_inode_getattr(const struct path *path) |
148 | { | 148 | { |
149 | struct path path = { mnt, dentry }; | 149 | return tomoyo_path_perm(TOMOYO_TYPE_GETATTR, path, NULL); |
150 | return tomoyo_path_perm(TOMOYO_TYPE_GETATTR, &path, NULL); | ||
151 | } | 150 | } |
152 | 151 | ||
153 | /** | 152 | /** |