monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] mtn sync vs use_transport_auth lua hook


From: Stephen Leake
Subject: [Monotone-devel] mtn sync vs use_transport_auth lua hook
Date: Tue, 18 Dec 2007 06:01:34 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt)

While debugging the win32 sync file: problem, I noticed an
inconsistency in the use of the use_transport_auth lua hook.

For my debugging, I wanted to compare the sequence of netsync events
when running 'mtn sync file:...' vs running 'mtn sync' and 'mtn serve'
separately. 

'mtn sync file:...' spawns a 'mtn serve --no_transport_auth --stdio',
so I wanted to run 'mtn serve --no_transport_auth' (_without_ --stdio).

But there is no way to disable transport authorization for mtn sync
over the 'normal' socket transport.

mtn sync checks the use_transport_auth lua hook in cmd_netsync.cc
find_key_if_needed, to see if it needs to fetch a key.

However, authorization is controlled by app.opts.use_transport_auth.
That is set in netsync.cc build_stream_to_server. It does not check
the hook unless the get_netsync_connect_command returns true.

I think build_stream_to_server should check the hook for the standard
transport. Since the hook is checked in one place, it should be used
consistently. In addition, if someone is running on a secure network,
they may want to save the CPU burden of computing the authorization.

-- 
-- Stephe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]