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.
The right rights.fd_datasync includes "If
rights.file_openis set, includes the right to invokefile_openwithfdflags.dsync." However, if one has therights.fd_stat_put_flagsright, it would appear one could invokesys_fd_stat_put_flagswithfdsflags.flagsto set thefdflags.dsyncflag, which would be a way to obtain a file descriptor withfdflags.dsyncwithout havingrights.fd_datasync.Consequently, if one wishes to withhold the ability to open files with
fdflags.dsyncset, clearing therights.fd_datasyncright might seem sufficient, but isn't: one must also clear therights.fd_stat_put_flagsright as well. It would seem more consistent to makesys_fd_stat_put_flagsrequirerights.fd_datasyncfor settingfdflags.dsync.Similar considerations apply to
rights.fd_sync,fdflags.rsync, andfdflags.dsync.