Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 93363
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Octavio Ruiz (Ta^3) <tacvbo@tacvbo.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ebuild.sh.diff ebuild.sh.diff patch Octavio Ruiz (Ta^3) 2005-05-20 12:49 0000 411 bytes Details | Diff
ebuild-functions.sh--rev1.11--fix_econf.patch ebuild-functions.sh--fix_econf.patch patch TGL 2005-06-28 04:42 0000 432 bytes Details | Diff
ebuild-functions.sh--rev1.11--fix_econf.patch ebuild-functions.sh--rev1.11--fix_econf.patch patch TGL 2005-06-28 05:10 0000 584 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 93363 depends on: Show dependency tree
Bug 93363 blocks: 87301 93180
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-05-20 12:48 0000
econf() from <=sys-apps/portage-2.0.51.22-r1 should verify the writability of
config.{sub,guess} before copying them.

Could it be fixed in portage-stable?

Note: Fixed on portage-cvs in ebuild-functions.sh since rev 1.7

------- Comment #1 From Octavio Ruiz (Ta^3) 2005-05-20 12:49:08 0000 -------
Created an attachment (id=59401) [details]
ebuild.sh.diff

------- Comment #2 From Octavio Ruiz (Ta^3) 2005-05-20 12:55:36 0000 -------
Summary changed, I was thinking in something like if [ -w ${x} ]; then chmod
u+w
${x}... Seems to be better to use the `-f` argument from cp, so no
"verification" needed, just replace it.

------- Comment #3 From Masatomo Nakano (RETIRED) 2005-05-20 19:39:43 0000 -------
*** Bug 87301 has been marked as a duplicate of this bug. ***

------- Comment #4 From Aaron Walker (RETIRED) 2005-05-22 04:55:40 0000 -------
*** Bug 93180 has been marked as a duplicate of this bug. ***

------- Comment #5 From TGL 2005-06-28 04:40:46 0000 -------
Not exactly the same bug, but really closely related:
When "libtool" is ran by an ebuild without the --copy option, config.sub is
symlinked to the /usr/share/gnuconfig file. Then the "cp -f" fails, and then the
chmod violates sandboxing. Example (with app-text/evince):

 * econf: updating evince-0.3.2/config.sub with /usr/share/gnuconfig/config.sub
cp: `/usr/share/gnuconfig/config.sub' and
`/var/tmp/portage/evince-0.3.2/work/evince-0.3.2/config.sub' are the same file
ACCESS DENIED   chmod:    
/var/tmp/portage/evince-0.3.2/work/evince-0.3.2/config.sub
chmod: changing permissions of
`/var/tmp/portage/evince-0.3.2/work/evince-0.3.2/config.sub': Permission denied

I've not found the magic "cp" option that would allow copying a file over a
symlink on itself, so i suggest adding an "rm -f" before the copy. Patch
follows, in case my explanation is not clear.

------- Comment #6 From TGL 2005-06-28 04:42:14 0000 -------
Created an attachment (id=62139) [details]
ebuild-functions.sh--fix_econf.patch

Patch is against latest CVS HEAD revision (1.11) of ebuild-functions.sh

------- Comment #7 From TGL 2005-06-28 05:07:43 0000 -------
Err... not such a smart fix actually... The real bug is the "find" expression
just above which tries to match only real files, but does not because of
operators precedence. Patch follows.

------- Comment #8 From TGL 2005-06-28 05:10:07 0000 -------
Created an attachment (id=62140) [details]
ebuild-functions.sh--rev1.11--fix_econf.patch

------- Comment #9 From Octavio Ruiz (Ta^3) 2005-06-28 06:32:03 0000 -------
See Bug #96242

------- Comment #10 From SpanKY 2005-07-04 01:28:31 0000 -------
fixed the find expr in cvs

------- Comment #11 From Jason Stubbs (RETIRED) 2005-07-14 05:47:56 0000 -------
Fixed on or before 2.0.51.22-r1 

------- Comment #12 From Jason Stubbs (RETIRED) 2005-07-14 06:58:40 0000 -------
Looking through the batch of bugs, I'm not sure that some of these are 
actually fixed in stable. Others, the requirements have possibly changed after 
the initial fix was committed. 
 
If you think this bug has been closed incorrectly, please reopen or ask that 
it be reopened. 

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug