Project

General

Profile

Actions

Bug #13594

closed

Valid flag for fchownat(2) is AT_SYMLINK_NOFOLLOW, not SYMLNK

Added by Marcel Telka 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
manpage - manual pages
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

The chown(2) man page contains this:

       The fchownat() function sets the owner ID and group ID of the named
       file in the same manner as chown(). If, however, the path argument is
       relative, the path is resolved relative to the fildes argument rather
       than the current working directory.  If the fildes argument has the
       special value AT_FDCWD, the path resolution reverts back to current
       working directory relative.  If the flag argument is set to SYMLNK, the
       function behaves like lchown() with respect to symbolic links. If the
       path argument is absolute, the fildes argument is ignored.  If the path
       argument is a null pointer, the function behaves like fchown().

But, apparently, SYMLNK is wrong. There is no such constant defined. It should be changed to AT_SYMLINK_NOFOLLOW. See also https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchownat.html


Related issues

Related to illumos gate - Bug #13634: fstat(2) does not use flagClosedMarcel Telka

Actions
Actions

Also available in: Atom PDF