bugzilla-daemon at mindrot.org
2004-Dec-03 15:36 UTC
[Bug 959] enhancement: supporting a remote scp path option in scp
http://bugzilla.mindrot.org/show_bug.cgi?id=959 Summary: enhancement: supporting a remote scp path option in scp Product: Portable OpenSSH Version: -current Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: scp AssignedTo: openssh-bugs at mindrot.org ReportedBy: dlssh at leach.net.au I've written some enhancements to scp.c and pathnames.h to enable the scp to arbitrarily set the remote scp path. (eg $ scp -e /usr/bin/scp foo user at bar:foo) I did read the "scp: command not found" FAQ entry but I'm not quite sure why we can't do this, unless it's because enhancements to scp are no longer a priority. Any other reason why it "is the way it is" other than that? The patch is below, all I've really done is replaced char cmd[CMDNEEDS] with char *rspcmd throughout. Forgive any dodgy coding, I'm not a developer during the day :). I haven't been able to test the patch below because I don't have a handy openbsd box, I have tested a patch under the portable version that seems to work fine. Let me know if I'm better off providing that. My reason for wanting is that it means server side scripts that wrap around forced commands can tie scp down to the absolute path. Incidentally, if there is a reason why anyone thinks this is a bad idea, please let me know. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Dec-03 15:39 UTC
[Bug 959] enhancement: supporting a remote scp path option in scp
http://bugzilla.mindrot.org/show_bug.cgi?id=959 ------- Additional Comments From dlssh at leach.net.au 2004-12-04 02:39 ------- Created an attachment (id=745) --> (http://bugzilla.mindrot.org/attachment.cgi?id=745&action=view) patches scp.c and pathname.h i don't think these two files have changed much since I created this patch (31/8/2004), so it should be fine to patch directly against the current openbsd openssh tree. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Dec-03 15:40 UTC
[Bug 959] enhancement: supporting a remote scp path option in scp
http://bugzilla.mindrot.org/show_bug.cgi?id=959 dlssh at leach.net.au changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Keywords| |openbsd Priority|P2 |P3 ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Dec-06 05:44 UTC
[Bug 959] enhancement: supporting a remote scp path option in scp
http://bugzilla.mindrot.org/show_bug.cgi?id=959 ------- Additional Comments From djm at mindrot.org 2004-12-06 16:44 ------- I'm not sure that we should add more scp options, when a user can just fix the server's $PATH. scp has required a working $PATH for many years and has survived without this. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Dec-06 06:36 UTC
[Bug 959] enhancement: supporting a remote scp path option in scp
http://bugzilla.mindrot.org/show_bug.cgi?id=959 ------- Additional Comments From dlssh at leach.net.au 2004-12-06 17:36 ------- My reason for wanting is that it means server side scripts that wrapper forced commands can tie scp down to the absolute path. When scp is executed is PATH being determined by the user shell (by virtue of the fact that sshd is doing a sh -c force_cmd)? In a restricted environment this would allow me to pattern match against the SSH_ORIGINAL_COMMAND, and I would rather be matching against an absolute (^/usr/bin/scp...$) command than a relative one (^scp...$). Perhaps my fears wrt relative path are unfounded.. Maybe this is unnecessary? a) because it isn't possible for a user to abuse the PATH variable; or b) because the PATH variable can be forced in .ssh/environment I fine with this patch being rejected if there's a better way to achieve what I want to do. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2004-Dec-07 00:59 UTC
[Bug 959] enhancement: supporting a remote scp path option in scp
http://bugzilla.mindrot.org/show_bug.cgi?id=959 djm at mindrot.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX ------- Additional Comments From djm at mindrot.org 2004-12-07 11:59 ------- Reading of ~/.ssh/environment is controlled by the PermitUserEnvironment option in sshd_config. It defaults to "no". The other ssh-related vector by which the environment may be modified by the user is through environment passing (AcceptEnv in sshd_config, SendEnv in ssh_config), it too is off by default (on both the client and the server). So, assuming that the user can't modify shell initialisation files (e.g. .bashrc), the user's $PATH is under your control and you should be able to match on the bare command safely. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.