Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] fchmodat with AT_SYMLINK_NOFOLLOW is very inconsistent #1258

Open
DanAlbert opened this issue May 15, 2020 · 0 comments
Open

[BUG] fchmodat with AT_SYMLINK_NOFOLLOW is very inconsistent #1258

DanAlbert opened this issue May 15, 2020 · 0 comments
Labels

Comments

@DanAlbert
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant