Skip to main content

translate_sockaddr

Function translate_sockaddr 

Source
fn translate_sockaddr(
    ctx: &Ctx,
    fs: &Fs,
    regs: &mut Regs,
    addr: u64,
    len: usize,
    deref_final: bool,
) -> Result<Option<(u64, u64)>, i32>
Expand description

Translates an AF_UNIX address in tracee memory, returning a rewritten copy.

§Arguments

  • ctx - Shared supervisor state.
  • fs - The tracee’s filesystem view.
  • regs - Registers at the stop, for scratch space.
  • addr - Address of the sockaddr in the tracee.
  • len - Its length.
  • deref_final - Follow a trailing symlink in sun_path.

§Returns

Some((new_addr, new_len)) when the path needed translating, else None.