Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95532 - [QA] apache-2: /usr/sbin/suexec2 is setXid, dynamically linked and using lazy bindings
Summary: [QA] apache-2: /usr/sbin/suexec2 is setXid, dynamically linked and using lazy...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-09 01:23 UTC by Jakub Moc (RETIRED)
Modified: 2005-12-28 09:49 UTC (History)
2 users (show)

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


Attachments
apache-suexec-nolazybinding.diff (apache-suexec-nolazybinding.diff,295 bytes, patch)
2005-09-20 01:51 UTC, Tobias Sager
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2005-06-09 01:23:33 UTC
QA Notice: /usr/sbin/suexec2 is setXid, dynamically linked and using lazy bindings.
This combination is generally discouraged. Try: CFLAGS='-Wl,-z,now' emerge apache

Reproducible: Always
Steps to Reproduce:



Expected Results:  
Please, treat this in the ebuild when you have a few minutes to spare. Thanks. ;-)
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-09-17 18:21:53 UTC
I've seen this error, but I have no idea what it means or how to fix it. Any
suggestions?
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-09-18 02:47:06 UTC
(In reply to comment #1)
> I've seen this error, but I have no idea what it means or how to fix it. Any
> suggestions?

The fix is to link the binary with -Wl,-z,now

man ld:

<snip>
When generating an executable or shared library, mark it to tell the dynamic
linker to resolve all symbols when the program is started, or when the shared
library is linked to using dlopen,  instead  of  deferring  function call
resolution to the point when the function is first called.
</snip>

As for explanation, iirc this check was added by vapier or solar, so they are
best qualified to explain. ;)
Comment 3 Tobias Sager 2005-09-20 00:55:17 UTC
There are more bugs on this issue in Bugzilla:
http://bugs.gentoo.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&long_desc_type=substring&long_desc=dynamically+linked+and+using+lazy+bindings&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=

By using those additional CFLAGS, gcc passes the linker (ld) the flag
"-z now" which stands for this:
<snip src="man ld">
           now When  generating  an  executable  or  shared  library,  mark it
to tell the dynamic linker to
               resolve all symbols when the program is started, or when the 
shared  library  is  linked  to
               using dlopen, instead of deferring function call resolution to
the point when the function is
               first called.
</snip>

Somehow these CFLAGS need to be used while compiling suexec2.
Comment 4 Tobias Sager 2005-09-20 01:51:46 UTC
Created attachment 68846 [details, diff]
apache-suexec-nolazybinding.diff

This adds "-Wl,-z,now" to the linker flags of the suexec binary.
Comment 5 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-23 16:24:25 UTC
fixed in CVS.
Comment 6 Paul Varner (RETIRED) gentoo-dev 2005-12-28 09:49:04 UTC
Now that portage-2.0.53 is out, if someone is using FEATURES="stricter", this is considered a fatal error. I ran into this with the latest stable version (apache-2.0.54-r31).

What is the possibility of getting a version of apache stabilized that contains this fix?