summaryrefslogtreecommitdiff
path: root/src/or/control.c
AgeCommit message (Collapse)Author
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-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-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.
2013-10-28Merge branch 'morestats4' into morestats5Karsten Loesing
Conflicts: doc/tor.1.txt src/or/config.c src/or/connection.h src/or/control.c src/or/control.h src/or/or.h src/or/relay.c src/or/relay.h src/test/test.c
2013-10-28squash! Pass const uint64_t pointers, document array length.Karsten Loesing
Don't cast uint64_t * to const uint64_t * explicitly. The cast is always safe, so C does it for us. Doing the cast explitictly can hide bugs if the input is secretly the wrong type. Suggested by Nick.
2013-10-21DROPGUARDS controller commandNick Mathewson
Implements ticket 9934; patch from "ra"
2013-09-13Add a --dump-config option to help testing option parsing.Nick Mathewson
2013-09-12Pass const uint64_t pointers, document array length.Karsten Loesing
Suggested by nickm.
2013-09-12Don't format cell stats for unattached circuits.Karsten Loesing
2013-08-25Cleanup whitespacesNick Mathewson
2013-08-25Basic unit test for EVENT_TRANSPORT_LAUNCHEDNick Mathewson
2013-08-25Widen event_mask_t to 64 bitsNick Mathewson
2013-08-25Implement the TRANSPORT_LAUNCHED control port event.George Kadianakis
2013-08-22Hide the contents of the circuit_build_times structure.Nick Mathewson
There were only two functions outside of circuitstats that actually wanted to know what was inside this. Making the structure itself hidden should help isolation and prevent us from spaghettifying the thing more.
2013-08-15Rename circuit_get_global_list to remove trailing _Nick Mathewson
2013-08-15Merge remote-tracking branch 'majek/bug9108'Nick Mathewson
Conflicts: src/or/circuitlist.h
2013-08-15Write some free_all functions to free the auth. cookies.George Kadianakis
We started allocating space for them on the heap in the previous commit. Conflicts: src/or/ext_orport.h
2013-08-15Implement and use a generic auth. cookie initialization function.George Kadianakis
Use the generic function for both the ControlPort cookie and the ExtORPort cookie. Also, place the global cookie variables in the heap so that we can pass them around more easily as pointers. Also also, fix the unit tests that broke by this change. Conflicts: src/or/config.h src/or/ext_orport.c
2013-08-15Expose/mock some functions to make ext_orport.c testing possibleNick Mathewson
2013-07-18Satisfy check-spaces.George Kadianakis
2013-07-18Create the Extended ORPort authentication cookie file.George Kadianakis
2013-07-10Completely refactor how FILENAME_PRIVATE worksNick Mathewson
We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
2013-06-20Fix #9108 - make global_circuitlist a doubly linked listMarek Majkowski
2013-06-13Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-06-13Merge remote-tracking branch 'public/bug8822' into maint-0.2.4Nick Mathewson
2013-06-12Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-06-12Make all consumers of microdesc_t.body tolerate NULLNick Mathewson
This is another fix to try to mitigate recurrences of 8031/8822.