From f6afd4c41c5d48107d65317202590f3a61e144cc Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Thu, 17 Dec 2020 18:12:29 -0800 Subject: [PATCH] test-programs: sandbox escape is an EPERM now, not an ENOTCAPABLE --- .../test-programs/wasi-tests/src/bin/interesting_paths.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs b/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs index e057778281..4f8d9ce6c0 100644 --- a/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs +++ b/crates/test-programs/wasi-tests/src/bin/interesting_paths.rs @@ -17,8 +17,8 @@ unsafe fn test_interesting_paths(dir_fd: wasi::Fd, arg: &str) { wasi::path_open(dir_fd, 0, "/dir/nested/file", 0, 0, 0, 0) .expect_err("opening a file with an absolute path") .raw_error(), - wasi::ERRNO_NOTCAPABLE, - "errno should be ERRNO_NOTCAPABLE" + wasi::ERRNO_PERM, + "errno should be ERRNO_PERM" ); // Now open it with a path containing "..". @@ -92,8 +92,8 @@ unsafe fn test_interesting_paths(dir_fd: wasi::Fd, arg: &str) { wasi::path_open(dir_fd, 0, &bad_path, 0, 0, 0, 0) .expect_err("opening a file with too many \"..\"s in the path should fail") .raw_error(), - wasi::ERRNO_NOTCAPABLE, - "errno should be ERRNO_NOTCAPABLE", + wasi::ERRNO_PERM, + "errno should be ERRNO_PERM", ); wasi::path_unlink_file(dir_fd, "dir/nested/file") .expect("unlink_file on a symlink should succeed");