Skip to main content

isreallycom

Function isreallycom 

Source
pub fn isreallycom(cn: &cmdnam) -> bool
Expand description

Port of int isreallycom(Cmdnam cn) from Src/exec.c:972-987.

Verify that a hashed/cached cmdnamtab entry still names a real external command (X-perm + regular file). For HASHED entries (cn->u.cmd carries the absolute path), test the path directly; otherwise concatenate name[0] + "/" + nam and test that. Used by execcmd_exec to drop stale cmdnamtab hits before they turn into a failed execve syscall.