Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 56407
Alias:
Product:
Component:
Status: NEW
Resolution:
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Brian Harring <ferringb@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 56407 depends on: Show dependency tree
Bug 56407 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: 2004-07-07 21:38 0000
It's popped up on occasion; portage should be mangling the path so sbin ends up
in it.
Easy way to see this, sudo emerge ntp and watch if fail in enewuser since
useradd can't be found.

------- Comment #1 From Rune Schjellerup 2005-05-16 03:41:34 0000 -------
The above description isn't that readable.
But it really is anoying that sudo doesn't look in sbin dirs.

Debian has that functionality as default, so should gentoo.

------- Comment #2 From Darren Dale 2005-06-08 10:42:55 0000 -------
Someone on the forums pointed out that the 1.6.8_p8 ebuilds are removing
/usr/local/bin from the secure path, but secure path seems to include
/usr/local/bin if ROOTPATH is not set.

------- Comment #3 From Alec Warner 2005-08-11 18:27:36 0000 -------
Clarification, do you want portage to mangle the path JUST for sudo, or always? 
The former is not really feasable, and the latter is just silly, IMHO.

------- Comment #4 From Robin Johnson 2005-08-11 18:40:11 0000 -------
according to the sudo documention:
       To prevent command spoofing, sudo checks "." and "" (both denoting 
current directory) last when searching for a com-
       mand in the user's PATH (if one or both are in the PATH).  Note, 
however, that the actual PATH environment variable
       is not modified and is passed unchanged to the program that sudo 
executes.

I've tested 1.6.8p9, and found it does comply with the documentation.

------- Comment #5 From Sven Vermeulen (RETIRED) 2005-08-12 00:46:52 0000 -------
Indeed; sudo deliberately doesn't set the ROOT's PATH when using sudo. This is
both documented in the sudo documentation and the various resources on the
Internet (including Gentoo's sudo guide at
http://www.gentoo.org/doc/en/sudo-guide.xml).

------- Comment #6 From SpanKY 2006-01-13 16:00:13 0000 -------
*** Bug 118847 has been marked as a duplicate of this bug. ***

------- Comment #7 From SpanKY 2006-01-13 17:41:09 0000 -------
*** Bug 118847 has been marked as a duplicate of this bug. ***

------- Comment #8 From Stefan Schweizer 2006-05-19 01:59:17 0000 -------
*** Bug 133747 has been marked as a duplicate of this bug. ***

------- Comment #9 From Jakub Moc (RETIRED) 2006-06-13 12:22:18 0000 -------
*** Bug 136697 has been marked as a duplicate of this bug. ***

------- Comment #10 From Jakub Moc (RETIRED) 2006-09-07 07:00:25 0000 -------
*** Bug 146691 has been marked as a duplicate of this bug. ***

------- Comment #11 From Paul Winkler 2006-09-07 08:07:28 0000 -------
in case it's not clear from the discussion so far, it's not just $PATH that
needs sanitizing. Summary of duplicate bug 146991 - this fails:

export Z=foo
emerge --oneshot tk

------- Comment #12 From Jakub Moc (RETIRED) 2007-06-23 08:06:53 0000 -------
*** Bug 182955 has been marked as a duplicate of this bug. ***

------- Comment #13 From Jakub Moc (RETIRED) 2007-08-12 20:57:54 0000 -------
*** Bug 188641 has been marked as a duplicate of this bug. ***

------- Comment #14 From Zac Medico 2007-10-06 17:00:31 0000 -------
*** Bug 189417 has been marked as a duplicate of this bug. ***

------- Comment #15 From Jakub Moc (RETIRED) 2007-11-11 08:34:32 0000 -------
*** Bug 198764 has been marked as a duplicate of this bug. ***

------- Comment #16 From Arthur Hagen 2007-11-11 20:47:51 0000 -------
(In reply to comment #15)
> *** Bug 198764 has been marked as a duplicate of this bug. ***
> 

I don't believe bug #198764 is a duplicate of bug #56407.  In bug #198764, the
INCLUDE variable *is* sanitized and sane, and set to exactly what it should be
set to, and should *not* be removed by portage, due to it being used when
compiling with icc.
It's the exim package that incorrectly expects INCLUDE to be of the compiler
specific form "-I/some/path".  This can be fixed by the exim maintainer by
explicitly setting INCLUDE= in Local/Makefile (until upstreams stops using all
caps variable names for private variables).
Can someone with access to do so reinstate bug #198764?

------- Comment #17 From Jakub Moc (RETIRED) 2007-12-12 08:15:58 0000 -------
*** Bug 201995 has been marked as a duplicate of this bug. ***

------- Comment #18 From Jakub Moc (RETIRED) 2008-01-12 22:00:11 0000 -------
*** Bug 204485 has been marked as a duplicate of this bug. ***

------- Comment #19 From Jakub Moc (RETIRED) 2008-02-14 09:43:01 0000 -------
*** Bug 210099 has been marked as a duplicate of this bug. ***

------- Comment #20 From Jakub Moc (RETIRED) 2008-02-14 10:04:09 0000 -------
*** Bug 210099 has been marked as a duplicate of this bug. ***

------- Comment #21 From Jakub Moc (RETIRED) 2008-02-27 08:41:15 0000 -------
*** Bug 211597 has been marked as a duplicate of this bug. ***

------- Comment #22 From Jakub Moc (RETIRED) 2008-02-29 15:10:52 0000 -------
*** Bug 211882 has been marked as a duplicate of this bug. ***

------- Comment #23 From Jakub Moc (RETIRED) 2008-03-27 12:34:23 0000 -------
*** Bug 215039 has been marked as a duplicate of this bug. ***

------- Comment #24 From Peter Volkov 2008-06-20 18:35:43 0000 -------
*** Bug 165804 has been marked as a duplicate of this bug. ***

------- Comment #25 From DEMAINE BenoƮt-Pierre, aka DoubleHP 2008-08-18 12:48:28 0000 -------
Does su behave a different way than sudo ? 

In bug #165804 (it was long time ago, but IIRC ... ) i was logged in as user
under X env in Debian, then compiling Gentoo from there. Thus, I logged in
first as user, then did su or sudo, then did chroot. In comment #4, Peter
Volkov  advises me to try this:

> BTW, for chroot personally I found solution to enter it with the following
> command:
> env -i chroot ${path} /bin/bash --login
> this will recreate environment on entering chroot... HTH.

After reading this bug, I think this workaround may help many people. I think
he is right in saying the fix should be at the emerge level: emerge needs to
read some env vars for various reasons, but, I wonder if it really should let
them accessible for ebuild execution. In present case, I wish it did not; but
long time ago, I remember I had to export LD_PRELOAD from user's .bashrc (and
could not do that from the system wide /etc/bashrc for various reasons) to use
a Socks Proxy (Microsoft gateway in the network I was using on these days) ...
a case where I would wish emerge to keep env vars to let wget know about socks
proxy ... so the solution is not as much trivial as I thought. an other example
of variable to keep is USE.

Still, all people attached to this bug could try this small WA, and report if
it helps, or not, for their respective bugs. Mine was a specific cross-install
stage problem; cant reproduce before I need to reinstall :)

------- Comment #26 From Zac Medico 2009-10-14 08:27:58 0000 -------
*** Bug 288760 has been marked as a duplicate of this bug. ***

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