summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/unlink.2
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-05-24 16:32:11 +0000
committerpeter <peter@FreeBSD.org>1996-05-24 16:32:11 +0000
commit0f5a7440b6758c699bf0520a7e28678f05d269a7 (patch)
treedad89c1fa460db1f6a988e262d7f74fbbd63fcf7 /lib/libc/sys/unlink.2
parent9453593a7d6b8b4929584c55937cbc51e5de1a67 (diff)
downloadFreeBSD-src-0f5a7440b6758c699bf0520a7e28678f05d269a7.zip
FreeBSD-src-0f5a7440b6758c699bf0520a7e28678f05d269a7.tar.gz
Document that the superuser cannot override link() and unlink() on
directories, and mention that it was historical practice.
Diffstat (limited to 'lib/libc/sys/unlink.2')
-rw-r--r--lib/libc/sys/unlink.211
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2
index 78221bc..1f46945 100644
--- a/lib/libc/sys/unlink.2
+++ b/lib/libc/sys/unlink.2
@@ -56,6 +56,8 @@ all resources associated with the file are reclaimed.
If one or more process have the file open when the last link is removed,
the link is removed, but the removal of the file is delayed until
all references to it have been closed.
+.Fa path
+may not be a directory.
.Sh RETURN VALUES
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and
@@ -83,8 +85,7 @@ to be removed.
.It Bq Er ELOOP
Too many symbolic links were encountered in translating the pathname.
.It Bq Er EPERM
-The named file is a directory and the effective user ID
-of the process is not the super-user.
+The named file is a directory.
.It Bq Er EPERM
The directory containing the file is marked sticky,
and neither the containing directory nor the file to be removed
@@ -110,3 +111,9 @@ points outside the process's allocated address space.
An
.Nm
function call appeared in Version 6 AT&T UNIX.
+.Pp
+The
+.Nm
+system call traditionally allows the super-user to unlink directories which
+can damage the filesystem integrity. This implementation no longer permits
+it.
OpenPOWER on IntegriCloud