Page MenuHomeFreeBSD

tests: exercise unix `connectat(2)` with a socket peer descriptor
Needs ReviewPublic

Authored by inquire_JohnEricson.me on Wed, Jul 22, 9:37 PM.

Details

Reviewers
markj
kib
Group Reviewers
capsicum
Summary

Cover the new fd-direct connect path: stream connect and data passing,
the peer address reported by getpeername(2), datagram to an unbound
peer, the EINVAL/ENOTSOCK/EPROTOTYPE/ECONNREFUSED error matrix,
and the Capsicum token semantics — a descriptor limited to
CAP_CONNECTAT can be connected to but not listened on, accepted from,
or read, and one lacking CAP_CONNECTAT cannot be a connect target.

Stream listeners are always bound: uipc_listen() refuses unbound
sockets with EDESTADDRREQ, so an unbound fd-direct listener is not
reachable even with this feature.

Signed-off-by: John Ericson <John.Ericson@Obsidian.Systems>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75029
Build 71912: arc lint + arc unit