Skip to content

Commit

Permalink
fixup! [LibOS] Add loader.uid and loader.gid manifest options
Browse files Browse the repository at this point in the history
This implementation allows Gramine to run an executable with another user than root.
By default, Gramine uses the root user (uid = gid = 0), which may cause some apps to refuse to run.
We also set effective UID/GID to the same value as UID/GID respectively.
This can be defined as manifest option `loader.uid`/`loader.gid` in the manifest file.

Signed-off-by: Denis Zygann <[email protected]>
  • Loading branch information
Denis Zygann committed Sep 18, 2021
1 parent fa04ace commit 14067ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Documentation/manifest-syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ User ID and Group ID
loader.gid = [NUM]
(Default: 0)

This specifies the initial, Gramine emulated user/group ID and effective user/group ID.
It must be non-negative. By default Gramine emulates the user/group ID and effective user/group ID
to the root user (uid = gid = 0).
This specifies the initial, Gramine emulated user/group ID and effective
user/group ID. It must be non-negative. By default Gramine emulates the
user/group ID and effective user/group ID to the root user (uid = gid = 0).


Disabling ASLR
Expand Down
2 changes: 1 addition & 1 deletion LibOS/shim/test/regression/uid_gid.manifest.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ fs.mount.lib.uri = "file:{{ graphene.runtimedir() }}"
sgx.trusted_files = [
"file:{{ graphene.runtimedir() }}/",
"file:uid_gid"
]
]

0 comments on commit 14067ab

Please sign in to comment.