(n *seccomp.Notif, dirfd int, pathAddr uintptr)
| 88 | } |
| 89 | |
| 90 | func (p *Process) resolvePath(n *seccomp.Notif, dirfd int, pathAddr uintptr) (string, syscall.Errno, error) { |
| 91 | path, errno, err := p.vmReadString(n, pathAddr, unix.PathMax) |
| 92 | if errno != 0 || err != nil { |
| 93 | return "", errno, err |
| 94 | } |
| 95 | |
| 96 | if !filepath.IsAbs(path) { |
| 97 | dirpath, errno, err := p.resolveDirfd(dirfd) |
| 98 | if errno != 0 || err != nil { |
| 99 | return "", errno, err |
| 100 | } |
| 101 | path = filepath.Join(dirpath, path) |
| 102 | } |
| 103 | |
| 104 | return path, 0, nil |
| 105 | } |
| 106 | |
| 107 | // handleOpen handles the open(2) and openat(2) syscalls. We do this in order |
| 108 | // to inject the ephemeral CA certificate into the system root CA store so that |
no test coverage detected