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
x/sys/unix: add *xattr functions on darwin. #14456
Comments
Third-party implementations are already out: https://github.com/pkg/xattr/blob/master/xattr_darwin.go |
Change https://golang.org/cl/113995 mentions this issue: |
Nice! But what about the symlink-safe variants Lgetxattr / Lsetxattr / Llistxattr etc ? It's just a matter of passing the option |
Change https://golang.org/cl/114198 mentions this issue: |
Wow, awesome! I noticed a test fails with EPERM on linux, i hit this recently, maybe related?
https://github.com/rfjakob/pkg-xattr/blob/LGet/xattr_test.go |
@rfjakob exactly, that's what I just found out too 😃 From http://man7.org/linux/man-pages/man7/xattr.7.html:
I'll just drop the corresponding tests from the CL for now. |
Ok - if you want to keep the tests, what I have done in pkg/xattr is to operate on a broken symlink, and check that we get EPERM for Lgetxattr and ENOENT for Getxattr. |
@rfjakob nice, thanks. Will do that too for |
Updates golang/go#14456 Change-Id: I04632ef1d302e938a2cc373eb90f600f01404380 Reviewed-on: https://go-review.googlesource.com/114198 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
OS X has own *xattr implementations.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/setxattr.2.html#//apple_ref/doc/man/2/setxattr
Parameter is different, but we can make workaround for this.
The text was updated successfully, but these errors were encountered: