Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#3963 closed defect (fixed)

'--service install' does not prevent Tor from running normally

Reported by: rransom Owned by:
Priority: Low Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

C:\WORK\Tor\bin>tor --service install -f C:/WORK/Tor/etc/torrc
OpenSCManager() failed : Access is denied.

Sep 08 14:00:02.451 [notice] Tor v0.2.2.32 (git-877e17749725ab88). This is experimental software. Do not rely on it for strong anonymity. (Running on Windows 7 [workstation])
Sep 08 14:00:02.451 [warn] Failed to parse/validate config: Unknown option 'service'.  Failing.
Sep 08 14:00:02.451 [err] Reading config failed--see warnings above.

C:\WORK\Tor\bin>

Child Tickets

Change History (7)

comment:1 Changed 8 years ago by nickm

Looks like a bug in nt_service_parse_options(). I am guessing that for some (all, I think) of the cases in the block starting with

  if ((argc >= 3) &&
      (!strcmp(argv[1], "-service") || !strcmp(argv[1], "--service"))) {

we want to ensure that *should_exit is set to 1 before we return.

comment:2 Changed 8 years ago by nickm

Status: newneeds_review

Possible (untested!) fix in branch bug3963. Please review?

comment:3 Changed 8 years ago by rransom

Looks good. (I can't test it though.)

comment:4 in reply to:  3 Changed 8 years ago by nickm

Replying to rransom:

Looks good. (I can't test it though.)

Me neither. Do we know somebody who can?

(If not, I say we just merge -- the fix looks "obviously" right to me, so it "should" be safe. And when have I ever regretted saying that? ;) )

comment:5 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merging it and hoping for the best.

comment:6 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:7 Changed 7 years ago by nickm

Component: Tor RelayTor
Note: See TracTickets for help on using tickets.