summaryrefslogtreecommitdiff
path: root/cli/ops/net.rs
diff options
context:
space:
mode:
authorWilliam Perron <hey@wperron.io>2020-11-27 13:43:39 -0500
committerGitHub <noreply@github.com>2020-11-27 13:43:39 -0500
commit59f10b36040b16868e7f288ee6c7f8825993fcb5 (patch)
treeafb9b006a1f03ca64fd99883f1f4232a00388f9d /cli/ops/net.rs
parentff3c5897ea7b8720894d2092c28889994f31c40e (diff)
fix(cli/ops/net): add write permissions for unixpackets datagrams & unix socket (#8511)
Fixes #7781
Diffstat (limited to 'cli/ops/net.rs')
-rw-r--r--cli/ops/net.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/ops/net.rs b/cli/ops/net.rs
index 2be65e1ec..98ff83fc0 100644
--- a/cli/ops/net.rs
+++ b/cli/ops/net.rs
@@ -229,7 +229,7 @@ async fn op_datagram_send(
let address_path = Path::new(&args.path);
{
let s = state.borrow();
- s.borrow::<Permissions>().check_read(&address_path)?;
+ s.borrow::<Permissions>().check_write(&address_path)?;
}
let mut state = state.borrow_mut();
let resource = state
@@ -308,6 +308,7 @@ async fn op_connect(
{
let state_ = state.borrow();
state_.borrow::<Permissions>().check_read(&address_path)?;
+ state_.borrow::<Permissions>().check_write(&address_path)?;
}
let path = args.path;
let unix_stream = net_unix::UnixStream::connect(Path::new(&path)).await?;