aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
AgeCommit message (Collapse)Author
2015-01-06Merge remote-tracking branch 'public/bug14116_025'Nick Mathewson
2015-01-06Don't crash on malformed EXTENDCIRCUIT.Nick Mathewson
Fixes 14116; bugfix on ac68704f in 0.2.2.9-alpha.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-30Add "internal" to some bootstrap statuses when no exits are available.teor
If the consensus does not contain Exits, Tor will only build internal circuits. In this case, relevant statuses will contain the word "internal" as indicated in the Tor control-spec.txt. When bootstrap completes, Tor will be ready to handle an application requesting an internal circuit to hidden services at ".onion" addresses. If a future consensus contains Exits, exit circuits may become available. Tor already notifies the user at "notice" level if they have no exits in the consensus, and can therefor only build internal paths. Consequential change from #13718.
2014-11-25Merge branch 'feature9503_squashed'Nick Mathewson
2014-11-25Sending response to SIGNAL HEARTBEAT controller command.rl1987
2014-11-25Adding 'SIGNAL HEARTBEAT' message that causes unscheduled heartbeat.rl1987
2014-11-20Make can_complete_circuits a static variable.Nick Mathewson
2014-11-16Rewriting comment for control_event_hs_descriptor_failed().rl1987
2014-11-16Adding REASON field to HS_DESC FAILED controller event.rl1987
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-26Fix a double-free in failing case of handle_control_authenticate.Nick Mathewson
Bugfix on ed8f020e205267e6270494634346ab68d830e1d8; bug not in any released version of Tor. Found by Coverity; this is CID 1239290. [Yes, I used this commit message before, in 58e813d0fcfcecfc2017. Turns out, that fix wasn't right, since I didn't look up a screen. :P ]
2014-09-25Merge branch 'libscrypt_trunnel_squashed'Nick Mathewson
Conflicts: src/test/test_crypto.c
2014-09-25More generic passphrase hashing code, including scrypt supportNick Mathewson
Uses libscrypt when found; otherwise, we don't have scrypt and we only support openpgp rfc2440 s2k hashing, or pbkdf2. Includes documentation and unit tests; coverage around 95%. Remaining uncovered code is sanity-checks that shouldn't be reachable fwict.
2014-09-21Stop silently skipping invalid args to seteventsRoger Dingledine
Return an error when the second or later arguments of the "setevents" controller command are invalid events. Previously we would return success while silently skipping invalid events. Fixes bug 13205; bugfix on 0.2.3.2-alpha. Reported by "fpxnns".
2014-09-18Fix a double-free in failing case of handle_control_authenticate.Nick Mathewson
Bugfix on ed8f020e205267e6270494634346ab68d830e1d8; bug not in any released version of Tor. Found by Coverity; this is CID 1239290.
2014-09-08Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-09-08Expand the event_mask field in controller conns to 64 bitsNick Mathewson
Back in 078d6bcd, we added an event number 0x20, but we didn't make the event_mask field big enough to compensate. Patch by "teor". Fixes 13085; bugfix on 0.2.5.1-alpha.
2014-09-03Fix a couple of small memory leaks on failure cases.Nick Mathewson
[CID 1234702, 1234703]
2014-09-02Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-09-02Fix a number of clang analyzer false-positivesNick Mathewson
Most of these are in somewhat non-obvious code where it is probably a good idea to initialize variables and add extra assertions anyway. Closes 13036. Patches from "teor".
2014-08-28Rename secret_to_key to secret_to_key_rfc2440Nick Mathewson
2014-08-21Remove a dead check for errmsg in handle_control_authenticateNick Mathewson
Coverity doesn't like doing NULL checks on things that can't be NULL; I like checking things where the logic for their not being NULL is nontrivial. Let's compromise, and make it obvious that this field can't be NULL. [Coverity CID 202004]
2014-08-21Add a missing goto to an unusable branch and make the branch LD_BUG.Nick Mathewson
(It's LD_BUG to reach this point because the hashed password values were tested earlier from options_validate) [Coverity CID 1232091]
2014-08-20Merge branch 'bug10116_squashed'Nick Mathewson
2014-08-15Autoconvert most circuit-list iterations to smartlist iterationsNick Mathewson
Breaks compilation. Used this coccinelle script: @@ identifier c; typedef circuit_t; iterator name TOR_LIST_FOREACH; iterator name SMARTLIST_FOREACH_BEGIN; statement S; @@ - circuit_t *c; ... - TOR_LIST_FOREACH(c, \(&global_circuitlist\|circuit_get_global_list()\), head) + SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, c) S + SMARTLIST_FOREACH_END(c);
2014-08-15Restore functionality for CookieAuthFileGroupReadable.Nick Mathewson
When we merged the cookieauthfile creation logic in 33c3e60a37, we accidentally took out this feature. Fixes bug 12864, bugfix on 0.2.5.1-alpha. Also adds an ExtORPortCookieAuthFileGroupReadable, since there's no reason not to.
2014-07-28Merge branch 'maint-0.2.4' into maint-0.2.5Roger Dingledine
2014-07-27Confusing log message when circuit can't be extendedArlo Breault
2014-07-09Remove executable bit from control.c, router.cNick Mathewson
Fix for 12512.
2014-05-22sandbox: allow access to cookie files, approved-routersNick Mathewson
fixes part of 12064
2014-05-14Use tor_getpw{nam,uid} wrappers to fix bug 11946Nick Mathewson
When running with User set, we frequently try to look up our information in the user database (e.g., /etc/passwd). The seccomp2 sandbox setup doesn't let us open /etc/passwd, and probably shouldn't. To fix this, we have a pair of wrappers for getpwnam and getpwuid. When a real call to getpwnam or getpwuid fails, they fall back to a cached value, if the uid/gid matches. (Granting access to /etc/passwd isn't possible with the way we handle opening files through the sandbox. It's not desirable either.)
2014-04-24Merge branch 'bug11396_v2_squashed'Nick Mathewson
Conflicts: src/or/main.c
2014-04-24Expose the real maxmeminqueues via a GETINFONick Mathewson
That is, GETINFO limits/max-mem-in-queues
2014-04-18Merge remote-tracking branch 'public/bug9963_v2_024'Nick Mathewson
2014-04-09Merge remote-tracking branch 'public/bug10431'Nick Mathewson
2014-04-08Merge branch 'bug7952_final'Nick Mathewson
Conflicts: src/test/include.am src/test/test.c
2014-04-08Making entire exit policy available to Tor controller.rl1987
2014-03-27Report only the first bootstrap failure from an orconnNick Mathewson
Otherwise, when we report "identity mismatch", we then later report DONE when the connection gets closed. Fixes bug 10431; bugfix on 0.2.1.1-alpha.
2014-03-27Log descriptor-download bootstrapping messages less verboselyNick Mathewson
This is a fix for 9963. I say this is a feature, but if it's a bugfix, it's a bugfix on 0.2.4.18-rc. Old behavior: Mar 27 11:02:19.000 [notice] Bootstrapped 50%: Loading relay descriptors. Mar 27 11:02:20.000 [notice] Bootstrapped 51%: Loading relay descriptors. Mar 27 11:02:20.000 [notice] Bootstrapped 52%: Loading relay descriptors. ... [Many lines omitted] ... Mar 27 11:02:29.000 [notice] Bootstrapped 78%: Loading relay descriptors. Mar 27 11:02:33.000 [notice] We now have enough directory information to build circuits. New behavior: Mar 27 11:16:17.000 [notice] Bootstrapped 50%: Loading relay descriptors Mar 27 11:16:19.000 [notice] Bootstrapped 55%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 60%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 65%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 70%: Loading relay descriptors Mar 27 11:16:21.000 [notice] Bootstrapped 75%: Loading relay descriptors Mar 27 11:16:21.000 [notice] We now have enough directory information to build circuits.
2014-03-11Merge remote-tracking branch 'asn/bug11069_take2'Nick Mathewson
2014-03-10Throw control port warning if we failed to connect to all our bridges.George Kadianakis
2014-03-03ATTR_NORETURN is needed on lost_owning_controller nowNick Mathewson
This should fixes some "hey, that function could have __attribute__((noreturn))" warnings introduced by f96400d9. Bug not in any released version of Tor.
2014-02-25Merge remote-tracking branch 'public/bug10449'Nick Mathewson
2014-02-06fix longname returned in HS_DESC control eventsQingping Hou
According to control spec, longname should not contain any spaces and is consists only of identy_digest + nickname added two functions: * node_get_verbose_nickname_by_id() * node_describe_longname_by_id()
2014-02-03bug10449: a dying owning controller makes Tor exit immediatelyNick Mathewson
If you want a slow shutdown, send SIGNAL SHUTDOWN. (Why not just have the default be SIGNAL QUIT? Because this case should only happen when an owning controller has crashed, and a crashed controller won't be able to give the user any "tor is shutting down" feedback, and so the user gets confused for a while. See bug 10449 for more info)
2014-02-03Defensive programming in control_event_hs_descriptor_*Nick Mathewson
It looks to me like these functions can never get called with NULL arguments, but better safe than sorry.
2014-02-03Merge remote-tracking branch 'houqp/hs_control'Nick Mathewson
2014-01-29add hidden service descriptor async control eventQingping Hou
2014-01-29Rip out all of the v2 directory code.Nick Mathewson
The remaining vestige is that we continue to publish the V2dir flag, and that, for the controller, we continue to emit v2 directory formats when requested.