cfengine/core — pull request #1225 by tzz (2013-12-21 04:30:58+00:00)
Title: Redmine#3697: copy_from remote_variable_prefix

See https://cfengine.com/dev/issues/3697

My first attempt to implement the `remote_variable_prefix` body parameter for `copy_from`. It is not tested or fully implemented yet. Unit or acceptance tests are not done. But it's got a good heart and comes from humble roots, etc etc

It operates by having the client always set the prefix right after authenticating, if it's given. The server then prepends that prefix to every filename requested in the connection. That's it; there is nothing magic.

The **TODO** items/questions:

* on the server side, the `remote_variable_prefix` should be looked up as a variable name and if there's no such variable, the connection should be aborted

* on the client side, failing to set the prefix generates a `-2` error which is some kind of auth error. I don't know what magic constant is right there.