Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 againstL9P_OREAD
,L9P_OWRITE
, andL9P_OEXEC
, but not againstL9P_ORDWR
. Therefore,check_access()
fails, when guests open files withO_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.