Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys_fd_stat_put doesn't require rights.fd_datasync for setting fdflags.dsync #19

Open
sunfishcode opened this issue Mar 6, 2020 · 0 comments

Comments

@sunfishcode
Copy link

The right rights.fd_datasync includes "If rights.file_open is set, includes the right to invoke file_open with fdflags.dsync." However, if one has the rights.fd_stat_put_flags right, it would appear one could invoke sys_fd_stat_put_flags with fdsflags.flags to set the fdflags.dsync flag, which would be a way to obtain a file descriptor with fdflags.dsync without having rights.fd_datasync.

Consequently, if one wishes to withhold the ability to open files with fdflags.dsync set, clearing the rights.fd_datasync right might seem sufficient, but isn't: one must also clear the rights.fd_stat_put_flags right as well. It would seem more consistent to make sys_fd_stat_put_flags require rights.fd_datasync for setting fdflags.dsync.

Similar considerations apply to rights.fd_sync, fdflags.rsync, and fdflags.dsync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant