runtime-rs: fix shared volume permission issue

Fix the issue where share volumes always have readwrite permission even if
readonly permission is enough.

Fixes: #5549

Signed-off-by: Xuewei Niu <justxuewei@apache.org>
This commit is contained in:
Xuewei Niu 2022-11-01 11:00:38 +08:00
parent 288e337a6f
commit b74c18024a

View File

@ -65,7 +65,7 @@ impl ShareFsVolume {
cid: cid.to_string(),
source: m.source.clone(),
target: file_name,
readonly: false,
readonly: m.options.iter().any(|o| *o == "ro"),
mount_options: m.options.clone(),
mount: m.clone(),
})