Page MenuHomeFreeBSD

access.2: Mention that lstat(2) should be used for symbolic links
ClosedPublic

Authored by gbe on Sun, Apr 21, 9:56 AM.
Tags
None
Referenced Files
F84171929: D44890.diff
Mon, May 20, 9:11 AM
Unknown Object (File)
Mon, May 13, 8:41 AM
Unknown Object (File)
Mon, May 13, 8:31 AM
Unknown Object (File)
Sat, May 11, 9:10 AM
Unknown Object (File)
Fri, Apr 26, 3:54 PM
Unknown Object (File)
Fri, Apr 26, 3:53 PM
Unknown Object (File)
Fri, Apr 26, 3:53 PM
Unknown Object (File)
Fri, Apr 26, 10:34 AM

Details

Summary

access(), eaccess() and faccessat() will always dereference
symbolic links.

So add a note the manual page, that stat(2) should be used in
the case of symbolic links.

PR: 262895
MFC after: 1 week

Test Plan

mandoc output review and 'mandoc -Tlint' checks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

gbe requested review of this revision.Sun, Apr 21, 9:56 AM
gbe created this revision.

There are 2 spurious ) after eaccess and faccessat in the change summary.

This revision is now accepted and ready to land.Sun, Apr 21, 12:23 PM

There are 2 spurious ) after eaccess and faccessat in the change summary.

Thanks, when typing fast, auto completion can be evil. ;)

I realise that it's my fault for using the weak word "refer" in my original suggestion (I originally wrote "access, eaccess, faccessat will ALWAYS dereference symbolic links. If you need to refer to the symbolic link itself, you'll have to instead use stat(2)") but I think it looks even less suitable in your submission. Would "If the symbolic link itself needs to be referenced..." be better?

Cheers, Jamie

Oops. Suggested alternative should be "lstat(2)" not "stat(2)" !

  • Reword a sentence and recommand lstat(2) instead of stat(2)
This revision now requires review to proceed.Tue, Apr 23, 2:42 PM
gbe retitled this revision from access.2: Mention that stat(2) should be used for symbolic links to access.2: Mention that lstat(2) should be used for symbolic links.Tue, Apr 23, 2:43 PM

English and markup still LGTM.

This revision is now accepted and ready to land.Wed, Apr 24, 1:16 AM