From d44011a69e0674acfa9c59bd7ad7f0523eb61d42 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 29 Oct 2021 17:05:55 -0400 Subject: fix(runtime): require full read and write permissions to create symlinks (#12554) --- runtime/ops/fs.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/ops/fs.rs b/runtime/ops/fs.rs index c3e9215a2..4c29898d7 100644 --- a/runtime/ops/fs.rs +++ b/runtime/ops/fs.rs @@ -1370,7 +1370,8 @@ fn op_symlink_sync( let oldpath = PathBuf::from(&args.oldpath); let newpath = PathBuf::from(&args.newpath); - state.borrow_mut::().write.check(&newpath)?; + state.borrow_mut::().write.check_all()?; + state.borrow_mut::().read.check_all()?; debug!( "op_symlink_sync {} {}", @@ -1432,7 +1433,8 @@ async fn op_symlink_async( { let mut state = state.borrow_mut(); - state.borrow_mut::().write.check(&newpath)?; + state.borrow_mut::().write.check_all()?; + state.borrow_mut::().read.check_all()?; } tokio::task::spawn_blocking(move || { -- cgit v1.2.3