Fix _user_entry_ref_to_path() in chroot

* Add "bool kernel" parameter to vfs_entry_ref_to_path(), so it can be
  specified for which I/O context the entry ref shall be translated.
* _user_entry_ref_to_path(): Use the calling team's I/O context instead
  of the kernel's. Fixes the bug that in a chroot the syscall would
  return a path for outside the chroot.
This commit is contained in:
Ingo Weinhold
2013-04-22 18:06:28 +02:00
parent 5be84d5f00
commit 237127fbe4
7 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -2690,7 +2690,7 @@ vfs_get_vnode_name(void *_vnode, char *name, fssh_size_t nameSize)
fssh_status_t
vfs_entry_ref_to_path(fssh_dev_t device, fssh_ino_t inode, const char *leaf,
char *path, fssh_size_t pathLength)
bool kernel, char *path, fssh_size_t pathLength)
{
struct vnode *vnode;
fssh_status_t status;
@@ -5691,7 +5691,7 @@ fssh_status_t
_kern_entry_ref_to_path(fssh_dev_t device, fssh_ino_t inode, const char *leaf,
char* path, fssh_size_t pathLength)
{
return vfs_entry_ref_to_path(device, inode, leaf, path, pathLength);
return vfs_entry_ref_to_path(device, inode, leaf, true, path, pathLength);
}