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

xattr support for NetBSD #1332

Open
enkore opened this Issue Jul 14, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@enkore
Copy link
Contributor

enkore commented Jul 14, 2016

NetBSD has a compatibility layer to Linux' xattr API: https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/xattr.h (w/ no access to the system namespace, whatever that's used for)

/*
 * Support for file system extended attributes.
 *
 * This provides an interface that is compatible with Linux's extended
 * attribute support.  These calls operate on the same extended attributes
 * as <sys/extattr.h>, but access only the "user" namespace.
 */

The native mechanism is sys/extattr.h - this then also allows access to the system namespace.

Edit: In fact, it seems that NetBSD's extattr API is identical to FreeBSD's. So this might just be a matter of adding "netbsd" in xattr to the platform check.

Note: OpenBSD has neither ACLs nor xattrs.

@enkore enkore changed the title xattr support for Solaris, OpenIndiana, NetBSD, ... xattr support for NetBSD Jul 14, 2016

@ThomasWaldmann ThomasWaldmann added the easy label Jul 15, 2016

@enkore

This comment has been minimized.

Copy link
Contributor

enkore commented Jul 16, 2016

Can't get it to work, neither do the command line utilities (listextattr(1) etc). Everything's a EOPNOTSUP, independent of file system (FFS, UDF, ext2fs). Looking at the kernel code and config it should work with at least FFS and UDF (after initattr etc)

If someone uses NetBSD and Borg, feel free to test it whether it actually works (db6ce48)

src/borg/xattr.py:

elif sys.platform.startswith(('freebsd', 'netbsd')):
@enkore

This comment has been minimized.

Copy link
Contributor

enkore commented Jul 18, 2016

"whether it actually works" <-- (if you run the tests and the one test in src/borg/testsuite/xattr passes and is not skipped - then it works)

@ThomasWaldmann ThomasWaldmann removed the easy label Aug 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment