dc0b9dec4a
`OwnedFd`s are now (rustc 1.80+) checked for validity when dropped in a debug build, to catch usage after closing. Unfortunately those checks don't account for the special value `AT_FDCWD` (-100) which is not a "real" FD, but a magic constant used by many libc functions to signify operations starting at the current working directory. changing our `cwd` helper to open the CWD for real, instead of just returning the magic value that pretends to be an FD, works around those limitations with the least API churn. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>