Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170039
b: refs/heads/master
c: a4054b6
h: refs/heads/master
i:
  170037: af9db3d
  170035: 5e8a1a0
  170031: 0e488e1
v: v3
  • Loading branch information
Eric W. Biederman committed Nov 20, 2009
1 parent 44bb986 commit d9ce5c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d4561110a3e9fa742aeec6717248a491dfb1878
refs/heads/master: a4054b6b20e9c2cca63715a319759bf8d37d82fc
9 changes: 9 additions & 0 deletions trunk/security/tomoyo/realpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ int tomoyo_realpath_from_path2(struct path *path, char *newname,
spin_unlock(&dcache_lock);
path_put(&root);
path_put(&ns_root);
/* Prepend "/proc" prefix if using internal proc vfs mount. */
if (!IS_ERR(sp) && (path->mnt->mnt_parent == path->mnt) &&
(strcmp(path->mnt->mnt_sb->s_type->name, "proc") == 0)) {
sp -= 5;
if (sp >= newname)
memcpy(sp, "/proc", 5);
else
sp = ERR_PTR(-ENOMEM);
}
}
if (IS_ERR(sp))
error = PTR_ERR(sp);
Expand Down

0 comments on commit d9ce5c1

Please sign in to comment.