Re: scp problem with remote filename escaping

2007-04-12 Thread Dan Farrell
ich others have subsequently proven works correctly for what he was attempting to achieve.) I'm done splitting hairs, danno -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew R. Dempsky Sent: Thursday, April 12, 2007 11:59 AM To: OpenBSD Subject: Re: scp

Re: scp problem with remote filename escaping

2007-04-12 Thread Matthew R. Dempsky
On Thu, Apr 12, 2007 at 10:44:52AM -0400, Dan Farrell wrote: > Wait, so every time documentation is inaccurate or incomplete or simply > not to your liking, you're going to call it a bug ``incorrect documentation is a bug'' --http://www.openbsd.org/papers/opencon06-culture.pdf > (of the applicat

Re: scp problem with remote filename escaping

2007-04-12 Thread Dan Farrell
>Bug is when behaviour is different from documentation. What is the behaviour >and what is the documentation in the case of "my file naming conventions"? Wait, so every time documentation is inaccurate or incomplete or simply not to your liking, you're going to call it a bug (of the application no

Re: scp problem with remote filename escaping

2007-04-12 Thread Karel Kulhavy
On Thu, Apr 12, 2007 at 09:33:57AM +0200, Otto Moerbeek wrote: > > On Thu, 12 Apr 2007, Karel Kulhavy wrote: > > > On Wed, Apr 11, 2007 at 10:02:50PM +0100, Stuart Henderson wrote: > > > On 2007/04/11 13:41, Bryan Irvine wrote: > > > > > > > > >I agree, spaces in filenames should be avoided. But

Re: scp problem with remote filename escaping

2007-04-12 Thread Otto Moerbeek
On Thu, 12 Apr 2007, Karel Kulhavy wrote: > On Wed, Apr 11, 2007 at 10:02:50PM +0100, Stuart Henderson wrote: > > On 2007/04/11 13:41, Bryan Irvine wrote: > > > > > > >I agree, spaces in filenames should be avoided. But spaces in > > > >filenames are legal, so programs need to support that; this

Re: scp problem with remote filename escaping

2007-04-11 Thread jared r r spiegel
On Thu, Apr 12, 2007 at 04:05:36AM +0200, Karel Kulhavy wrote: > scp needs one (1) \ for one space in case of remote file and zero (0) \ in > case > of local one. The extra \'s are for bash but bash is irrelevant in this case. > It's just one possible method of calling the process. Another method

Re: scp problem with remote filename escaping

2007-04-11 Thread jared r r spiegel
On Wed, Apr 11, 2007 at 05:01:40PM -0500, Matthew R. Dempsky wrote: > On Wed, Apr 11, 2007 at 04:33:32PM -0400, Nick ! wrote: > > Karel, single quotes cause backslashes to be backslashes, instead of > > escape chars (*except* if it's a backslash in front of a single quote, > > so that you can escap

Re: scp problem with remote filename escaping

2007-04-11 Thread Lars Hansson
Karel Kulhavy wrote: Security hole in scp. You're joking, right? Send someone an e-mail attachment named `rm -fr /`. If he uses multiple machines, it's possible he'll want to copy it and writes a similar command to the above according to the scp man page. Funny, my scp man page doesnt menti

Re: scp problem with remote filename escaping

2007-04-11 Thread Karel Kulhavy
On Thu, Apr 12, 2007 at 01:13:16AM +0300, [EMAIL PROTECTED] wrote: > On Wed, Apr 11, 2007 at 04:41:41PM -0500, Matthew R. Dempsky wrote: > > On Wed, Apr 11, 2007 at 10:02:50PM +0100, Stuart Henderson wrote: > > > On 2007/04/11 13:41, Bryan Irvine wrote: > > > > scp [EMAIL PROTECTED]:"a\ b" . > > >

Re: scp problem with remote filename escaping

2007-04-11 Thread Karel Kulhavy
On Wed, Apr 11, 2007 at 10:02:50PM +0100, Stuart Henderson wrote: > On 2007/04/11 13:41, Bryan Irvine wrote: > > > > >I agree, spaces in filenames should be avoided. But spaces in > > >filenames are legal, so programs need to support that; this seems like > > >a case scp was never tested against b

Re: scp problem with remote filename escaping

2007-04-11 Thread Karel Kulhavy
>> Of Karel Kulhavy > > >> Sent: Wednesday, April 11, 2007 3:47 PM > > >> To: OpenBSD > > >> Subject: scp problem with remote filename escaping > > >> Sounds like a bug to me - the escaping for the remote shell is not being > > >

Re: scp problem with remote filename escaping

2007-04-11 Thread Karel Kulhavy
On Wed, Apr 11, 2007 at 04:17:38PM -0400, Nick ! wrote: > On 4/11/07, Dan Farrell <[EMAIL PROTECTED]> wrote: > > > >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > >> Of Karel Kulhavy > >> Sent: Wednesday, April 11, 2007 3:47 PM >

Re: scp problem with remote filename escaping

2007-04-11 Thread Karel Kulhavy
than is written in the manpage regardless of the user's motivation. CL< > > > danno > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Karel Kulhavy > Sent: Wednesday, April 11, 2007 3:47 PM > To: OpenBSD > Subject:

Re: scp problem with remote filename escaping

2007-04-11 Thread bofh
On 4/11/07, Karel Kulhavy <[EMAIL PROTECTED]> wrote: > > For the same filename, sometimes you have to specify a different filename > to > scp, depending on whether the file is on remote system or local one. > > I have created a remote file whose filename "a b" is 3 chars long - ASCII > codes > 97,

Re: scp problem with remote filename escaping

2007-04-11 Thread Adam Hawes
> I scp'd a file called 'a b' to an openbsd server here, then scp'd it > back a couple time in different ways. It worked only when using the > quotes AND escaping, like so: > > scp [EMAIL PROTECTED]:"a\ b" . That's because of the shell. The shell on the client sees the quotes and doesn't escape

Re: scp problem with remote filename escaping

2007-04-11 Thread Adam Hawes
> I'm sure you'll give some really good reason why the files have to be > named that way... Try admining boxes which are used by EvilOS users - all of their files will be called My\ blah.

Re: scp problem with remote filename escaping

2007-04-11 Thread a . velichinsky
On Wed, Apr 11, 2007 at 04:41:41PM -0500, Matthew R. Dempsky wrote: > On Wed, Apr 11, 2007 at 10:02:50PM +0100, Stuart Henderson wrote: > > On 2007/04/11 13:41, Bryan Irvine wrote: > > > scp [EMAIL PROTECTED]:"a\ b" . > > > > you have to escape to *both* your local shell, and the remote shell > >

Re: scp problem with remote filename escaping

2007-04-11 Thread Matthew R. Dempsky
On Wed, Apr 11, 2007 at 04:33:32PM -0400, Nick ! wrote: > Karel, single quotes cause backslashes to be backslashes, instead of > escape chars (*except* if it's a backslash in front of a single quote, > so that you can escape single quotes to include them). No, backslashes have no special meaning i

Re: scp problem with remote filename escaping

2007-04-11 Thread Matthew R. Dempsky
On Wed, Apr 11, 2007 at 10:02:50PM +0100, Stuart Henderson wrote: > On 2007/04/11 13:41, Bryan Irvine wrote: > > scp [EMAIL PROTECTED]:"a\ b" . > > you have to escape to *both* your local shell, and the remote shell This has always seemed silly to me. Does anyone intentionally use $ scp host

Re: scp problem with remote filename escaping

2007-04-11 Thread Stuart Henderson
On 2007/04/11 13:41, Bryan Irvine wrote: > > >I agree, spaces in filenames should be avoided. But spaces in > >filenames are legal, so programs need to support that; this seems like > >a case scp was never tested against because no one uses files with > >those names. > > I scp'd a file called 'a

Re: scp problem with remote filename escaping

2007-04-11 Thread Simon Effenberg
On Wed, Apr 11, 2007 at 04:17:38PM -0400, Nick ! wrote: > On 4/11/07, Dan Farrell <[EMAIL PROTECTED]> wrote: > > > >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > >> Of Karel Kulhavy > >> Sent: Wednesday, April 11, 2007 3:47 PM >

Re: scp problem with remote filename escaping

2007-04-11 Thread Bryan Irvine
I agree, spaces in filenames should be avoided. But spaces in filenames are legal, so programs need to support that; this seems like a case scp was never tested against because no one uses files with those names. I scp'd a file called 'a b' to an openbsd server here, then scp'd it back a coupl

Re: scp problem with remote filename escaping

2007-04-11 Thread Nick !
On 4/11/07, Nick ! <[EMAIL PROTECTED]> wrote: On 4/11/07, Dan Farrell <[EMAIL PROTECTED]> wrote: > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > > Of Karel Kulhavy > > Sent: Wednesday, April 11, 2007 3:47 PM > > To: OpenBSD > &

Re: scp problem with remote filename escaping

2007-04-11 Thread Nick !
On 4/11/07, Dan Farrell <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Karel Kulhavy > Sent: Wednesday, April 11, 2007 3:47 PM > To: OpenBSD > Subject: scp problem with remote filename escaping > Sounds like a bug to m

Re: scp problem with remote filename escaping

2007-04-11 Thread Dan Farrell
hy the files have to be named that way... danno -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karel Kulhavy Sent: Wednesday, April 11, 2007 3:47 PM To: OpenBSD Subject: scp problem with remote filename escaping Sounds like a bug to me - the escaping for

scp problem with remote filename escaping

2007-04-11 Thread Karel Kulhavy
For the same filename, sometimes you have to specify a different filename to scp, depending on whether the file is on remote system or local one. I have created a remote file whose filename "a b" is 3 chars long - ASCII codes 97, 32, 98 scp '[EMAIL PROTECTED]:a b' . doesn't work - prints: scp: a: