Re: Force dbclient to exit if remote forwarding request failed

2015-11-30 Thread Konstantin Tokarev


30.11.2015, 16:58, "Matt Johnston" :
> On Mon, Nov 30, 2015 at 04:21:29PM +0300, Konstantin Tokarev wrote:
>>  >>  I'd like to see that as a feature - I was thinking about it a few days 
>> ago. I'd keep it under a command line flag for backwards compatibility. 
>> Failing to bind "-L" forward ports would also be handled similarly.
>>  >>
>>  > Could you propose command line option name? I guess the main problem is 
>> to avoid collision with OpenSSH client options.
>>  Maybe its time to add -o and use OpenSSH-compatible -o 
>> ExitOnForwardFailure=yes?
>
> That does seem like it might the best option. As long as
> people don't expect all the OpenSSH -o names to start
> getting implemented! :)

Implemented in https://github.com/mkj/dropbear/pull/16

1. I'm not sure if "extended options" is the right term, as well as if help 
texts are written properly.
2. Should -o handling itself be opt-in feature?
3. Should netcat-like forwarding be affected by ExitOnForwardFailure? If so, 
where its failure should be handled?

-- 
Regards,
Konstantin


Re: Force dbclient to exit if remote forwarding request failed

2015-11-30 Thread Matt Johnston
> On Mon 30/11/2015, at 7:24 pm, Konstantin Tokarev  wrote:
> dbclient: Remote TCP forward request failed (port 3320 -> localhost:22)
> 
> ...
> 1. Is there any way to force dbclient to exit in this case?
> 2. If not, would it be reasonable feature to have in dbclient?

Hi Konstantin,

I can't think of a good way to force exit apart from grepping the command 
output for the error message.

I'd like to see that as a feature - I was thinking about it a few days ago. I'd 
keep it under a command line flag for backwards compatibility. Failing to bind 
"-L" forward ports would also be handled similarly.

I'll put it on the todo list, or patches accepted.

Cheers,
Matt

Re: Force dbclient to exit if remote forwarding request failed

2015-11-30 Thread Konstantin Tokarev


30.11.2015, 15:39, "Matt Johnston" :
>>  On Mon 30/11/2015, at 7:24 pm, Konstantin Tokarev  wrote:
>>  dbclient: Remote TCP forward request failed (port 3320 -> localhost:22)
>>
>>  ...
>>  1. Is there any way to force dbclient to exit in this case?
>>  2. If not, would it be reasonable feature to have in dbclient?
>
> Hi Konstantin,
>
> I can't think of a good way to force exit apart from grepping the command 
> output for the error message.
>
> I'd like to see that as a feature - I was thinking about it a few days ago. 
> I'd keep it under a command line flag for backwards compatibility. Failing to 
> bind "-L" forward ports would also be handled similarly.
>
> I'll put it on the todo list, or patches accepted.

Could you propose command line option name? I guess the main problem is to 
avoid collision with OpenSSH client options.

-- 
Regards,
Konstantin