summaryrefslogtreecommitdiff
path: root/tests/xattr
AgeCommit message (Collapse)Author
2019-01-05fusefrontend: Allow to set/remove xattr on directory without read permission.Sebastian Lackner
Setting/removing extended attributes on directories was partially fixed with commit eff35e60b63331e3e10f921792baa10b236a721d. However, on most file systems it is also possible to do these operations without read access (see tests). Since we cannot open a write-access fd to a directory, we have to use the /proc/self/fd trick (already used for ListXAttr) for the other operations aswell. For simplicity, let's separate the Linux and Darwin code again (basically revert commit f320b76fd189a363a34bffe981aa67ab97df3362), and always use the /proc/self/fd trick on Linux. On Darwin we use the best-effort approach with openBackingFile() as a fallback. More discussion about the available options is available in https://github.com/rfjakob/gocryptfs/issues/308.
2019-01-04fusefrontend: fix setting xattrs on directoriesJakob Unterwurzacher
Directories cannot be opened read-write. Retry with RDONLY.
2019-01-02tests: xattr: set on 0200 file, list on 0000 fileJakob Unterwurzacher
https://github.com/rfjakob/gocryptfs/issues/308
2019-01-02tests: better error message for TestBase64XattrReadJakob Unterwurzacher
Make clear what we have and what we want.
2019-01-01fusefrontend: xattr: fix hang on FIFOsJakob Unterwurzacher
An Open() a fifo blocks until it is opened for writing. This meant that xattr operations on FIFOs would block. Pass O_NONBLOCK to fix that, and add a test.
2019-01-01fusefrontend: make GetXAttr() symlink-safe on LinuxJakob Unterwurzacher
Uses the /proc/self/fd trick, which does not work on Darwin.
2019-01-01tests: add Flistxattr/Fgetxattr/Fremovexattr testsJakob Unterwurzacher
Test for the upcoming fd-based xattr support.
2018-10-10tests: respect TMPDIR if setJakob Unterwurzacher
Setting TMPDIR now allows to run the tests against a directory of your choice, making it easier to test different filesystems.
2018-05-27xattr: use LGet/LSet etcJakob Unterwurzacher
Support has been merged into the xattr package ( https://github.com/pkg/xattr/pull/29 ), use it.
2018-05-10xattr: optimize storage, store as binary instead of bae64Bolshevik
Values a binary-safe, there is no need to base64-encode them. Old, base64-encoded values are supported transparently on reading. Writing xattr values now always writes them binary.
2018-03-28Switch from private copy to pkg/xattrJakob Unterwurzacher
Now that https://github.com/pkg/xattr/pull/24 has been merged there is no reason to keep our private copy. Switch to the upstream version.
2018-03-26tests: replace xattr.SupportedJakob Unterwurzacher
This function has been deprecated by the pkg/xattr upstream, so write our own.
2018-03-25fusefrontend: handle empty xattrs efficientlyJakob Unterwurzacher
We handle empty files by storing an actual empty file on disk. Handle xattrs similarily and encrypt the empty value to the empty value.
2018-03-25fusefrontend: add xattr supportJakob Unterwurzacher
At the moment, only for reverse mode. https://github.com/rfjakob/gocryptfs/issues/217