summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* getfattr: Minor fix to the --help textHEADmasterAndreas Gruenbacher2023-03-161-1/+1
| | | | | | The --help text didn't mention that -m is an alias for --match. Reported-by: Jiří Kalvoda <jirikalvoda@ucw.cz>
* libattr: Set symbol versions for legacy syscalls via attribute or asmAlexander Miller2023-02-133-22/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, a linker script is used to define versioned symbols for the legacy linux syscalls with simple assignments. That isn't mentioned in ld's documentation as a valid method to set symbol versions, and while one might assume that it should work and the linker script is accepted, the result often isn't correct: gold and lld always create broken binaries, and even the bfd linker can create unusable symbols if used with --gc-sections or LTO. For example, the result can be a library where the function has been discarded and the versioned symbol is unusable, i.e., 23: 00000000 0 NOTYPE GLOBAL DEFAULT ABS getxattr@ATTR_1.0 instead of 23: 000033c0 0 FUNC GLOBAL DEFAULT 11 getxattr@ATTR_1.0 Meanwhile, lld doubles the version suffix: getxattr@ATTR_1.0@ATTR_1.0 Not that these issues may be viewed as linker bugs, and there may or may not be some related improvements to linker script handling since I tested this a few months ago (binutils-2.37, lld-14). But in either case a more robust solution would be preferable. So remove the linker script entirely and set symbol versions with __attribute__((__symver__(...))) if available (i.e., in gcc >= 10, but not in clang). Otherwise use the traditional global asm solution with a .symver directive. These are the well documented methods (along with version scripts, which don't apply here) to set symbol versions and work correctly with all linkers, including older versions. A workaround that is needed for gcc < 10 not to break LTO partitioning with global asm is also included (__attribute__((__no_reorder__))), but some very old versions may still need -flto-partition=none to build correctly with LTO (not going to bother with completely obsolete versions). Signed-off-by: Alexander Miller <alex.miller@gmx.de>
* update various URLsMike Frysinger2022-12-302-5/+5
|
* man: Use apostrophe instead of acute accentGuillem Jover2022-12-104-7/+7
| | | | | | | | The groff sequence «\'» generates an acute accent, when the intention here was to use apostrophe. Warned-by: lintian Signed-off-by: Guillem Jover <guillem@hadrons.org>
* man: Remove mdoc-specific macros from man formatted man pagesGuillem Jover2022-12-105-8/+0
| | | | | Warned-by: lintian Signed-off-by: Guillem Jover <guillem@hadrons.org>
* po: Update French translationJean-Pierre Giraud2022-12-101-54/+77
| | | | Signed-off-by: Guillem Jover <guillem@hadrons.org>
* tools: mark long_options static & constMike Frysinger2022-12-102-2/+2
| | | | This is read-only data, so don't include it in the read/write page.
* po: Add Georgian translationTemuri Doghonadze2022-12-102-1/+234
| | | | Signed-off-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
* Add $(LTLIBINTL) to libattr_LIBADD tools_ldaddArsen Arsenović2022-11-192-1/+4
| | | | | | On some platforms, libc does not provide gettext, and hence, more work is necessary to get gettext to link. AM_GNU_GETTEXT covers for this case and emits a $(LTLIBINTL) that we can use on those platforms.
* build: require automake 1.13+Mike Frysinger2022-11-191-1/+1
| | | | | | This version brings some improvements & fixes over 1.11, and was released around the same time as autoconf-2.69 that we already require.
* po: Update Dutch translationFrans Spiesschaert2022-11-191-123/+128
| | | | Signed-off-by: Guillem Jover <guillem@hadrons.org>
* build: switch to AC_CONFIG_HEADERSMike Frysinger2022-11-161-1/+1
| | | | | The AC_CONFIG_HEADER macro was deprecated a while ago, and the new one behaves the same but without triggering a warning.
* build: Only include the compat syscall stubs on Linux systemsGuillem Jover2022-11-162-3/+19
| | | | | | | | | These are Linux specific syscalls. Other systems either already have these function on their libc, or would need different implementations. This restores the previous behavior before the build system modernization. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* man: Fix various typosGuillem Jover2022-11-122-4/+4
| | | | | Warned-by: lintian Signed-off-by: Guillem Jover <guillem@hadrons.org>
* examples: Check "user." as a prefix not as the entire stringGuillem Jover2022-11-121-1/+1
| | | | | | | The code was not matching any intended attribute as it was checking for the entire string. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* Ignore examples/copyattrGuillem Jover2022-11-121-0/+1
| | | | | | | When building the example code at least to make sure it actually builds, we'll be left out with a dirty tree. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* build: Use LDLIBS instead of LDFLAGS for librariesGuillem Jover2022-11-121-1/+1
| | | | | Otherwise gcc will fail to link the program due to missing attr_copy_file() symbol.
* build: Fix for incompatibility with autoconf 2.13Wookey2022-11-121-0/+1
| | | | | | | | | This project will not build if autconf2.13 is installed. Adding AC_PREREQ allows the automatic checks to run the correct version of autconf, whichever is installed, or to get a clear error message about the problem. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* use autoconf APIs to test & error outMike Frysinger2022-11-121-4/+2
| | | | Practically speaking, it should be the same.
* Polish translation updateJakub Bogusz2022-05-211-53/+55
|
* Fix stale attr(5) referencesŠtěpán Němec2022-03-084-5/+5
| | | | | | | | | | | | | The man page has been named xattr(7) since 2015, cf. the following man-pages commit: commit 43834827b827 Author: Michael Kerrisk <mtk.manpages@gmail.com> Date: Wed Apr 22 14:29:42 2015 +0200 xattr.7: Rename from attr.7 Signed-off-by: Štěpán Němec <stepnem@gmail.com>
* attr: eliminate a dead store in attr_copy_action()Kamil Dudka2021-04-191-2/+1
| | | | | | ... reported by clang: libattr/attr_copy_action.c:158:22: warning[deadcode.DeadStores]: Value stored to 'action' during its initialization is never read
* Version 2.5.1v2.5.1Andreas Gruenbacher2021-03-169-9/+9
|
* Fix libtool library versioning regressionAndreas Gruenbacher2021-03-161-1/+6
| | | | | | | | | | | | LT_REVISION was computed from PACKAGE_VERSION by stripping the dots from PACKAGE_VERSION. This caused LT_REVISION to change from 2448 down to 250 when the version changed from 2.4.48 to 2.5.0. This broke ldconfig versioning and caused the library symlinks to break after a package update. https://bugzilla.redhat.com/1938459#c9 Reported by: Kamil Dudka <kdudka@redhat.com>
* Version 2.5.0v2.5.0Andreas Gruenbacher2021-03-111-1/+1
|
* Update po files and German translationAndreas Gruenbacher2021-03-119-936/+955
| | | | | Add a convenience rule for updating the po files to the main Makefile. Use that for updating the po files. Update the German translation.
* getfattr: Add --one-file-system optionAndreas Gruenbacher2021-03-113-0/+17
| | | | | Add a --one-filesystem option to getfattr. With this option, getfattr will not cross mount points, similar to "tar --one-file-system".
* Move struct stat into struct walk_tree_argsAndreas Gruenbacher2021-03-111-14/+14
|
* Move list of open directories into struct walk_tree_argsAndreas Gruenbacher2021-03-111-30/+29
|
* Move walk_tree_rec arguments into a separate structAndreas Gruenbacher2021-03-111-32/+49
|
* xattr.conf: Indicate afs metadata xattrs should be skipped when copyingDavid Howells2020-11-031-0/+1
| | | | | Indicate that afs metadata xattrs should be skipped when copying, particularly ACLs as these aren't valid cross-cell.
* Fix typos in manual pagesSamanta Navarro2020-10-082-2/+2
|
* Update my email addressAndreas Gruenbacher2020-02-067-7/+7
|
* man: add examples to setfattr.1Achilles Gaikwad2020-02-061-0/+12
| | | | | | | | The current man page for setfattr does not state that the user needs to add the prefix "user." With the help of examples we demonstrate that the user needs to add a namespace as prefix. Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
* install-data: Don't remove unrelated empty directoriesAndreas Gruenbacher2019-08-161-2/+1
| | | | | | | The conversion to automake apparently left over an rmdir statement that removed empty directories under $(DESTDIR)$(mandir). Fix that. https://savannah.nongnu.org/bugs/?56763
* attr: Replace bzero with memsetRosen Penev2019-08-123-5/+5
| | | | | | | bzero is a deprecated function that is optionally unavailable with uClibc-ng. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* getfattr: don't count terminating NULL in well_enough_printableJeff Layton2019-06-131-0/+4
| | | | | | | | | | If the value is a string with the terminating NUL included in the length, then don't count that terminating NUL when determining whether the string is printable. This is consistent with the fact that getfattr doesn't print the terminating NUL character in --encoding=text (commit 7fed4441e12d). Signed-off-by: Jeff Layton <jlayton@kernel.org>
* attr_list, attr_listf: Guard against unterminated bufferAndreas Gruenbacher2018-12-171-5/+7
| | | | | | attr_list and attr_listf can crash when the listxattr, llistxattr, or flistxattr syscalls incorrectly return an unterminated buffer. Guard against that by always appending a null character.
* attr_multi, attr_multif: Don't set errno to -EINVALAndreas Gruenbacher2018-12-171-2/+2
| | | | | | When attr_multi or attr_multif are called with an invalid am_opcode, they fail with errno set to -EINVAL. Instead, the errno value should be positive.
* Switch back to syscall()Andreas Gruenbacher2018-08-171-12/+14
| | | | | | | | | | | | | | | | | | | | | Switch back to syscall() for the *xattr system calls. The current mechanism of forwarding those calls to glibc breaks libraries like libfakeroot (fakeroot) and libasan (the gcc address sanitizer; gcc -fsanitize=address). Those libraries provide wrappers for functions defined in other shared libraries, usually glibc, do their own processing, and forward calls to the original symbols looke dup via dlsym(RTLD_NEXT, "symbol_name"). In our case, dlsym returns the libattr_*xattr wrappers. However, when our wrappers try calling glibc, they end up calling the libfakeroot / libasan wrappers instead because those override the original symbols => recursion. The libattr_*xattr wrappers will only be used when symbols are looked up at runtime (dlopen / dlsym). Programs linking against libattr will directly use the glibc provided symbols. Therefore, the slightly worse performance of syscall() won't affect any of the "normal" users of libattr.
* attr_list.3: Fix the attributes.h include pathAndreas Gruenbacher2018-07-031-1/+1
| | | | | The header file is located at <attr/attributes.h>. Make the attr_list.3 man page consistent with the other man pages.
* getfattr.1: by default only user namespace attributes are dumpedSimon Ruderich2018-01-211-3/+3
|
* Enable large-file support on systems that do not enable it by defaultDmitry V. Levin2018-01-212-0/+7
| | | | | | | | | | | | | | Invoke AC_SYS_LARGEFILE to enable large-file support. This fix doesn't change the library as much as the tools because the only affected function in libattr is attr_copy_action that calls attr_parse_attr_conf that in turn calls fopen(ATTR_CONF, "r"). What is the most affected is getfattr, without the fix it just cannot process large files, e.g. $ truncate -s2G large-file && getfattr large-file getfattr: large-file: Value too large for defined data type
* man: standardize AUTHORS sectionMike Frysinger2018-01-213-2/+18
| | | | Point people to the Savannah project now.
* man: fix bold style in SEE ALSO sectionMike Frysinger2018-01-218-21/+17
| | | | See STYLE GUIDE in man-pages(7) for more details.
* test: escape left brace in a regex in test/runTroy Dawson2018-01-211-1/+1
| | | | | | ... to fix test-suite failure with perl-5.26.0 Bug: https://bugzilla.redhat.com/1473853
* attr: Fix segmentation faultv2.4.48Andreas Gruenbacher2017-09-151-0/+4
| | | | | | | | | | | When the -V option is used without -s, attr will cause a segmentation fault instead of reporting an error: $ touch somefile $ attr -V whatever somefile Segmentation fault (core dumped) https://savannah.nongnu.org/bugs/?48244
* po: updateAndreas Gruenbacher2017-09-158-188/+196
| | | | Contains no translation changes.
* setfacl: Include errno.hAndreas Gruenbacher2016-12-111-1/+1
| | | | | | In file tools/setfattr.c:33:0, gcc -Wcpp complains that including <sys/errno.h> is incorrect and that <errno.h> should be included instead. Reported by Matias A. Fonzo <selk@dragora.org>.
* copy_action: drop unused alloca.h includeMike Frysinger2016-12-091-3/+0
| | | | This file doesn't use alloca(), so no point in including the header.