diff options
author | cjihrig <cjihrig@gmail.com> | 2019-09-04 17:56:51 -0400 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-11-30 18:06:39 +0100 |
commit | 09b1228c3a2723c6ecb768b40a507688015a478f (patch) | |
tree | 88acbfc979bc6f73572c86e8ee804bf0fa4ad326 /test/wasi/c/cant_dotdot.c | |
parent | 73c837b1ae91cb8852e75a921fa24c714471d690 (diff) | |
download | android-node-v8-09b1228c3a2723c6ecb768b40a507688015a478f.tar.gz android-node-v8-09b1228c3a2723c6ecb768b40a507688015a478f.tar.bz2 android-node-v8-09b1228c3a2723c6ecb768b40a507688015a478f.zip |
wasi: introduce initial WASI support
Co-authored-by: Gus Caplan <me@gus.host>
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Co-authored-by: Jiawen Geng <technicalcute@gmail.com>
Co-authored-by: Tobias Nießen <tniessen@tnie.de>
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/30258
Refs: https://github.com/nodejs/node/pull/27850
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'test/wasi/c/cant_dotdot.c')
-rw-r--r-- | test/wasi/c/cant_dotdot.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/wasi/c/cant_dotdot.c b/test/wasi/c/cant_dotdot.c new file mode 100644 index 0000000000..e2722062cd --- /dev/null +++ b/test/wasi/c/cant_dotdot.c @@ -0,0 +1,11 @@ +#include <assert.h> +#include <errno.h> +#include <stdio.h> + +int main() { + FILE* file = fopen("/sandbox/../outside.txt", "r"); + assert(file == NULL); + assert(errno == ENOTCAPABLE); + + return 0; +} |