ndk icon indicating copy to clipboard operation
ndk copied to clipboard

[BUG] fchmodat with AT_SYMLINK_NOFOLLOW is very inconsistent

Open DanAlbert opened this issue 5 years ago • 1 comments

I'm seeing three different behaviors from fchmodat on a symlink when using AT_SYMLINK_NOFOLLOW:

  1. The flag is completely ignored because the kernel doesn't implement it; the mode of the referent is changed (this was fixed in early 2015, so this is the case prior to API 23 devices).
  2. Symlink permissions are not supported and ENOSUP is set
  3. Symlink permissions are supported and the symlink mode is set appropriately

Both 2 and 3 provide a conformant implementation of std::filesystem::permissions(symlink_path, p perms, std::filesystem::perm_options::nofollow), but 1 does not. The permissions of the symlink need to either be set or an error needs to be returned.

DanAlbert avatar May 15 '20 21:05 DanAlbert

@rprichard I assume you ran into this while migrating? Anything left to be done here, or should I just close it?

DanAlbert avatar Aug 21 '24 21:08 DanAlbert