linux-sgx: Allow to open files with arbitrary paths in the sandbox using IPFS (#1685)

A limitation of the current implementation of SGX IPFS in WAMR is that
it prevents to open files which are not in the current directory.
This restriction is lifted and can now open files in paths, similarly to the
WASI openat call, which takes into account the sandbox of the file system.
This commit is contained in:
Jämes Ménétrey
2022-11-07 12:56:16 +01:00
committed by GitHub
parent 7fd37190e8
commit 328fd59f43
7 changed files with 80 additions and 12 deletions

View File

@ -186,6 +186,12 @@ ocall_unlinkat(int dirfd, const char *pathname, int flags)
return unlinkat(dirfd, pathname, flags);
}
ssize_t
ocall_readlink(const char *pathname, char *buf, size_t bufsiz)
{
return readlink(pathname, buf, bufsiz);
}
ssize_t
ocall_readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz)
{