gramineproject / graphene

Graphene / Graphene-SGX - a library OS for Linux multi-process applications, with Intel SGX support
https://grapheneproject.io
GNU Lesser General Public License v3.0
771 stars 260 forks source link

[LibOS] Report back the default permissions of a file consistently #2686

Closed sahason closed 3 years ago

sahason commented 3 years ago

Signed-off-by: Sonali Saha sonali.saha@intel.com

Description of the changes

Graphene created the file with default permissions (0755), but it reported different permissions 0700 as it includes only user permissions to the returned permissions. This fix includes group and other permissions to the file permissions returned.

Fixes #2543

How to test this PR?

Create a file with mode set as 0777 the permissions of this newly generated file will be 0755. Use stat to report back the file permissions it should report 0755 instead of 0700.


This change is Reviewable

mkow commented 3 years ago

@sahason: Please re-create this PR in our new repo: https://github.com/gramineproject/gramine. This one will be soon archived.