Re: [Discuss] SCP from STDIN: "-t" option undocumented?

2011-12-23 Thread Jon "maddog" Hall
As we have all experienced, once an API is published, it is a lot harder
to get rid of it.  In commercial systems you have to "retire" it.

A reason for undocumented APIs is that the creator of the command needs
the API to do something ("scratch an itch"), but did not like the way
they had programmed it and meant to go back later and re-design the
functionality, so did not want people (or at least clueless people) to
start using that functionality in that particular way.

Another reason was that the creator of the command wanted to create an
unpublished interface so they could try out the functionality in large
scale without committing to it for future releases.

Or it could simply be that they created it and forgot to document it.

md

On Fri, 2011-12-23 at 17:31 -0500, John Abreau wrote:
> In my case, I had a passwordless ssh key, and a validate-rsync script
> to use in the key's "command=" prefix in the authorized_keys file.
> I wanted to allow the same key to accept scp as well as rsync.
> I discovered the -t option when I had the validate-rsync script write
> the $SSH_ORIGINAL_COMMAND to a logfile in order to determine
> how scp works behind the scenes.
> 
> 
> 
> On Fri, Dec 23, 2011 at 2:59 PM, Jerry Feldman  wrote:
> 
> > The issue IMHO, is the lack of documentation for the -t option. I feel
> > that every interface should be documented. As a programmer I am used to
> > APIs. Historically, my colleagues find hidden APIs, and use them for
> > either because they are there or because they might be more efficient.
> 
> > How many programs have been written to use undocumented APIs
> > only to crash when the vendor changes the API without notice.
> 
> 

-- 
Jon "maddog" Hall
Executive Director   Linux International(R)
email: mad...@li.org 80 Amherst St. 
Voice: +1.603.673.7875   Amherst, N.H. 03031-3032 U.S.A.
WWW: http://www.li.org

Board Member: Uniforum Association
Board Member Emeritus: USENIX Association (2000-2006)

(R)Linux is a registered trademark of Linus Torvalds in several
countries.
(R)Linux International is a registered trademark in the USA used
pursuant
   to a license from Linux Mark Institute, authorized licensor of Linus
   Torvalds, owner of the Linux trademark on a worldwide basis
(R)UNIX is a registered trademark of The Open Group in the USA and other
   countries.

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: [Discuss] SCP from STDIN: "-t" option undocumented?

2011-12-23 Thread John Abreau
In my case, I had a passwordless ssh key, and a validate-rsync script
to use in the key's "command=" prefix in the authorized_keys file.
I wanted to allow the same key to accept scp as well as rsync.
I discovered the -t option when I had the validate-rsync script write
the $SSH_ORIGINAL_COMMAND to a logfile in order to determine
how scp works behind the scenes.



On Fri, Dec 23, 2011 at 2:59 PM, Jerry Feldman  wrote:

> The issue IMHO, is the lack of documentation for the -t option. I feel
> that every interface should be documented. As a programmer I am used to
> APIs. Historically, my colleagues find hidden APIs, and use them for
> either because they are there or because they might be more efficient.

> How many programs have been written to use undocumented APIs
> only to crash when the vendor changes the API without notice.


-- 
John Abreau / Executive Director, Boston Linux & Unix
Email j...@blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: SCP from STDIN: "-t" option undocumented?

2011-12-23 Thread Michael ODonnell


>> Maybe a patch to the scp manpage would be accepted, with that rationale?
>>
>The issue IMHO, is the lack of documentation for the -t option.


Can't you guys agree about anything?
 
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: SCP from STDIN: "-t" option undocumented?

2011-12-23 Thread Jerry Feldman
On 12/23/2011 11:35 AM, Joshua Judson Rosen wrote:
> Jerry Feldman  writes:
>> On 12/22/2011 05:38 PM, Flaherty, Patrick wrote:
 Having just now quickly RTFSC and done a few superficial experiments I
 conclude that the -t option (mnemonic for "to"; there's also a secret 
 "from"
 flag -f) is not suitable for use by humans.  It tells scp that it's in 
 "server"
 mode and should expect to communicate with its counterpart using some
 undocumented protocol that appears to mix commands and data in-band via
 stdin.  That's not the droid you're looking for...
>>> Use it anyways, no one has ever accused you of being a human -=]
>> http://linux.die.net/man/1/rcp
> "In particular, -f does not mean that the user's Kerberos ticket should
>  be forwarded!"
>
> It can be a good idea to document `interfaces for internal use only',
> just to explicitly state what they *are not*--to counteract the
> eliza effect when some hapless user happens upon them by accident,
> lest the outcome be less than happy.
>
> Maybe a patch to the scp manpage would be accepted, with that rationale?
>
The issue IMHO, is the lack of documentation for the -t option. I feel
that every interface should be documented. As a programmer I am used to
APIs. Historically, my colleagues find hidden APIs, and use them for
either because they are there or because they might be more efficient. I
would prefer that an API be published and marked as depricated or soon
to change. How many programs have been written to use undocumented APIs
only to crash when the vendor changes the API without notice. For
instance, a vendor might put in a hidden feature so internal users could
take advantage. I know IBM used to do this with their hardware so that
external vendors' hardware would operate less efficiently. Windows had
hidden interfaces for use by internal programmers and partners. So, in
this specific case, the man page should be updated to document the -t
option, but also note that this is for internal use and is intended to
differentiate between server and client.

-- 
Jerry Feldman 
Boston Linux and Unix
PGP key id:3BC1EB90 
PGP Key fingerprint: 49E2 C52A FC5A A31F 8D66  C0AF 7CEA 30FC 3BC1 EB90




signature.asc
Description: OpenPGP digital signature
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: SCP from STDIN: "-t" option undocumented?

2011-12-23 Thread Joshua Judson Rosen
Jerry Feldman  writes:
>
> On 12/22/2011 05:38 PM, Flaherty, Patrick wrote:
> > > Having just now quickly RTFSC and done a few superficial experiments I
> > > conclude that the -t option (mnemonic for "to"; there's also a secret 
> > > "from"
> > > flag -f) is not suitable for use by humans.  It tells scp that it's in 
> > > "server"
> > > mode and should expect to communicate with its counterpart using some
> > > undocumented protocol that appears to mix commands and data in-band via
> > > stdin.  That's not the droid you're looking for...
> >
> > Use it anyways, no one has ever accused you of being a human -=]
>
> http://linux.die.net/man/1/rcp

"In particular, -f does not mean that the user's Kerberos ticket should
 be forwarded!"

It can be a good idea to document `interfaces for internal use only',
just to explicitly state what they *are not*--to counteract the
eliza effect when some hapless user happens upon them by accident,
lest the outcome be less than happy.

Maybe a patch to the scp manpage would be accepted, with that rationale?

-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr."

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: SCP from STDIN: "-t" option undocumented?

2011-12-23 Thread Jerry Feldman
On 12/22/2011 05:38 PM, Flaherty, Patrick wrote:
>> Having just now quickly RTFSC and done a few superficial experiments I
>> conclude that the -t option (mnemonic for "to"; there's also a secret "from"
>> flag -f) is not suitable for use by humans.  It tells scp that it's in 
>> "server"
>> mode and should expect to communicate with its counterpart using some
>> undocumented protocol that appears to mix commands and data in-band via
>> stdin.  That's not the droid you're looking for...
> Use it anyways, no one has ever accused you of being a human -=]
http://linux.die.net/man/1/rcp



-- 
Jerry Feldman 
Boston Linux and Unix
PGP key id:3BC1EB90 
PGP Key fingerprint: 49E2 C52A FC5A A31F 8D66  C0AF 7CEA 30FC 3BC1 EB90




signature.asc
Description: OpenPGP digital signature
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/