Skip to main content

rewrite_sockaddr

Function rewrite_sockaddr 

Source
fn rewrite_sockaddr(
    ctx: &Ctx,
    fs: &Fs,
    regs: &mut Regs,
    deref_final: bool,
) -> Result<(), i32>
Expand description

Translates the sun_path of an AF_UNIX address in connect/bind.

Abstract sockets and other families are left alone. A translated path that does not fit in sun_path makes the syscall fail with ENOSYS.

§Arguments

  • ctx - Shared supervisor state.
  • fs - The tracee’s filesystem view.
  • regs - Registers at the stop (fd, addr, len).
  • deref_final - Follow a trailing symlink (connect), or not (bind).