Bug 100963

Summary: [patch] Setuid binaries are ignored when building debuginfo package
Product: [Retired] Red Hat Linux Beta Reporter: Robin Green <greenrd>
Component: rpm-buildAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: beta1CC: tmraz
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-13 10:57:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robin Green 2003-07-28 03:10:48 UTC
Description of problem:
Setuid binaries are ignored when building debuginfo package

Version-Release number of selected component (if applicable):
rpm-build-4.2.1-0.11

How reproducible:
Every time

Steps to Reproduce:
1. Build a package with a setuid binary included, such as aegis
    
Actual results:
debug info for the setuid binary is not stripped out into the debuginfo package,
nor are its sources included in the debuginfo package

Expected results:
setuid binaries should be treated just like other binaries

Additional info:
Patch:

--- /usr/lib/rpm/find-debuginfo.sh~     2003-06-05 18:00:55.000000000 +0100
+++ /usr/lib/rpm/find-debuginfo.sh      2003-07-28 03:46:26.000000000 +0100
@@ -13,7 +13,7 @@
  
 # Strip ELF binaries
 for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm
-0001 \) -exec file {} \; | \
-       sed -n -e 's/^\(.*\):[  ]*ELF.*, not stripped/\1/p'`
+       sed -n -e 's/^\(.*\):[  ]*.*ELF.* executable.*, not stripped/\1/p'`
 do
        BASEDIR=`dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT#/#p"`
        [ "$BASEDIR" = "/usr/lib/debug" ] && continue;

Comment 2 Mark Hatle 2005-05-17 15:03:12 UTC
Just an FYI, this patch causes find-debuginfo to no longer be able to find
libraries.

Comment 3 Robin Green 2005-05-23 21:37:15 UTC
Oops, that was silly of me. I introduced a new bug by adding "executable" to the
regular expression. All that was needed was to add a .* but I chose to also add
something totally irrelevant and, as it turned out, harmful. D'oh!

Comment 4 Jeff Johnson 2005-07-13 10:57:07 UTC
I've changed the sed line to:
        sed -n -e 's/^\(.*\):[  ]*.*ELF.*, not stripped/\1/p'`
to handle the "setuid" lead-in.

Added to rpm-4_4, should be in rpm-4.4.2-0.8 when built. Thanks for the patch and comment.

Comment 5 Jeff Johnson 2005-07-13 10:58:03 UTC
*** Bug 147795 has been marked as a duplicate of this bug. ***