aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* install-xattr: IWYU fixesHEADmasterSam James2023-01-291-6/+6
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* fix-gnustack: doc: regenerateSam James2023-01-241-7/+7
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* fix-gnustack: modernise autotools usage a bitSam James2023-01-242-5/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* doc: regenerateSam James2023-01-242-15/+15
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* elfix: modernise autotools usage a bitSam James2023-01-241-3/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* install-xattr: minor test fixupsSam James2023-01-241-26/+26
| | | | | | | | | | | | | - Add set -x like we did for fix-gnustack (87ca5c5bbe63ea3c9227fdd4a01ccdc1ce723323) for easier debugging when something fails. - Use Bash tests everywhere given we're already using Bash. - Use portable Bash shebang. - Fix shellcheck nits. Signed-off-by: Sam James <sam@gentoo.org>
* install-xattr: fix chdir arg when OLDPWD is nulLSam James2023-01-241-1/+1
| | | | | | | | | | | | | | | | | | Fix core.NonNullParamChecker with chdir(). Clang's scan-build says: ``` install-xattr.c:331:9: warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker] if (chdir(oldpwd) != 0) ^~~~~~~~~~~~~ ``` It's right - oldpwd could easily have been null: ``` $ env -u OLDPWD __PORTAGE_HELPER_PATH=foo ./install-xattr --version ``` Signed-off-by: Sam James <sam@gentoo.org>
* fix-gnustack: pass -Wl,-z,execstack for tests with ClangSam James2023-01-111-1/+3
| | | | | | | Clang doesn't create executable stacks by default, so we need to force it for the purposes of the tests. Signed-off-by: Sam James <sam@gentoo.org>
* install-xattr: update copyright year, fix typoSam James2023-01-111-2/+2
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* CI: add Github ActionsSam James2023-01-101-0/+85
| | | | | | Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/elfix/pull/3 Signed-off-by: Sam James <sam@gentoo.org>
* CI: drop TravisSam James2023-01-101-23/+0
| | | | | | Obsolete. Signed-off-by: Sam James <sam@gentoo.org>
* install-xattr: fix small memory leakSam James2023-01-101-2/+4
| | | | | | | | | | | | | | | There's another with strdup/malloc but it gets a bit messier to fix so let's leave that for now (this is mostly about correctness anyway, as the runtime of install-xattr is very small): ``` Direct leak of 4097 byte(s) in 1 object(s) allocated from: #0 0x7f4a2c22e257 in __interceptor_malloc /usr/src/debug/sys-devel/gcc-13.0.0_pre20230101/gcc-13-20230101/libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0x7f4a2c1d2b40 in __interceptor_realpath /usr/src/debug/sys-devel/gcc-13.0.0_pre20230101/gcc-13-20230101/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3904 #2 0x55da3adf5629 in realpath /usr/include/bits/stdlib.h:42 #3 0x55da3adf5629 in main /home/sam/git/elfix/misc/install-xattr/install-xattr.c:252 ``` Signed-off-by: Sam James <sam@gentoo.org>
* install-xattr: avoid accessing empty storageSam James2023-01-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | UBSAN reports: ``` install-xattr.c:124:16: runtime error: load of address 0x55555556d440 with insufficient space for an object of type 'char' 0x55555556d440: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 61 00 00 00 ^ #0 0x555555557a27 in copyxattr /home/sam/git/elfix/misc/install-xattr/install-xattr.c:124 #1 0x555555556a4d in main /home/sam/git/elfix/misc/install-xattr/install-xattr.c:410 #2 0x7ffff77c864f (/usr/lib64/libc.so.6+0x2364f) #3 0x7ffff77c8708 in __libc_start_main (/usr/lib64/libc.so.6+0x23708) #4 0x555555557114 in _start (/home/sam/git/elfix/misc/install-xattr/install-xattr+0x3114) ``` Triggered with: ``` mkdir /tmp/a touch /tmp/foo ./install-xattr -c /tmp/foo /tmp/foo2 /tmp/a ``` I don't see this with Clang or < GCC 12, but I do with GCC 13 (13.0.0_pre20230101 p5); I suspect it's because of object-size improvements. Signed-off-by: Sam James <sam@gentoo.org>
* fix-gnustack: add 'set -x' in tests for easier debuggingSam James2023-01-101-0/+1
| | | | | | | It's hard to see why something failed otherwise, as we only have the exit code. Signed-off-by: Sam James <sam@gentoo.org>
* fix-gnustack: respect CFLAGS, LDFLAGS for testsSam James2023-01-101-2/+2
| | | | | | | Needed to correctly run tests with Clang, as Clang doesn't create executable stacks by default. Signed-off-by: Sam James <sam@gentoo.org>
* scripts/paxmark.sh: source the profiles for PAX_MARKINGSAnthony G. Basile2019-11-181-9/+15
| | | | | | Thanks chutzpah@gentoo.org Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* install-xattr: fix mangling of parameter order by getopt_long()Anthony G. Basile2019-11-091-21/+32
| | | | | | See: https://bugs.gentoo.org/699550 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* install-xattr: -Z and -b flags do not accept argumentsAnthony G. Basile2019-11-091-1/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* scripts/paxmark.sh: have PAX_MARKINGS default to 'none'Anthony G. Basile2019-04-221-1/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* install-xattr: address compiler warnings, bug #682110Anthony G. Basile2019-04-141-2/+3
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* install-xattr: report any errors by "stat"Nick Bowler2019-03-302-2/+9
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/paxctl-ng.c: return ENOENT if a file is not foundAnthony G. Basile2018-12-131-0/+7
| | | | | | This addresses https://bugs.gentoo.org/672072 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* attr/xattr.h is deprecated. Use sys/xattr.h insteadLars Wendler2018-11-283-4/+7
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* README.md: updateAnthony G. Basile2016-04-021-24/+22
|
* configure.ac: use autoconf 2.68Anthony G. Basile2016-02-281-1/+1
|
* travis.yml: don't do a distcheck for fix-gnustackAnthony G. Basile2016-02-281-1/+1
|
* travis.yml: pull in ibattr1-devAnthony G. Basile2016-02-281-1/+1
|
* misc/fix-gnustack/configure.ac: use autoconf 2.65 and have travis.yml pull ↵Anthony G. Basile2016-02-282-3/+3
| | | | in libelf-dev
* configure.ac: use autoconf 2.65 and convert travis.yml script to a listAnthony G. Basile2016-02-282-6/+12
|
* README.md: minor correctionAnthony G. Basile2016-02-281-1/+1
|
* Add travis.ymlAnthony G. Basile2016-02-282-0/+20
|
* misc/fix-gnustack: add GPL-3 licenseAnthony G. Basile2016-02-282-2/+674
|
* misc/bundle.sh: generalize bundle.sh for all misc packagesAnthony G. Basile2016-02-132-10/+16
|
* Update .gitignore to exclude autotools' compile scriptAnthony G. Basile2016-02-131-0/+1
|
* misc/fix-gnustack: rebuild the man page with Pod::Simple 3.28Anthony G. Basile2016-02-131-15/+24
|
* ChangeLog: updated.Anthony G. Basile2015-10-271-0/+8
|
* scripts/paxmark.sh: don't do a login bash, bug #564142.Anthony G. Basile2015-10-271-1/+1
|
* configure.ac: check for <gelf.h> only if ptpax is enabled.Anthony G. Basile2015-10-241-1/+6
| | | | Reported-by: Jory Pratt <anarchy@gentoo.org>
* scripts/paxmark.sh: default to both PT and XT.Anthony G. Basile2015-09-032-1/+4
|
* scripts/paxmark.sh: make.conf can be a directoryJames Le Cuirot2015-09-032-1/+13
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* misc/install-xattr: update ChangeLogAnthony G. Basile2015-06-081-0/+6
|
* misc/install-xattr: ignore all whitespace in PORTAGE_XATTR_EXCLUDEJason Zaman2015-05-291-2/+6
| | | | | | | | | if the PORTAGE_XATTR_EXCLUDE variable contains whitespace other than just ' ', the matching fails to exclude what comes after it. This replaces all whitespace instead of only just space. Signed-off-by: Jason Zaman <perfinion@gentoo.org>
* misc/elf-abi.c: cleanup commentsAnthony G. Basile2015-01-061-7/+8
|
* misc/elf-abi: fixup read_endian()Anthony G. Basile2015-01-061-7/+8
|
* misc/elf-abi: manually read little/big endian half or full wordsAnthony G. Basile2015-01-061-49/+84
| | | | | | | | When reading on a native system, read() transparently reads two byte or four bytes in the correct byte order and returns the correct value. But if you read() a word in a big endian file from a little endian system or vice versa, you get the wrong value. We wrap read() in read_endian() to compensate for this.
* misc/elf-abi: sort out mipsAnthony G. Basile2015-01-061-10/+16
|
* misc/elf-abi: sort out EM numbers for gentoo -- except mipsAnthony G. Basile2015-01-061-61/+55
|
* misc/elf-abi: add logic for mips abisAnthony G. Basile2015-01-061-62/+85
|
* misc/elf-abi: remove endian codeAnthony G. Basile2015-01-051-23/+0
|
* misc/elf-abi: code cleanupAnthony G. Basile2015-01-051-151/+130
|