Bug 108420 - Make automount a PIE
Summary: Make automount a PIE
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Moyer
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 107774
TreeView+ depends on / blocked
 
Reported: 2003-10-29 09:06 UTC by Ulrich Drepper
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 4.1.3-8
Clone Of:
Environment:
Last Closed: 2004-09-01 07:14:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Minimal patch to build as PIE (622 bytes, patch)
2003-10-29 09:09 UTC, Ulrich Drepper
no flags Details | Diff

Description Ulrich Drepper 2003-10-29 09:06:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20031028
Firebird/0.7+

Description of problem:
automount is long running.  A good candidate for PIE.  I'll attach a patch.

Version-Release number of selected component (if applicable):
autofs-3.1.7-42

How reproducible:
Always

Steps to Reproduce:
1.readelf -h /usr/sbin/automount|fgrep Type
2.
3.
    

Actual Results:    Type:                              EXEC (Executable file)


Expected Results:    Type:                              DYN (Shared object file)


Additional info:

Comment 1 Ulrich Drepper 2003-10-29 09:09:59 UTC
Created attachment 95572 [details]
Minimal patch to build as PIE

Comment 2 Jeff Moyer 2004-03-22 19:58:12 UTC
I've taken your patch and ported it to the 4.1.1 code base.  In order
to push this upstream, I'd have to have some test to see whether the
compiler supports pie.  What is the best way to do so?

Comment 3 Ulrich Drepper 2004-03-22 21:03:12 UTC
I don't have an old compiler at hand but running a simple compile test
in gcc with -fpie -pie on the command line shoud do.

Write a configure test which temporarily adds -fpie to CFLAGS and -pie
to LDFLAGS and then compile and link a dummy program.   Should be
perhaps 10 lines of autoconf code.


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