summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Remove the attr.5 man page (moved to man-pages)xattratAndreas Gruenbacher2015-04-223-156/+0
| | | | | | The attr.5 page is part of the extended attribute system call documentation, which has been moved into the man-pages package. Move the attr.5 page there as well.
* Add {list,get,set,remove}xattrat() library functionsAndreas Gruenbacher2015-04-157-0/+132
| | | | | | | | | | | | Right now, these functions use the normal *xattr() and f*xattr() system calls where possible. Were both a directory file descriptor != AT_FDCWD and a non-empty path is specified, the file is opened with openat(O_PATH) resulting in a file descriptor, and the *xattr() system calls are used on "/proc/self/fd/%d" for that file descriptor. (The O_PATH file descriptor itself is not usable in the f*xattr() syscalls right now.) These functions should probably be system calls instead, or at least they should be provided by glibc.
* Remove <attr/xattr.h> and the syscall wrappersAndreas Gruenbacher2015-04-1511-198/+16
| | | | | | The xattr syscalls are provided by glibc since ages, so there is no need to use the indirect system call "syscall" anymore. This removes the need for the <attr/xattr.h> header; use <sys/xattr.h> instead.
* Remove the section 2 man pagesAndreas Gruenbacher2015-04-157-568/+0
| | | | | | The section 2 man pages have long since been added to the man-pages package which documents all system calls; they were disabled in attr by default since January 2014. Get rid of them here.
* Remove outdated tests from test/attr.testAndreas Gruenbacher2015-03-031-4/+0
| | | | | | Extended attributes are not accounted for in the real file size on most file systems, not even in ext* file systems with large inodes. Remove the associated tests.
* Remove test/ext/fs.testAndreas Gruenbacher2015-03-032-72/+1
| | | | | These tests don't do anything useful anymore on most ext4 file systemms, so remove it.
* Add setfattr --raw optionAndreas Gruenbacher2015-02-202-1/+13
| | | | | | With this option, attribute values are taken as they are, without traing to decode them. This can be thought of as the counterpart to "getfattr --only-values".
* Properly set and report empty attribute valuesAndreas Gruenbacher2015-02-203-9/+21
| | | | | | | Change getfattr to print empty attribute values as "" (including the quotes), 0x, or 0s, depending on the encoding chosen. Fix setfattr to set empty attribute values when the value specified is an empty string; before, an encoded empty value like "" (including the quotes) had to be specified.
* Man pages: Minor fixesAndreas Gruenbacher2015-02-202-2/+2
| | | | Two small wording fixes.
* build: unbreak attr_copy_fd() and attr_copy_file().Nick Alcock2014-10-206-9/+14
| | | | | | | | | | | | | | | Mike's build-system-revamping commit 9ce21bd of January this year accidentally dropped a crucial -include of "libattr.h". This silently undefined the HAVE_F*ATTR macros, causing attr_copy_{fd,file}.c to think that xattrs are not supported and to compile the functions in those files into a 'return 0;' stub. The code in these files uses the NLS _() macro, which was recently moved into misc.h, which can only sensibly be included by things outside libattr. So migrate the NLS macros into a new nls.h at the same time, and include it from misc.h. With these fixes in place, xattrs can be copied again.
* attr: Don't report a NULL attribute name when -l (list) failsAndreas Gruenbacher2014-07-081-2/+2
|
* attr_list / attr_listf: Fix cursor off-by-one errorAndreas Gruenbacher2014-07-081-2/+10
| | | | | | | | When an attribute cannot be added to the buffer in attr_list() or attr_listf(), we need to retry adding the same attribute on the next attempt, except when we didn't make progress. Reported-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
* Portability fix: <alloca.h> is Linux specificEmmanuel Dreyfus2014-06-301-0/+2
|
* Portability fixesEmmanuel Dreyfus2014-06-301-0/+11
| | | | | - <features.h> is Linux specific - Define __THROW for non glibc based systems
* telldir return value and seekdir second parameters are of type longCristian Rodríguez2014-06-101-1/+1
| | | | not off_t .. since a pretty long time.
* License fixesAndreas Gruenbacher2014-03-044-10/+10
| | | | | | The libattr library is supposed to be LGPLv2.1+ licensed, but some of the files were accidentally labeled as GPLv2+ licensed. Fix this and clarify some more license headers that mix LGPLv2.1 and GPLv2.
* test: fix cleanup & running as rootMike Frysinger2014-01-134-4/+20
| | | | | | | | | | | This fixes a bug when doing the cleanup of tests in a subdir by making sure we chdir back to our starting point. We also move the root test out of XFAIL and instead do the root checking at runtime. If we are root, the test passes nicely, otherwise it marks itself as SKIP quickly. These are fixing issues noticed when doing the update to libacl.
* include examples/ in dist tarballMike Frysinger2014-01-132-0/+4
| | | | | We don't want to build this, but we do want to include it in the release, so add it to EXTRA_DIST.
* build: ship a pkgconfig file for libattrJan Engelhardt2014-01-134-0/+15
|
* build: make use of an aux-dir to stow away helper scriptsJan Engelhardt2014-01-132-14/+3
| | | | Acked-by: Mike Frysinger <vapier@gentoo.org>
* avoid glibc-specific DECLS definesMike Frysinger2014-01-131-3/+6
| | | | This matches what we do in all the other headers.
* build: drop attrincludedir, use pkgincludedirJan Engelhardt2014-01-132-4/+2
| | | | | | | Automake already provides a variable for ${includedir}/${PACKAGE_NAME}; use it. Acked-by: Mike Frysinger <vapier@gentoo.org>
* disable installation of man(2) pages by defaultMike Frysinger2014-01-092-0/+7
| | | | | | | | | Normally the Linux man-pags project maintains pages for all Linux system calls, and they've long ago added pages for these. That means distros trying to install both hit collisions. Add a flag so people can still enable them if they want, but default to off since the man-pages project covers things.
* po: regenerate files after moveMike Frysinger2014-01-098-473/+594
|
* modernize build systemMike Frysinger2014-01-0955-2014/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deletes the hand rolled build system and replaces it entirely with autotools. The overall diffstat shows that this is a clear win, and it makes the package build/install like every other autotool package out there which makes the lives of distro maintainers a lot easier. This should also be faster by virtue of using a non-recursive build. Things to note: - to generate autotools: ./autogen.sh - to see full compile output: make V=1 - to build specific targets: make attr getfattr ... - to run tests: make check - to create a release: make distcheck -j Other non-developer things: - the xattr.conf file is now installed into sysconfdir by default - man pages are no longer compressed as this is uncommon in the autotools world and distros don't need it anyways (they already handle it automatically for most pakages) - the minor # of the shared library is now based on the package version so it'll be much bigger ... this isn't a problem, and is actually a bugfix (older releases didn't change when they should have) (Again, this is all using the standard autotool targets.)
* test: make running parallel/out-of-tree safeMike Frysinger2014-01-093-22/+46
| | | | | | | | | | Change the run program to update PATH to find the tools locally automatically. This lets us avoid having to always build in the tree and allows for direct running. Also update the program to create a tempdir for each test to run inside of. This way we can run all the tests in parallel without randomly clobbering each other.
* move gettext logic into misc.hMike Frysinger2014-01-092-1/+14
| | | | | This lets us autogenerate config.h using autoheader rather than hand maintain it.
* punt debian/rpm packaging logicMike Frysinger2014-01-0917-782/+5
| | | | | | | | | These files haven't been updated in years. The respective upstreams do their own thing now. Punt this code to make future cleanups easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org> These
* Suppress deprecation warnings when building attr and libattrAndreas Gruenbacher2014-01-092-0/+4
|
* Add a default /etc/xattr.conf fileAndreas Gruenbacher2013-11-183-0/+25
|
* Mark the Irix compatibility functions as deprecatedAndreas Gruenbacher2013-11-181-10/+20
|
* Make attr_get and attr_getf behave as described in the man pageAndreas Gruenbacher2013-11-181-4/+19
| | | | This addresses bug http://savannah.nongnu.org/bugs/?40337.
* Use autoreconf rather than autoconf to regenerate the files.Fabrice Bauzac2013-08-271-1/+1
|
* .gitignore: ignore *~ and config.h.in.Fabrice Bauzac2013-08-271-0/+2
|
* Fix ATTR_OP_REMOVE operation in attr_multi()Andreas Gruenbacher2013-05-281-6/+6
| | | | | | | The ATTR_OP_GET, ATTR_OP_SET, and ATTR_OP_REMOVE constants are not single bit values, so use comparisons instead of bit tests to check which of those operations to perform. (Up to now, ATTR_OP_REMOVE was wrongly detected as ATTR_OP_GET.)
* Makefile: rename configure.in to configure.acMike Frysinger2013-05-201-1/+1
| | | | | | | The Makefile references the configure source file by name, so update that after the rename. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* VERSION: 2.4.46 -> 2.4.47v2.4.47Brandon Philips2013-05-181-1/+1
|
* attr: respect DESTDIR when installingMike Frysinger2013-05-181-0/+2
| | | | | | | This makes the `make install DESTDIR=...` form work. It keeps support for all previous forms too (like DIST_ROOT). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* attr: Fix static build installationThomas Petazzoni2013-05-181-2/+1
| | | | | | | When doing a static build the .lai file is not created, so do not try to install it. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package: cleanup whitespace errorsBrandon Philips2013-05-183-5/+5
| | | | trailing whitespace on some lines, delete!
* Rename build/ to package/Kamil Rytarowski2013-05-189-5/+5
| | | | Keep build/ directory for out-of-source builds.
* Add missing includes against libgen.hKamil Rytarowski2013-05-182-0/+2
| | | | The function char *basename(char *path) is defined in libgen.h.
* attr: use SHELL from configureMike Frysinger2013-05-182-1/+1
| | | | | | | | | | | | | | | | | If /bin/sh is not a functional enough shell, configure will select a SHELL of /bin/bash or better. But the current build helpers always hardcode /bin/sh, so if libtool itself configures itself for /bin/bash, things will fail when it attempts to do: SHELL = /bin/sh LIBTOOL = $(SHELL) .../libtool ... eval: 1: base_compile+= -pipe: not found ... So rather than hardcoding SHELL to /bin/sh, set it to @SHELL@ and let configure find a good value for us. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* rename configure.acMike Frysinger2013-05-181-0/+0
| | | | | | | Newer autotools warn when using "configure.in" as that is the old name, and there are plans to make this fatal in the future. So rename it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libattr: syscalls: use syscalls.hRiku Voipio2013-04-301-164/+2
| | | | | | Include syscalls.h and check for __NR_setxattr being set. This fixes the build on new and odd archs but may break on really really old machines with out of date syscalls.h.
* test: fix on selinux systemsBrandon Philips2013-04-301-2/+2
| | | | | additional 'security.selinux' attrs appear on selinux systems, filter them out to get the tests to pass.
* Install the libraries to the appropriate directoryKamil Rytarowski2013-04-301-1/+1
|
* Install the missing COPYING.LGPL fileKamil Rytarowski2013-04-301-1/+2
|
* Clarify what the --only-values flag doesAndreas Gruenbacher2011-12-111-1/+1
|
* fix typos in attr.1 man pageKamil Dudka2011-05-271-2/+2
| | | | Contributed by John Bradshaw.