docker-machine-driver-xhyve
docker-machine-driver-xhyve copied to clipboard
fix open mode inconsistencies
The lib9p filesystem backend currently does not handle open modes properly.
When the guest opens a file with O_RDWR, check_access()
will never find a match, since it only compares against L9P_OREAD
, L9P_OWRITE
, and L9P_OEXEC
, but not against L9P_ORDWR
. Therefore, check_access()
fails, when guests open files with O_RDWR
.
In addition, the other modes are not translated from L9P to host values. The current implementation assumes, these modes have the same numerical representation in both. But in reality, they don’t.
This may fix #188.
I am aware that this patch will cause this version of lib9p
to diverge from the original. Maybe it would be an alternative to port a more recent version from upstream. But it has changed considerably there, and I do not know, whether the upstream version fixes this problem or whether upstream can be integrated here.