diff options
author | julian <julian@FreeBSD.org> | 1997-06-02 06:24:52 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1997-06-02 06:24:52 +0000 |
commit | 68081e32bccab743c4962c5ca40d1acef554a858 (patch) | |
tree | c88072dbc126f0bd1bc7114bc5797aff4b4fa2bb /lib/libc/sys | |
parent | 18750f03542b6c804f678f3b4fc1d4b4405fa79a (diff) | |
download | FreeBSD-src-68081e32bccab743c4962c5ca40d1acef554a858.zip FreeBSD-src-68081e32bccab743c4962c5ca40d1acef554a858.tar.gz |
Submitted by: Whistle Communications (archie Cobbs)
These changes add the ability to specify that a UFS file/directory
cannot be unlinked. This is basically a scaled back version
of the IMMUTABLE flag. The reason is to allow an administrator
to create a directory hierarchy that a group of users
can arbitrarily add/delete files from, but that the hierarchy
itself is safe from removal by them.
If the NOUNLINK definition is set to 0
then this results in no change to what happens normally.
(and results in identical binary (in the kernel)).
It can be proven that if this bit is never set by the admin,
no new behaviour is introduced..
Several "good idea" comments from reviewers plus one grumble
about creeping featurism.
This code is in production in 2.2 based systems
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/chflags.2 | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2 index 94b744c..3305b3a 100644 --- a/lib/libc/sys/chflags.2 +++ b/lib/libc/sys/chflags.2 @@ -65,6 +65,8 @@ Do not dump the file. The file may not be changed. .It UF_APPEND The file may only be appended to. +.It UF_NOUNLINK +The file may not be renamed or deleted. .It UF_OPAQUE The directory is opaque when viewed through a union stack. .\".It ARCHIVED @@ -73,18 +75,24 @@ The directory is opaque when viewed through a union stack. The file may not be changed. .It SF_APPEND The file may only be appended to. +.It SF_NOUNLINK +The file may not be renamed or deleted. .El .Pp The .Dq UF_IMMUTABLE -and +, .Dq UF_APPEND +and +.Dq UF_NOUNLINK flags may be set or unset by either the owner of a file or the super-user. .Pp The .Dq SF_IMMUTABLE -and +, .Dq SF_APPEND +and +.Dq SF_NOUNLINK flags may only be set or unset by the super-user. Attempts by the non-super-user to set the super-user only flags are silently ignored. |