docs/39530: access(2) man page has unnecessarily broad warning
Soren Spies
sspies at apple.com
Thu Jul 10 02:20:04 UTC 2003
The following reply was made to PR docs/39530; it has been noted by GNATS.
From: Soren Spies <sspies at apple.com>
To: freebsd-gnats-submit at FreeBSD.org, Soren Spies <sspies at apple.com>
Cc:
Subject: Re: docs/39530: access(2) man page has unnecessarily broad warning
Date: Wed, 9 Jul 2003 19:16:58 -0700
I've noticed in FreeBSD 5.1 that we have eaccess(2) as well as a much
better warning in the man page (explaining the tradeoffs, but still
saying "never").
I propose the following patch:
diff -u access.2.orig access.2
--- access.2.orig Wed Jul 9 17:16:34 2003
+++ access.2 Wed Jul 9 17:23:46 2003
@@ -144,6 +144,15 @@
.Fn eaccess
system call
likewise may be subject to races if used inappropriately.
+.Pp
+.Fn access
+remains useful for providing clues to users as to whether operations
+make sense for particular filesystem objects (e.g. 'delete' menu
+item only highlighted in a writable folder ... avoiding interpretation
+of the st_mode bits that the application might not understand --
+e.g. in the case of AFS). It also allows a cheaper file existance
+test than
+.Ns Xr stat 2 .
.Sh SEE ALSO
.Xr chmod 2 ,
.Xr intro 2 ,
--
Soren Spies
Apple Computer, Inc.
More information about the freebsd-doc
mailing list