Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fs: workaround quirkly overlayfs listxattr() (#43)
We use listxattr() with an empty buffer (as documented in the manpage) to query the size of the xattrs that are present. Unfortunately, this "empty buffer" case hits a shortcut in the xattr code in overlayfs which happens before the overlayfs-internal xattrs are filtered out. Once we perform the read "for real" we hit the filter path and the returned xattrs are smaller than we were expecting. Let's deal with that by accepting a smaller return value from the second call and truncating the buffer to that length. Thanks to Shawn Wang <[email protected]> for the report. Closes #41 Signed-off-by: Allison Karlitskaya <[email protected]>
- Loading branch information