wolfssh/.github
John Safranek 41fb47b205 scp: receive through a per-session dirfd
The default SCP receive callback keeps its destination per session, the
base path plus each directory entered, in place of the process working
directory that every session of a threaded server shares. With openat()
it holds that directory open, reaches it and everything created below
it with O_NOFOLLOW, and confirms a reopened parent is the one entered.

- port.h gains WOPENAT, WMKDIRAT, WOLFSSH_O_SEARCH with a search check
  as chdir() made, and WOLFSSH_HAVE_DIRFD, which sizes WOLFSSH so it
  keys only on configure's openat() probe; WOLFSSH_NO_DIRFD opts out
- ports without them open by the full path after a wIsDirNoFollow()
  screen of the base and of each directory entered; a refused base
  frees the receive path
- the receive path is capped at DEFAULT_SCP_FILE_NAME_SZ like the
  send side's; futimes() stands in for futimens() on hosts with
  openat() but not futimens(), such as macOS before 10.13
- unit: ScpRecvCallback_SessionPath walks down and back with the
  working directory untouched, then has the tree moved out from under
  it; a linked base and a file-named directory are refused
- scp.test: a planted symlink at the destination name keeps its target;
  scp-test.yml also builds and tests the fallback

Issue: F-14758, F-13998
2026-10-15 17:14:34 -05:00
..
actions/install-apt-deps CI: install apt packages from ghcr .deb bundles 2026-10-07 21:39:28 -05:00
ci-deps wolfsshd: bound the shell child reap and flush the held backlog 2026-10-09 10:30:29 -07:00
scripts CI: install apt packages from ghcr .deb bundles 2026-10-07 21:39:28 -05:00
workflows scp: receive through a per-session dirfd 2026-10-15 17:14:34 -05:00