diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-08 19:24:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:24:31 -0400 |
commit | 2247386243747500977dc92b1ab833401303f9f0 (patch) | |
tree | 8e04e1976f4e97e9ebb998dd60410ade499af4d8 /security | |
parent | 74008b365dcb921781f7430c1fc279be7778327b (diff) |
constify tomoyo_realpath_from_path()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'security')
-rw-r--r-- | security/tomoyo/common.h | 2 | ||||
-rw-r--r-- | security/tomoyo/realpath.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h index b897d4862016..6627102c24af 100644 --- a/security/tomoyo/common.h +++ b/security/tomoyo/common.h | |||
@@ -945,7 +945,7 @@ char *tomoyo_encode2(const char *str, int str_len); | |||
945 | char *tomoyo_init_log(struct tomoyo_request_info *r, int len, const char *fmt, | 945 | char *tomoyo_init_log(struct tomoyo_request_info *r, int len, const char *fmt, |
946 | va_list args); | 946 | va_list args); |
947 | char *tomoyo_read_token(struct tomoyo_acl_param *param); | 947 | char *tomoyo_read_token(struct tomoyo_acl_param *param); |
948 | char *tomoyo_realpath_from_path(struct path *path); | 948 | char *tomoyo_realpath_from_path(const struct path *path); |
949 | char *tomoyo_realpath_nofollow(const char *pathname); | 949 | char *tomoyo_realpath_nofollow(const char *pathname); |
950 | const char *tomoyo_get_exe(void); | 950 | const char *tomoyo_get_exe(void); |
951 | const char *tomoyo_yesno(const unsigned int value); | 951 | const char *tomoyo_yesno(const unsigned int value); |
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index bed745c8b1a3..1e0d480ff6a6 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c | |||
@@ -89,7 +89,7 @@ char *tomoyo_encode(const char *str) | |||
89 | * | 89 | * |
90 | * If dentry is a directory, trailing '/' is appended. | 90 | * If dentry is a directory, trailing '/' is appended. |
91 | */ | 91 | */ |
92 | static char *tomoyo_get_absolute_path(struct path *path, char * const buffer, | 92 | static char *tomoyo_get_absolute_path(const struct path *path, char * const buffer, |
93 | const int buflen) | 93 | const int buflen) |
94 | { | 94 | { |
95 | char *pos = ERR_PTR(-ENOMEM); | 95 | char *pos = ERR_PTR(-ENOMEM); |
@@ -216,7 +216,7 @@ out: | |||
216 | * | 216 | * |
217 | * Returns the buffer. | 217 | * Returns the buffer. |
218 | */ | 218 | */ |
219 | static char *tomoyo_get_socket_name(struct path *path, char * const buffer, | 219 | static char *tomoyo_get_socket_name(const struct path *path, char * const buffer, |
220 | const int buflen) | 220 | const int buflen) |
221 | { | 221 | { |
222 | struct inode *inode = path->dentry->d_inode; | 222 | struct inode *inode = path->dentry->d_inode; |
@@ -247,7 +247,7 @@ static char *tomoyo_get_socket_name(struct path *path, char * const buffer, | |||
247 | * These functions use kzalloc(), so the caller must call kfree() | 247 | * These functions use kzalloc(), so the caller must call kfree() |
248 | * if these functions didn't return NULL. | 248 | * if these functions didn't return NULL. |
249 | */ | 249 | */ |
250 | char *tomoyo_realpath_from_path(struct path *path) | 250 | char *tomoyo_realpath_from_path(const struct path *path) |
251 | { | 251 | { |
252 | char *buf = NULL; | 252 | char *buf = NULL; |
253 | char *name = NULL; | 253 | char *name = NULL; |