aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-05-22 04:40:59 -0400
committerJames Morris <jmorris@namei.org>2009-05-22 04:40:59 -0400
commit2c9e703c618106f5383226fbb1f526cb11034f8a (patch)
tree87d7548001ea82f655fede0640466fc16aabcdf7 /security
parent6470c077cae12227318f40f3e6d756caadcce4b0 (diff)
parent5805977e63a36ad56594a623f3bd2bebcb7db233 (diff)
Merge branch 'master' into next
Conflicts: fs/exec.c Removed IMA changes (the IMA checks are now performed via may_open()). Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/tomoyo/common.c6
-rw-r--r--security/tomoyo/realpath.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index d4d41b3efc7c..ddfb9cccf468 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -1720,14 +1720,14 @@ static bool tomoyo_policy_loader_exists(void)
1720 * policies are not loaded yet. 1720 * policies are not loaded yet.
1721 * Thus, let do_execve() call this function everytime. 1721 * Thus, let do_execve() call this function everytime.
1722 */ 1722 */
1723 struct nameidata nd; 1723 struct path path;
1724 1724
1725 if (path_lookup(tomoyo_loader, LOOKUP_FOLLOW, &nd)) { 1725 if (kern_path(tomoyo_loader, LOOKUP_FOLLOW, &path)) {
1726 printk(KERN_INFO "Not activating Mandatory Access Control now " 1726 printk(KERN_INFO "Not activating Mandatory Access Control now "
1727 "since %s doesn't exist.\n", tomoyo_loader); 1727 "since %s doesn't exist.\n", tomoyo_loader);
1728 return false; 1728 return false;
1729 } 1729 }
1730 path_put(&nd.path); 1730 path_put(&path);
1731 return true; 1731 return true;
1732} 1732}
1733 1733
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index bf8e2b451687..40927a84cb6e 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -165,11 +165,11 @@ char *tomoyo_realpath_from_path(struct path *path)
165 */ 165 */
166char *tomoyo_realpath(const char *pathname) 166char *tomoyo_realpath(const char *pathname)
167{ 167{
168 struct nameidata nd; 168 struct path path;
169 169
170 if (pathname && path_lookup(pathname, LOOKUP_FOLLOW, &nd) == 0) { 170 if (pathname && kern_path(pathname, LOOKUP_FOLLOW, &path) == 0) {
171 char *buf = tomoyo_realpath_from_path(&nd.path); 171 char *buf = tomoyo_realpath_from_path(&path);
172 path_put(&nd.path); 172 path_put(&path);
173 return buf; 173 return buf;
174 } 174 }
175 return NULL; 175 return NULL;
@@ -184,11 +184,11 @@ char *tomoyo_realpath(const char *pathname)
184 */ 184 */
185char *tomoyo_realpath_nofollow(const char *pathname) 185char *tomoyo_realpath_nofollow(const char *pathname)
186{ 186{
187 struct nameidata nd; 187 struct path path;
188 188
189 if (pathname && path_lookup(pathname, 0, &nd) == 0) { 189 if (pathname && kern_path(pathname, 0, &path) == 0) {
190 char *buf = tomoyo_realpath_from_path(&nd.path); 190 char *buf = tomoyo_realpath_from_path(&path);
191 path_put(&nd.path); 191 path_put(&path);
192 return buf; 192 return buf;
193 } 193 }
194 return NULL; 194 return NULL;