Bug 856590
Summary: | there is still /bin/ in PATH of NON-interactive shells | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Harald Reindl <h.reindl> |
Component: | openssh | Assignee: | Petr Lautrbach <plautrba> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | laurent.rineau__fedora, mattias.ellert, maxamillion, mgrepl, ooprala, plautrba, rrakus, tmraz |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-09-24 03:26:15 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Harald Reindl
2012-09-12 11:26:33 UTC
No, it's not a bug: $ bash -c 'unset PATH; ./test.sh' hB /usr/local/bin:/usr/bin $ cat ./test.sh echo $- echo $PATH Probably you have somewhere set PATH, in rc file or in profile file. there is NO profile/rc in NON-INTARCTIVE shells what you are showing here is a INTERACTIVE shell and WHAT is this in "bash-2.03-paths.patch"? _________________________ "/usr/local/bin:/bin:/usr/bin" reflects exactly the idiotic "/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin" while calling "ssh builduser@testserver "echo \$PATH"" _________________________ - "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." + "/usr/local/bin:/bin:/usr/bin" - "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" + "/bin:/usr/bin:/usr/sbin:/sbin" (In reply to comment #2) > there is NO profile/rc in NON-INTARCTIVE shells > what you are showing here is a INTERACTIVE shell echo $- is showing you that it is NOT interactive shell - there is not `i'. (In reply to comment #3) > and WHAT is this in "bash-2.03-paths.patch"? > _________________________ > > "/usr/local/bin:/bin:/usr/bin" reflects exactly the idiotic > "/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin" while calling "ssh > builduser@testserver "echo \$PATH"" > _________________________ > > - "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:." > + "/usr/local/bin:/bin:/usr/bin" > > - "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc" > + "/bin:/usr/bin:/usr/sbin:/sbin" It's override by flag, where DDEFAULT_PATH_VALUE is set to "/usr/local/bin:/usr/bin\", what is perfectly what is the short script above showing; make "CPPFLAGS=-D_GNU_SOURCE -DRECYCLES_PIDS -DDEFAULT_PATH_VALUE='\"/usr/local/bin:/usr/bin\"' `getconf LFS_CFLAGS`" And I'm talking about bash-4.2.37-2.fc17. Check your version on target system. i tried to fix this patch and rebuild bash but with no luck there is no single config on the system which would explain from where "/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin" comes but it is a HUGE problem __________________________________ [harry@rh:~]$ ssh builduser@testserver "/home/builduser/test.sh; echo '-----------------'; cat /home/builduser/test.sh" Be careful or some guy will kill you! /usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin ----------------- echo $PATH i am surely using the latest version bash-4.2.37-2.fc17.20120912.rh.x86_64 the short script above is NOT the same as "ssh user@host command" That path comes from openssh; the path is hardcoded during configuration part: --with-default-path=/usr/local/bin:/bin:/usr/bin \ --with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \ openssh-6.1p1-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/openssh-6.1p1-1.fc18 Package openssh-6.1p1-1.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing openssh-6.1p1-1.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-13976/openssh-6.1p1-1.fc18 then log in and leave karma (feedback). openssh-6.1p1-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. can someone explain why we submit the Fedora Version (17 in this case) and ALWAYS updates are pushed for alpha/beta/next-releases? F18 does not bother me in any way this time! so "If problems still persist"is logically true openssh-5.9p1-27.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/openssh-5.9p1-27.fc17 this looks MUCH better [harry@srv-rhsoft:~]$ ssh buildserver "echo \$PATH" /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin it needed a lot of time to find out what happens here, especially the implications running rpmbuild in a ssh-session, that's why i am conservative to "features" like UsrMove with zero benefit and a high potential to break things all over the system in random ways and push such features with careless pressure to fedora-releases while most maintainers having not the time to realize that their packages are a part of the puzzle |