Red Hat Bugzilla – Bug 503426
bfd attempts to chmod +x !S_ISREG() output files
Last modified: 2009-06-11 11:30:05 EDT
Created attachment 346036 [details]
Patch to make bfd only add +x to regular output files.
When running as a user with restrictive SELinux permissions I found that the kernel build process passes -o /dev/null to the linker in a number of places, this in turn caused the attempt to add +x to /dev/null.
This patch causes the linker to only attempt to add the execute bit on S_ISREG output files, as execute permissions on chr,blk,etc doesn't make much sense.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
Thanks for reporting this bug and providing a fix for it as well. I apologise for taking so long to respond to it.
Your patch is fine and I have added it to the rawhide binutils package (binutils-126.96.36.199.2-21.fc12).