Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Samba Samba
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Merge requests 135
    • Merge requests 135
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • The Samba TeamThe Samba Team
  • SambaSamba
  • Merge requests
  • !1729

Fix for bug 14592

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Ralph Böhme requested to merge samba-team/devel/samba:slow-acl-xattr into master Dec 14, 2020
  • Overview 12
  • Commits 50
  • Pipelines 7
  • Changes 49

When setting the NT ACL vfs_acl_xattr will wipe an existing NT ACL xattr in the sys_acl_set_file_xattr().

We do three things in the code that handles setting the ACL:

  • first we set the POSIX ACL

  • as part of that, we remove the NT ACL xattr

  • then we set the new NT ACL xattr via

The problem is, if we hit ENOSPC in the last step, we have deleted the NT ACL xattr in the step before.

The code that deletes the NT ACL xattr is from 2008 and predates the new version 4 from 2012 of the ACL xattr that stores the hash of the filesystem POSIX ACL.

If all ACL xattr blob on a system contain the that hash, it's safe to skip deleting the ACL xattr when setting the POSIX ACL. But as systems may contain data with older versions, we cannot unconditionally remove that code.

The correct fix for this is to use a fsp extension in the module to transfer the knowledge across the codepath, that it's safe to skip the removal. That however requires an fsp and so doesn't work in the path based SMB_VFS_SYS_ACL_SET_FILE().

With the upcoming O_PATH changes it will be possible to change all callers of SMB_VFS_SYS_ACL_SET_FILE() to use the handle based SMB_VFS_SYS_ACL_SET_FD() instead. So once the O_PATH code hits master, I can do this change and then add the fsp extension logic.

Edited Dec 16, 2020 by Ralph Böhme
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: slow-acl-xattr