This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cannot exec() program outside of /bin if PATH is unset
- From: Christian Franke <Christian dot Franke at t-online dot de>
- To: cygwin at cygwin dot com
- Date: Thu, 16 Oct 2014 23:51:09 +0200
- Subject: Re: Cannot exec() program outside of /bin if PATH is unset
- Authentication-results: sourceware.org; auth=none
- References: <20141009100317 dot GI29235 at calimero dot vinschen dot de> <54369ADE dot 7060201 at redhat dot com> <20141009162906 dot GA25389 at calimero dot vinschen dot de> <571726 dot 85545 dot bm at smtp112 dot sbc dot mail dot ne1 dot yahoo dot com> <20141010103446 dot GJ2681 at calimero dot vinschen dot de> <CAO1jNwt5UyB9CDKJdotXUND--mg1sY-5Fu+-ZHf2atM5_=HArA at mail dot gmail dot com> <CAMCbSMrar1Zu4p6gN=gc8-XqE-8RUTmP3er0ujeN--CHKzCNAQ at mail dot gmail dot com> <816144 dot 8551 dot bm at smtp119 dot sbc dot mail dot ne1 dot yahoo dot com> <CAMCbSMpWKbSVhVu85_02fN3sgWXiFBkUzjOOAJ6+Jxot8X6E=Q at mail dot gmail dot com> <20141010153925 dot GL2681 at calimero dot vinschen dot de> <20141014193045 dot GF2681 at calimero dot vinschen dot de>
Corinna Vinschen wrote:
...
I implemented this in the latest snapshot. It calls SetDllDirectory
on Cygwin's /bin, and dlopen addiotnally tries to load the DLL with
LoadLibraryEx(LOAD_WITH_ALTERED_SEARCH_PATH) if all else failed.
For some reason, the SetDllDirectory() call has no effect for exec():
Testcase:
$ unset PATH
$ uname -srvm
-bash: uname: No such file or directory
$ /bin/uname -srvm
CYGWIN_NT-6.1-WOW64 1.7.33s(0.277/5/3) 20141014 19:44:03 i686
$ /usr/sbin/alternatives
/usr/sbin/alternatives: error while loading shared libraries: ?: cannot
open shared object file: No such file or directory
$ PATH=/bin /usr/sbin/alternatives
alternatives version 1.3.30c - ...
$ cd /bin
$ /usr/sbin/alternatives
alternatives version 1.3.30c - ...
Please give the latest snapshot from https://cygwin.com/snapshots/
a try.
No regressions found yet :-)
Christian
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple