Opened 20 months ago

Closed 19 months ago

Last modified 19 months ago

#28843 closed enhancement (fixed)

DROPOWNERSHIP command

Reported by: atagar Owned by: nickm
Priority: Low Milestone: Tor: 0.4.0.x-final
Component: Core Tor/Tor Version:
Severity: Minor Keywords:
Cc: Actual Points: .1
Parent ID: Points:
Reviewer: mikeperry Sponsor: Sponsor8-can

Description

Hi Nick! As discussed a DROPOWNERSHIP command would be handy for the following use case...

00:04 <+atagar> Sorry, I'm probably not groking what you're suggesting. 
OwningControllerFd sounds to be for TAKEOWNERSHIP of a control socket 
(https://gitweb.torproject.org/torspec.git/tree/control-spec.txt#n3396). Do you 
mean 'don't open a control port, but open a control socket instead'?
00:05 <+nickm> It is more special than that.
00:05 <+nickm> you open a socketpair, and pass one end to tor when you start it
00:06 <+nickm> since the os enforces ownership, you don't need to do any other authentication
00:06 <+atagar> Ah. So stem opens a local socket before starting tor, provides 
this socket as a torrc argument, listens to the bootstrap messages, then 
disconnects?
00:07 <+atagar> That certainly sounds like it would do the trick.
00:08 <+atagar> In this case I don't want tor to terminate when I disconnect 
(which is the usual purpose of TAKEOWNERSHIP), but if I can avoid that this 
sounds perfect.
00:09 <+nickm> sounds like a DROPOWNERSHIP command would be sufficient for your 
needs then
00:09 <+nickm> open a ticket and I'll make one :)
00:10 <+nickm> or remind me next week
00:10 <+atagar> Wonderful! Thanks, will do.

Child Tickets

Change History (8)

comment:1 Changed 20 months ago by nickm

Milestone: Tor: 0.4.0.x-final
Owner: set to nickm
Sponsor: Sponsor8-can
Status: newaccepted

comment:2 Changed 20 months ago by nickm

Implementation in branch ticket28843, PR at https://github.com/torproject/tor/pull/587

Can anybody else write the control-spec.txt patch?

comment:3 Changed 20 months ago by nickm

Status: acceptedneeds_review

comment:4 Changed 20 months ago by atagar

Thanks Nick! Pushed a prospective spec patch to my 'dropownership' branch. I wasn't quite sure what to cite for the version or if the characteristics I describe are accurate so feedback welcome.

https://gitweb.torproject.org/user/atagar/torspec.git/commit/?h=dropownership

When merged I'll follow this feature up with a few stem integ tests to check for some of these characteristics (idempotenticy and re-establishing ownership).

comment:5 Changed 20 months ago by dgoulet

Reviewer: mikeperry

comment:6 Changed 19 months ago by mikeperry

Status: needs_reviewmerge_ready

I assume the test failure is either some travis issue or other transient failure? Seems unrelated.

This looks good otherwise. The spec too.

Last edited 19 months ago by mikeperry (previous) (diff)

comment:7 Changed 19 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Great; merged both.

comment:8 Changed 19 months ago by nickm

Actual Points: .1
Note: See TracTickets for help on using tickets.