pub struct Resolved {
pub guest: Vec<u8>,
pub host: Vec<u8>,
pub at: At,
}Expand description
A guest path resolved inside the guest namespace.
Fields§
§guest: Vec<u8>The canonical absolute guest path.
host: Vec<u8>Its textual host path, for logging, identity checks and the /proc
fakes; not what the syscall acts on when at is pinned.
at: AtWhat the syscall acts on.
Implementations§
Source§impl Resolved
impl Resolved
Sourcepub fn at(&self, nofollow: bool) -> Result<(RawFd, CString, bool), i32>
pub fn at(&self, nofollow: bool) -> Result<(RawFd, CString, bool), i32>
The (dirfd, path, nofollow) triple for a *at syscall.
§Arguments
nofollow- Whether the caller asked not to follow a final symlink.
§Returns
The descriptor and path to pass, and whether to pass the no-follow
flag: always for a pinned name, never through a /proc/self/fd link
(the object behind it is never a symlink), as asked otherwise.
Sourcepub fn is_mount_point(&self) -> bool
pub fn is_mount_point(&self) -> bool
Whether the path names a mount point of the view itself.
Sourcepub fn is_proc_fd_link(&self) -> bool
pub fn is_proc_fd_link(&self) -> bool
Whether the path is a final /proc/<pid>/fd/N or map_files/X link left to the kernel.
Sourcepub fn mode_nofollow(&self) -> Result<u32, i32>
pub fn mode_nofollow(&self) -> Result<u32, i32>
st_mode of the object, without following a final symlink.
Sourcepub fn object(&self, deref: bool) -> Result<(Arc<OwnedFd>, u32), i32>
pub fn object(&self, deref: bool) -> Result<(Arc<OwnedFd>, u32), i32>
An O_PATH descriptor of the object itself, for the syscalls without
a dirfd form, which then act on /proc/self/fd/<n>.
§Arguments
deref- Whether the caller asked to follow a final symlink. The walk did so already, so a symlink found here was swapped in since and the lookup is retried; withoutderefa symlink is returned as the object, with its mode, for the caller to refuse or to act on through its parent.
§Returns
The descriptor and the object’s st_mode.
Sourcepub fn parent_path(&self) -> Result<CString, i32>
pub fn parent_path(&self) -> Result<CString, i32>
The path of the object with only its parents pinned,
/proc/self/fd/<parent>/<name>, for a syscall that must see the
name as it is now (the l*xattr family, a socket address).