Commit Graph

48 Commits

Author SHA1 Message Date
Konstantin Belousov
509124b626 Add AT_EMPTY_PATH for several *at(2) syscalls
It is currently allowed to fchownat(2), fchmodat(2), fchflagsat(2),
utimensat(2), fstatat(2), and linkat(2).

For linkat(2), PRIV_VFS_FHOPEN privilege is required to exercise the flag.
It allows to link any open file.

Requested by:	trasz
Tested by:	pho, trasz
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D29111
2021-04-15 12:48:11 +03:00
Konstantin Belousov
20e91ca36a open(2): Remove O_BENEATH and AT_BENEATH
with the reasoning that the flags did not worked properly, and were not
shipped in a release.

O_RESOLVE_BENEATH is kept as useful.

Reviewed by:	markj
Tested by:	arichardson, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D28907
2021-03-02 20:16:55 +02:00
Konstantin Belousov
1f305be431 Document {O,AT}_RESOLVE_BENEATH and new O_BENEATH behavior for relative paths.
PR:	248335
Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D25886
2020-09-22 22:54:54 +00:00
John Baldwin
e42b096439 Document EINTEGRITY errors for many system calls.
EINTEGRITY was previously documented as a UFS-specific error for
mount(2).  This documents EINTEGRITY as a filesystem-independent error
that may be reported by the backing store of a filesystem.

While here, document EIO as a filesystem-independent error for both
mount(2) and posix_fadvise(2).  EIO was previously only documented for
UFS for mount(2).

Reviewed by:	mckusick
Suggested by:	mckusick
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D24168
2020-03-30 21:44:00 +00:00
Konstantin Belousov
5b1fb8ec66 First draft of documentation for AT/O_BENEATH handling of the absolute
paths.

It was decided that committing the code and drafting of the man page
update is better than allowing the code to rot until wordsmithing
happens.

Reviewed by:	jilles (previous version)
Discussed with:	brooks, jilles, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D17714
2018-11-11 01:46:48 +00:00
Konstantin Belousov
4f77f48884 Implement O_BENEATH and AT_BENEATH.
Flags prevent open(2) and *at(2) vfs syscalls name lookup from
escaping the starting directory.  Supposedly the interface is similar
to the same proposed Linux flags.

Reviewed by:	jilles (code, previous version of manpages), 0mp (manpages)
Discussed with:	allanjude, emaste, jonathan
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D17547
2018-10-25 22:16:34 +00:00
Warner Losh
aeb71118e6 Mark all the system calls that were in 1st Edition Unix as such in the
HISTORY section. Note: Any system calls that were added prior to v7,
but after v1 weren't changed.

Obtained from: http://www.tuhs.org/cgi-bin/utree.pl?file=V1/man/man2
2017-12-01 22:26:36 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Jilles Tjoelker
b865f8ef40 chmod(2): Document S_ISVTX following SUSv3/SUSv4.
S_ISTXT is non-standard.

While here, also update fchmodat() standards entry to POSIX.1-2008.
2013-12-01 12:24:57 +00:00
Sergey Kandaurov
e2ea39cbdb Update sticky(7) cross references.
PR:		docs/124468
X-MFC with:	r218998
2011-05-13 16:29:57 +00:00
Konstantin Belousov
a141af6930 Man pages for the openat(2), fexecve(2) and related syscalls.
Reviewed by:	ru
2008-04-16 13:03:12 +00:00
Pawel Jakub Dawidek
e9f0620b9f When we try to set set-gid bit with chmod(2) on a file, which we own, but our
effective group ID (and any of our group) doesn't match the group ID of the
file, we get EPERM.  This doesn't conform POSIX. POSIX requires that we should
return 0, but silently clear the set-gid bit.
2007-01-16 15:17:27 +00:00
Warner Losh
c879ae3536 Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
Pawel Jakub Dawidek
a4319b6585 Much more correct EFTYPE description. 2006-12-13 13:46:01 +00:00
Pawel Jakub Dawidek
3bb2bdaef6 Append-only flag also denies chmod(2). Is this correct behaviour? 2006-12-13 13:22:57 +00:00
Pawel Jakub Dawidek
54ec563e0d If the named file has its immutable flag set, chmod(2) returns EPERM. 2006-12-09 22:41:01 +00:00
Tom Rhodes
a51d79c1d3 Catch up with stat.h a bit:
o Sticky bit is actually defined as S_ISTXT not S_ISVTX.
o Sticky bit is wrapped in if __BSD_VISIBLE not _POSIX_SOURCE.
2004-12-29 20:00:29 +00:00
Ruslan Ermilov
1a0a934547 Mechanically kill hard sentence breaks. 2004-07-02 23:52:20 +00:00
Ruslan Ermilov
fe08efe680 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Ruslan Ermilov
2faeeff4c9 mdoc(7) police: Tidy up the syscall language.
Stop calling system calls "function calls".

Use "The .Fn system call" a-la "The .Nm utility".

When referring to a non-BSD implementation in
the HISTORY section, call syscall a function,
to be safe.
2002-12-18 09:22:32 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Giorgos Keramidas
1f2cec106f The .Fn function. 2002-07-15 20:59:12 +00:00
Ruslan Ermilov
6cbb6156c3 Fix a typo.
Submitted by:	"Alexey V. Neyman" <alex.neyman@auriga.ru>
2001-12-07 14:58:41 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Ruslan Ermilov
d6002fef6f Use ``.Rv -std'' wherever possible.
Submitted by:	yar
2001-08-31 09:57:38 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov
a307d59838 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
Ruslan Ermilov
0b381bf1fd Remove vestiges of MFS. 2001-06-01 10:07:28 +00:00
Ruslan Ermilov
4263595653 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
Ruslan Ermilov
c23155a43a mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Sheldon Hearn
c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Bruce Evans
1c8deedd38 Fixed syntax error in previous commit. 1999-07-31 22:10:17 +00:00
Mike Pritchard
07677e5025 Document the lchmod(2) system call.
Pointed-out-by: bde
1999-07-30 10:08:21 +00:00
Alexander Langer
92d7687ee6 Formatting fix.
Obtained from:	OpenBSD
1998-01-11 17:49:51 +00:00
Julian Elischer
52bf64c787 Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
1997-11-13 00:28:51 +00:00
Steve Price
51cc902b40 Reflect reality of sticky bits and UFS-based filesystems.
PR:		docs/4198
Submitted by:	Ada T. Lim <ada@not-enough.bandwidth.org>
1997-08-17 00:19:28 +00:00
Mike Pritchard
8a7f0369b3 Use the .Tn macro for generic FreeBSD references. Other minor cleanup. 1997-03-21 20:57:20 +00:00
Peter Wemm
7e546392b5 Revert $FreeBSD$ to $Id$ 1997-02-22 15:12:41 +00:00
Wolfram Schneider
75141cc987 Sort cross references. 1997-01-20 23:23:22 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Mike Pritchard
8b3cccfc04 Remove the EINVAL error from the ERRORS sections that
say is means that a pathname had the high-order bit
set, since this is no longer an error.
1997-01-11 23:56:32 +00:00
Wolfram Schneider
fd3bf33fd0 upgrade STANDARDS from POSIX 1003.1-88 to 1003.1-90 using .St macro
use ``is expected to conform to'' phrase, not ``conforms to''

Pointed out by: Bruce->NIST-PCTS
1996-12-02 20:03:58 +00:00
Wolfram Schneider
28eac3d225 function appeared in Version 7 AT&T UNIX
Obtained from: ftp://netlib.att.com/netlib/att/cs/v7man/man2
1996-08-29 21:24:19 +00:00
Wolfram Schneider
17f47987b3 update sticky bit documentation 1996-06-09 20:53:00 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00