On 08/26/14 17:00, Alexander Tsoy wrote:
On Tue Aug 26 22:27:36 2014 Anthony G. Basile <bluen...@gentoo.org> wrote:
Hi everyone,

I plan to update the pax-utils.eclass because of bug #520198.   Can
people please review that bug and the latest suggestion for the eclass.
Since I'm inverting some if and for blocks, a diff isn't as useful as
just looking at the entire class.

What if scanelf will fail? Looks like pax-mark() will not report an error.

scanelf doesn't return an error code on failing to pax mark. The paxctl and paxctl-ng do. eg.

blueness@yellow /tmp $ rm -f abc
blueness@yellow /tmp $ touch abc
blueness@yellow /tmp $ scanelf -Xx abc >/dev/null ; echo $?
0

If you want a more sophisticated example, remove the PT_PAX_FLAGS program header from an elf and you get the same results. I don't think its wise to change the behavior of scanelf because its used in portage eg in constructing NEEDED.ELF.2. So its not clear what the unintended consequences would be if we did report an error here. vapier would be able to better address that. I just wrote the eclass following the current behaviour.


And there are unused variables in pax-mark(): pt_fail* and xt_fail*.


Thanks for catching the cruft.


--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : bluen...@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA


Reply via email to