Re: sshrc not working when using restricted shells on HP-UX

This is a discussion on Re: sshrc not working when using restricted shells on HP-UX within the OpenSSH Development forums, part of the Networking and Network Related category; Darren Tucker wrote: > Tob_Sch@gmx.de wrote: > [about restricted shells] >> Here's the error message during ...


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-01-2006
Darren Tucker
 
Posts: n/a
Default Re: sshrc not working when using restricted shells on HP-UX

Darren Tucker wrote:
> Tob_Sch@gmx.de wrote:
> [about restricted shells]
>> Here's the error message during starting the connection:
>>
>> sh: /bin/sh: The operation is not allowed in a restricted shell.

>
> I would interpret that as one of the commands in the sshrc failing,
> rather than parsing of the file itself failing. What's in sshrc? Does
> putting "set -x" at the top of sshrc provide any enlightenment?


Looking at the code, it does:
f = popen(_PATH_BSHELL " " _PATH_SSH_SYSTEM_RC, "w");

which is effectively running:

/bin/sh /usr/local/etc/sshrc

I suspect the difference is that the platforms that work use /bin/sh for
popen() but HP-UX uses the login shell.

Hmm, SuSv3 implies that popen should use sh, but doesn't come right out
and say it:

"The environment of the executed command shall be as if a child process
were created within the popen() call using the fork() function, and the
child invoked the sh utility using the call:

execl(shell path, "sh", "-c", command, (char *)0);"

The Linux man page says unequivocally that it uses /bin/sh. I can't
conveniently check HP-UX right now.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB 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 04:18 AM.


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