zopencommunity / bashport

The Bourne Again shell
Apache License 2.0
8 stars 3 forks source link

bash "type ping" is not able to point to external link ping command. #55

Closed HarithaIBM closed 1 year ago

HarithaIBM commented 1 year ago

When i run command "type ping", I get o/p as "bash: type: ping: not found". But, i see ping is present under /bin/. When i run, ls -l /bin/ping , i get o/p as: erwxrwxrwx 1 BPXROOT 1 5 Apr 22 2020 /bin/ping -> OPING

Also, analysis and inputs from uss tools teams is: stat() fails for an external link. bash checks the path to a command before it tries to exec it to make sure it is executable, using stat(). bash would have to be modified to look for the specific reason code from stat() and ignore it to get it to follow external links.

More info about this issue is in thread "https://ibm-systems-z.slack.com/archives/C493603M1/p1678371986562979"

IgorTodorovskiIBM commented 1 year ago

Fixed in the latest release: https://github.com/ZOSOpenTools/bashport/releases/tag/bashport_793