public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58f8f69
)
link: don't allow superuser to link to directories
author
Alan Cox
<alan@linux.intel.com>
Wed, 21 Feb 2018 20:40:49 +0000
(20:40 +0000)
committer
Alan Cox
<alan@linux.intel.com>
Wed, 21 Feb 2018 20:40:49 +0000
(20:40 +0000)
Kernel/syscall_fs3.c
patch
|
blob
|
history
diff --git
a/Kernel/syscall_fs3.c
b/Kernel/syscall_fs3.c
index
c7c8141
..
b840496
100644
(file)
--- a/
Kernel/syscall_fs3.c
+++ b/
Kernel/syscall_fs3.c
@@
-178,8
+178,10
@@
arg_t _link(void)
if (!(ino = n_open(name1, NULLINOPTR)))
return (-1);
- if (getmode(ino) == MODE_R(F_DIR))
+ if (getmode(ino) == MODE_R(F_DIR)) {
+ udata.u_error = EISDIR;
goto nogood;
+ }
if (ino->c_node.i_nlink == 0xFFFF) {
udata.u_error = EMLINK;