From 58f8f69ceb774512c3096e967962cf373cb100d5 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 21 Feb 2018 20:35:48 +0000 Subject: [PATCH] link: remove root power to link to a directory It's never used, it makes a nasty mess and it breaks the locking --- Kernel/syscall_fs3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/syscall_fs3.c b/Kernel/syscall_fs3.c index 4f0f75a9..c7c81417 100644 --- a/Kernel/syscall_fs3.c +++ b/Kernel/syscall_fs3.c @@ -178,7 +178,7 @@ arg_t _link(void) if (!(ino = n_open(name1, NULLINOPTR))) return (-1); - if (getmode(ino) == MODE_R(F_DIR) && esuper()) + if (getmode(ino) == MODE_R(F_DIR)) goto nogood; if (ino->c_node.i_nlink == 0xFFFF) { -- 2.34.1