Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485908 - =sys-apps/elfix-0.8.3: paxctl-ng -d switch results in status=1 when user.pax.flags attribute is not present
Summary: =sys-apps/elfix-0.8.3: paxctl-ng -d switch results in status=1 when user.pax....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-25 00:32 UTC by Maxim Kammerer
Modified: 2013-11-07 15:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Return 0 on subsequent runs of paxctl-ng -d (paxctl-ng-fix-ret-code.patch,676 bytes, patch)
2013-09-26 12:17 UTC, Anthony Basile
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Kammerer 2013-09-25 00:32:49 UTC
When running "paxctl-ng -d" twice, the second invocation returns status code 1, with no error message. This is quite counter-intuitive, I suggest returning 0 when user.pax.flags has already been removed (I actually went for "paxctl-ng -d" instead of "setfattr -x user.pax.flags" because setfattr complains when the xattr is not present).
Comment 1 Anthony Basile gentoo-dev 2013-09-26 12:17:39 UTC
Created attachment 359516 [details, diff]
Return 0 on subsequent runs of paxctl-ng -d

We want to record a failure, for example, if we don't have permissions to delete the xattr filed, but it is there.  However, we don't want to record a failure if the field was never there in the first place because in a sense paxctl-ng -d does leave the file without the user.pax.flags field.

Please test this patch.  It fixes the problem for me.
Comment 2 Anthony Basile gentoo-dev 2013-09-26 12:25:55 UTC
(In reply to Anthony Basile from comment #1)

> Please test this patch.  It fixes the problem for me.

I've pushed the fix to the repository:

http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=summary

I don't think I'll add an elfix-9999 though.
Comment 3 Maxim Kammerer 2013-11-06 19:32:19 UTC
(In reply to Anthony Basile from comment #1)
> Please test this patch.  It fixes the problem for me.

Works fine for me, thanks.
Comment 4 Anthony Basile gentoo-dev 2013-11-07 15:23:47 UTC
(In reply to Maxim Kammerer from comment #3)
> (In reply to Anthony Basile from comment #1)
> > Please test this patch.  It fixes the problem for me.
> 
> Works fine for me, thanks.

This is in the tree with sys-apps/elfix-0.8.4.  Queued for stabilization in 30 days.