xattr
unix extended filesystem attributes
1.6.1
240M downloads/mo
#434 most downloaded on crates.io
Stebalien/xattr
What this package is like to depend on
Last release 11 months ago
21 Sep 2025
Ships unpredictably
gaps range from 2 weeks to 3.8 years
Some releases are documented
notes for 7 of 27 stable releases
3 versions withdrawn
withdrawn after publishing
11 years old
30 releases · first in 2015
2 releases in the last 12 months
see the full history below
Release timeline
30 releases · Jul 2015 to Sep 2025Releases
latest 30-
1.6.121 Sep 2025Release notes
Open source →What's Changed
This release fixes a long-standing bug where we didn't correctly handle the return value of the FreeBSD and NetBSD xattr syscalls.
On Linux (and macOS), the xattr API returns ERANGE if the result doesn't fit in the provided buffer. On FreeBSD (and NetBSD), it returns the number of bytes read even if the syscall fails to read the entire value. This library assumed FreeBSD behaved the same as Linux.
In releases prior to 1.6.0, this issue was unlikely to be encountered in practice (except at scale) because we always checked the size before we read the attribute. It was still incorrect (TOCTOU issue), but it would have required a race with someone changing the extended attributes to trigger the bug.
In 1.6.0 this issue started showing up in testing because we try reading once with a 4KiB buffer before checking the size.
Full Changelog: v1.6.0...v1.6.1
-
1.6.021 Sep 2025 withdrawnRelease notes
Open source →What's Changed
Xattr can now read extended attribute values, list extended attributes, etc. in a single syscall instead of 2 as long as the total size is at most 4096 bytes. The downside of this change is that, e.g., if a file has more than 4KiB of extended attributes, listing extended attributes on the file will require 3 syscalls (because the first "optimistic" one will fail).
Full Changelog: v1.5.1...v1.6.0
-
1.5.125 Jun 2025Nothing published for this version
-
1.5.006 Mar 2025Release notes
Open source →Update rustix to 1.0.0. This:
- Drops the rustix dependency from freebsd/netbsd (was unused).
- Drops the direct linux-sys-raw dependency. When the rustix libc
backend is enabled, this crate will now be excluded from the dependency tree. - Fixes all the remaining issues around platform-specific
c_charhandling.
-
1.4.005 Jan 2025Release notes
Open source →- Update the minimum rustix version.
- Add gnu/hurd support.
- Implement
DefaultforXAttrs. - Implement
DebugforXAttrs.
-
1.3.115 Jan 2024Release notes
Open source →Fix a quick bug introduced in the last release: deref in get_path on
linux/macos. -
1.3.015 Jan 2024 withdrawn -
1.2.028 Dec 2023Release notes
Open source →Adds
{get,set,list,remove}_dereffunctions to operate on symlink
targets as the regular functions will operate on the symlinks
themselves. -
1.1.312 Dec 2023 -
1.1.210 Dec 2023 -
1.1.109 Dec 2023Nothing published for this version
-
1.1.009 Dec 2023 withdrawnNothing published for this version
-
1.0.129 Jul 2023Nothing published for this version
-
1.0.029 Nov 2022Nothing published for this version
-
0.2.303 May 2022Nothing published for this version
-
0.2.206 Jul 2018Nothing published for this version
-
0.2.121 Jul 2017Nothing published for this version
-
0.2.016 Jul 2017Nothing published for this version
-
0.1.1127 Feb 2017Nothing published for this version
-
0.1.1023 Aug 2016Nothing published for this version
-
0.1.923 Aug 2016Nothing published for this version
-
0.1.801 Aug 2016Nothing published for this version
-
0.1.712 May 2016Nothing published for this version
-
0.1.603 Jan 2016Nothing published for this version
-
0.1.503 Jan 2016Nothing published for this version
-
0.1.410 Sep 2015Nothing published for this version
-
0.1.310 Sep 2015Nothing published for this version
-
0.1.210 Jul 2015Nothing published for this version
-
0.1.110 Jul 2015Nothing published for this version
-
0.1.010 Jul 2015Nothing published for this version