From ad4826eb7055c7d49ec1f2c267e0405f88178ff8 Mon Sep 17 00:00:00 2001
From: Ian Douglas Scott <ian@iandouglasscott.com>
Date: Sun, 16 Jul 2017 15:43:59 -0700
Subject: [PATCH] Require same uid as owner to unlink, not write permission

---
 mount/redox/scheme.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mount/redox/scheme.rs b/mount/redox/scheme.rs
index 3ef5a9d..042d5a2 100644
--- a/mount/redox/scheme.rs
+++ b/mount/redox/scheme.rs
@@ -371,8 +371,8 @@ impl Scheme for FileScheme {
                 }
 
                 if ! child.1.is_dir() {
-                    if ! child.1.permission(uid, gid, Node::MODE_WRITE) {
-                        // println!("file not writable {:o}", parent.1.mode);
+                    if child.1.uid != uid {
+                        // println!("file not owned by current user {}", parent.1.uid);
                         return Err(Error::new(EACCES));
                     }
 
-- 
GitLab