Bug 100963 - [patch] Setuid binaries are ignored when building debuginfo package
[patch] Setuid binaries are ignored when building debuginfo package
Status: CLOSED UPSTREAM
Product: Red Hat Linux Beta
Classification: Retired
Component: rpm-build (Show other bugs)
beta1
i386 Linux
low Severity low
: ---
: ---
Assigned To: Paul Nasrat
:
: 147795 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-27 23:10 EDT by Robin Green
Modified: 2005-10-31 17:00 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-13 06:57:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Robin Green 2003-07-27 23:10:48 EDT
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 11:03:12 EDT
Just an FYI, this patch causes find-debuginfo to no longer be able to find
libraries.
Comment 3 Robin Green 2005-05-23 17:37:15 EDT
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 06:57:07 EDT
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 06:58:03 EDT
*** Bug 147795 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.