Just pushed a new version of the chmod patches with the following changes:
* A fix to the error path. Previously `fchmod`/`chmod` was called to restore the access flags after `open` clobbering the value of `errno`. This patch delays restoring the flags - similar to the design in wine-staging. * An improved implementation that does the `stat`/`chmod`/`open` process using `fstatat`, `fchmodat` and `openat` with an fd of the parent directory that is locked in place from start to finish. This should significantly reduce the danger of TOCTOU, because now only the file name is being repeatedly resolved, rather than the full hierachy of directories.