Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

patch: fix FUSE permission

ClSlaidc529f8099d7c
diff --git a/libs/clipboard/src/platform/fuse.rs b/libs/clipboard/src/platform/fuse.rs
index 0dbfc91d9..060049420 100644
--- a/libs/clipboard/src/platform/fuse.rs
+++ b/libs/clipboard/src/platform/fuse.rs
@@ -300,11 +300,6 @@ impl fuser::Filesystem for FuseServer {
reply.error(libc::EBUSY);
return;
}
- if flags & libc::O_RDONLY == 0 {
- log::error!("fuse: entry is read only");
- reply.error(libc::EACCES);
- return;
- }
let fh = self.alloc_fd();
entry.add_handler(fh);
@@ -409,12 +404,7 @@ impl fuser::Filesystem for FuseServer {
log::error!("fuse: open: entry is not a file");
return;
}
- // check flags
- if flags & libc::O_RDONLY == 0 {
- reply.error(libc::EACCES);
- log::error!("fuse: open: entry is read only");
- return;
- }
+
// check gc
if entry.marked() {
reply.error(libc::EBUSY);
@@ -435,7 +425,7 @@ impl fuser::Filesystem for FuseServer {
fh: u64,
offset: i64,
size: u32,
- flags: i32,
+ _flags: i32,
_lock_owner: Option<u64>,
reply: fuser::ReplyData,
) {
@@ -455,12 +445,6 @@ impl fuser::Filesystem for FuseServer {
log::error!("fuse: read: entry is not a file");
return;
}
- // check flags
- if flags & libc::O_RDONLY == 0 {
- reply.error(libc::EACCES);
- log::error!("fuse: read: entry is read only");
- return;
- }
if entry.marked() {
reply.error(libc::EBUSY);
diff --git a/libs/clipboard/src/platform/linux/mod.rs b/libs/clipboard/src/platform/linux/mod.rs
index 8f04cabc6..9d83fe429 100644
--- a/libs/clipboard/src/platform/linux/mod.rs
+++ b/libs/clipboard/src/platform/linux/mod.rs
@@ -132,6 +132,7 @@ impl ClipboardContext {
let mnt_opts = [
MountOption::FSName("rustdesk-cliprdr-fs".to_string()),
MountOption::NoAtime,
+ MountOption::RO,
];
log::info!(
"mounting clipboard FUSE to {}",