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 #2

Updated by Marcel Telka 9 months ago

Testing

I reviewed the man page using the following command:

MANPATH=usr/src/man/ man chown.2

Nightly passed.

Actions #3

Updated by Marcel Telka 9 months ago

  • Status changed from In Progress to Pending RTI
Actions #4

Updated by Electric Monk 9 months ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit f2db47a16aa8decb07a3891af701f32bba6990cd

commit  f2db47a16aa8decb07a3891af701f32bba6990cd
Author: Marcel Telka <marcel@telka.sk>
Date:   2021-03-03T19:33:49.000Z

    13594 Valid flag for fchownat(2) is AT_SYMLINK_NOFOLLOW, not SYMLNK
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions #5

Updated by Marcel Telka 9 months ago

  • Related to Bug #13634: fstat(2) does not use flag added
Actions

Also available in: Atom PDF