Bug 100963 - [patch] Setuid binaries are ignored when building debuginfo package
Summary: [patch] Setuid binaries are ignored when building debuginfo package
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux Beta
Classification: Retired
Component: rpm-build
Version: beta1
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact:
URL:
Whiteboard:
: 147795 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-28 03:10 UTC by Robin Green
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-07-13 10:57:07 UTC
Embargoed:


Attachments (Terms of Use)

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. ***


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