Opened 14 years ago

Closed 11 years ago

#27798 closed defect (wontfix)

bad default $PATH for sshd

Reported by: vinc17@… Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: haspatch Cc:
Port: openssh

Description

/opt/local/etc/ssh/sshd_config contains:

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin

and indeed:

% ssh -p 2222 localhost echo \$PATH
/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin

IMHO, /opt/local/bin should come first so that versions provided by MacPorts are preferred. Otherwise

% ssh -p 2222 localhost rsync --version
rsync  version 2.6.9  protocol version 29

instead of the rsync provided by MacPorts. Adding the configure option

--with-default-path=${prefix}/bin:/usr/bin:/bin:/usr/sbin:/sbin

would solve the problem.

Attachments (1)

Portfile.diff (488 bytes) - added by vinc17@… 13 years ago.
Portfile patch

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by vinc17@…

Attachment: Portfile.diff added

Portfile patch

comment:1 Changed 13 years ago by jmroot (Joshua Root)

Keywords: haspatch added

comment:2 Changed 11 years ago by neverpanic (Clemens Lang)

Owner: changed from jwa@… to cal@…

I'd argue that this is the job of .profile or any other user-setup scripts, not the job of SSHd. Not all users might want to have MacPorts first in their path after sshing to a MacPorts SSHd machine.

comment:3 Changed 11 years ago by neverpanic (Clemens Lang)

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.