| Summary: | Problem with non-interactive logins and bash on Solaris | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Chris O'Regan <chris.oregan> |
| Component: | sshd | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | CLOSED WONTFIX | ||
| Severity: | normal | CC: | djm, knuto, t8m |
| Priority: | P2 | ||
| Version: | 5.1p1 | ||
| Hardware: | UltraSPARC | ||
| OS: | Solaris | ||
|
Description
Chris O'Regan
2008-09-12 12:23:56 AEST
I experience what seems to be the same problem on Fedora Core 9, version: openssh-5.1p1-2.fc9 The current openssh server uses pipes instead of sockets to communicate with the shell. bash recognized stdin as socket and called .bashrc in this case. With pipe as stdin the bash runs as any other non-interactive shell and doesn't read .bashrc. There is also possibility to recompile bash so it recognizes ssh through the environment variable SSH_CLIENT. The problem here is bash making an unwarranted assumption about the environment it operated in. OpenSSH has always used either pipes or socketpairs depending on the operating system it was running on, so bash's assumption was incorrect for platforms other than Linux anyway. Apparently there is compile-time flag that one can set for bash that resolves the problem: https://bugzilla.redhat.com/attachment.cgi?id=321287&action=diff (I haven't tried it) Move resolved bugs to CLOSED after 5.7 release |