Merge pull request #784 from marmistrz/path_open_doc

Document the behavior of some rights-related functions.
This commit is contained in:
Peter Huene
2020-01-23 09:39:25 -08:00
committed by GitHub
4 changed files with 17 additions and 6 deletions

View File

@@ -61,6 +61,9 @@ pub(crate) struct FdEntry {
}
impl FdEntry {
/// Create an FdEntry with *maximal* possible rights from a given `File`.
/// If this is not desired, the rights of the resulting `FdEntry` should
/// be manually restricted.
pub(crate) fn from(file: fs::File) -> Result<Self> {
unsafe { determine_type_and_access_rights(&file) }.map(
|(file_type, rights_base, rights_inheriting)| Self {