Re: Testing wanted: OpenSSH 4.8

This is a discussion on Re: Testing wanted: OpenSSH 4.8 within the OpenSSH Development forums, part of the Networking and Network Related category; Tim Rice wrote: > On Sat, 15 Mar 2008, Damien Miller wrote: > >> On Thu, 13 Mar 2008, ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-16-2008
Carson Gaspar
 
Posts: n/a
Default Re: Testing wanted: OpenSSH 4.8

Tim Rice wrote:
> On Sat, 15 Mar 2008, Damien Miller wrote:
>
>> On Thu, 13 Mar 2008, Tim Rice wrote:

....
>>> You can not expect which to be on all platforms.

>> We already use `which` for determining an absolute path to sshd in
>> test-exec.sh. Do you have an alternative?

>
> Yes I noticed that after I posted. No I don't have an alternative.
> On further reflection I think it's only some older openserver platforms
> that will be affected and they will have other things broken in them anyway.
>
> Go ahead and use which.


Or, you could just use something like (tested with spaces in dirnames):

function mywhich {
TBIN="$1"
OIFS="$IFS"
IFS=':'
for p in $PATH; do
if test -x "$p"/"$TBIN"; then
echo "$p"/"$TBIN"
IFS="$OIFS"
return 1
fi
done
IFS="$OIFS"
return 0
}
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:21 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0