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:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user