First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 136027
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Andrea Barisani (RETIRED) <lcars@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: David Brown <gentoo@davidb.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
sudo-1.6.8_p9-r2.ebuild.patch-remove-gcc-bin-from-path Patch against sys-admin/sudo-1.6.8_p9-r2 removing ../gcc-bin/.. path elements (oops. reverse patch -- sorry) patch Aaron Brooks 2006-06-23 19:18 0000 1.05 KB Details | Diff
sudo-1.6.8_p9-r2.ebuild.patch-remove-gcc-bin-from-path Patch against sys-admin/sudo-1.6.8_p9-r2 removing ../gcc-bin/.. path elements patch Aaron Brooks 2006-06-28 19:36 0000 1.05 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 136027 depends on: Show dependency tree
Bug 136027 blocks:
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: 2006-06-07 22:45 0000
The 'app-admin/sudo' package hardcodes the ROOT_PATH into its executable.  If a
user changes GCC versions, but doesn't rebuild sudo, then commands executed via
sudo will still use the old gcc version.  It would be useful to mention this in
the gcc-upgrade manual.

The rebuild of sudo is a little tricky, since if you use sudo to do it, it will
still get the old path.  The easiest way to do it is:

  % sudo bash -l
  # emerge app-admin/sudo

With the 'bash -l' giving a login shell, which will run the /etc/profile again.

------- Comment #1 From Aaron Brooks 2006-06-23 19:13:58 0000 -------
This issue is not a documentation issue -- there's a fix to this.

The gcc wrapper that is provided by gcc-config checks $PATH in the
user's environment first but will fall back and check /etc/env.d/05gcc
if $PATH does not contain a gcc-bin path. See:

    /usr/portage/sys-devel/gcc-config/files/wrapper-1.4.7.c

Since sudo is always configured --with-secure-path="$ROOTPATH",
$ROOTPATH should have the gcc-bin stripped from it.

I think it's pretty clear that since the gcc-bin path is specific to
a compiler version, compiling it into sudo will necessarily result in
a broken sudo. In my opinion the correct action is to strip gcc-bin
from $PATH allowing the gcc wrapper to check the more up to date value
in /etc/env.d/.

I'm attaching a patch to sudo-1.6.8_p9-r2.ebuild which performs the
above. This patch works on my system.

------- Comment #2 From Aaron Brooks 2006-06-23 19:18:20 0000 -------
Created an attachment (id=89971) [edit]
Patch against sys-admin/sudo-1.6.8_p9-r2 removing ../gcc-bin/.. path elements

------- Comment #3 From Josh Saddler 2006-06-24 08:40:42 0000 -------
Not a documentation bug; reassigning.

------- Comment #4 From Aaron Brooks 2006-06-28 19:36:58 0000 -------
Created an attachment (id=90397) [edit]
Patch against sys-admin/sudo-1.6.8_p9-r2 removing ../gcc-bin/.. path elements

------- Comment #5 From Aaron Brooks 2006-08-02 17:17:59 0000 -------
Is there anything happening with this bug? The current behavior of
sudo breaks gcc-wrapper functionality, making it impossible to switch
gcc profiles while using sudo. This should be fixed. The attached
patch is sufficient to create the correct behavior.

------- Comment #6 From Tavis Ormandy (RETIRED) 2006-08-06 09:34:55 0000 -------
p12-r1 in cvs fixes this issue, it's ~x86 currently but assuming everything
goes well I'll file a stable request soon.

Thanks for the patch.

First Last Prev Next    No search results available      Search page      Enter new bug