summaryrefslogtreecommitdiff
path: root/src/or/main.c
AgeCommit message (Collapse)Author
2014-05-22sandbox: allow access to various stats/*-stats filesMichael Wolf
Fix for 12064 part 1
2014-05-22Merge remote-tracking branch 'andrea/bug11476'Nick Mathewson
2014-05-20fix a wide lineNick Mathewson
2014-05-20sandbox: support logfile rotationNick Mathewson
Fixes bug 12032; bugfix on 0.2.5.1-alpha
2014-05-20sandbox: tolerate reloading with DirPortFrontPage setNick Mathewson
Also, don't tolerate changing DirPortFrontPage. Fixes bug 12028; bugfix on 0.2.5.1-alpha.
2014-05-20sandbox: Permit access to stats/dirreq-statsNick Mathewson
This prevents a crash when rotating logs with dirreq-stats enabled fixes 12035; bugfix on 0.2.5.1-alpha.
2014-05-20Oops; permit rename with the correct filenameNick Mathewson
2014-05-20Sandbox: allow access to stats/bridge-statsNick Mathewson
Fix for 12041; bugfix on 0.2.5.1-alpha.
2014-05-14Add a pair of wrapper functions: tor_getpwnam() and tor_getpwuid()Nick Mathewson
We'll use these to deal with being unable to access the user DB after we install the sandbox, to fix bug 11946.
2014-05-12Add --disable-mempools configure optionAndrea Shepard
2014-05-11Quench clang's complaints with -Wshorten-64-to-32 when time_t is not long.dana koch
On OpenBSD 5.4, time_t is a 32-bit integer. These instances contain implicit treatment of long and time_t as comparable types, so explicitly cast to time_t.
2014-05-05Don't start sandbox except for CMD_RUN_TORNick Mathewson
This was crashing on --verify-config in the debian startup script, if you had sandboxing enabled. Fixes 11609; fix on 0.2.5.1-alpha.
2014-04-24Merge branch 'bug11396_v2_squashed'Nick Mathewson
Conflicts: src/or/main.c
2014-04-24get_total_system_memory(): see how much RAM we haveNick Mathewson
2014-04-16Allow reloading torrc and writing to router-stabilityNick Mathewson
2014-04-16Add a couple of missing renames so the server sandbox works againNick Mathewson
2014-04-16Get Libevent's PRNG functioning under the linux sandboxNick Mathewson
Libevent uses an arc4random implementation (I know, I know) to generate DNS transaction IDs and capitalization. But it liked to initialize it either with opening /dev/urandom (which won't work under the sandbox if it doesn't use the right pointer), or with sysctl({CTL_KERN,KERN_RANDOM,RANDOM_UUIC}). To make _that_ work, we were permitting sysctl unconditionally. That's not such a great idea. Instead, we try to initialize the libevent PRNG _before_ installing the sandbox, and make sysctl always fail with EPERM under the sandbox.
2014-04-16Drop 'fr' parameter from sandbox code.Nick Mathewson
Appearently, the majority of the filenames we pass to sandbox_cfg_allow() functions are "freeable right after". So, consider _all_ of them safe-to-steal, and add a tor_strdup() in the few cases that aren't. (Maybe buggy; revise when I can test.)
2014-04-16Remove nonsensical exec permission from sandbox code.Nick Mathewson
2014-04-16Add 'rename' to the sandboxed syscallsNick Mathewson
(If we don't restrict rename, there's not much point in restricting open, since an attacker could always use rename to make us open whatever they want.)
2014-04-16Fix some initial sandbox issues.Nick Mathewson
Allow files that weren't in the list; Allow the _sysctl syscall; allow accept4 with CLOEXEC and NONBLOCK.
2014-04-15Uplift status.c unit test coverage with new test cases and macros.dana koch
A new set of unit test cases are provided, as well as introducing an alternative paradigm and macros to support it. Primarily, each test case is given its own namespace, in order to isolate tests from each other. We do this by in the usual fashion, by appending module and submodule names to our symbols. New macros assist by reducing friction for this and other tasks, like overriding a function in the global namespace with one in the current namespace, or declaring integer variables to assist tracking how many times a mock has been called. A set of tests for a small-scale module has been included in this commit, in order to highlight how the paradigm can be used. This suite gives 100% coverage to status.c in test execution.
2014-04-09Demote "we stalled too much while trying to write" message to INFONick Mathewson
Resolves ticket 5286.
2014-04-08Check for new IP addr after circuit liveliness returnsMatthew Finkel
When we successfully create a usable circuit after it previously timed out for a certain amount of time, we should make sure that our public IP address hasn't changed and update our descriptor.
2014-03-31Merge branch 'bug8787_squashed'Nick Mathewson
2014-03-31Always check returns from unlink()Andrea Shepard
2014-03-25Fix warnings from doxygenNick Mathewson
Most of these are simple. The only nontrivial part is that our pattern for using ENUM_BF was confusing doxygen by making declarations that didn't look like declarations.
2014-03-05Merge remote-tracking branch 'arma/ticket5528'Nick Mathewson
Conflicts: src/or/router.c src/test/test_dir.c
2014-02-28Write hashed bridge fingerprint to logs and to disk.Karsten Loesing
Implements #10884.
2014-02-21When not an exit node, don't test for DNS hijacking.Nick Mathewson
Back in 5e762e6a5c0e6729bb7dbb586af2690c087d9ba8, non-exit servers stopped launching DNS requests for users. So there's no need for them to see if their DNS answers are hijacked. Patch from Matt Pagan. I think this is a 965 fix.
2014-02-15Merge branch 'bug4900_siphash_v2'Nick Mathewson
2014-02-15Remove a bunch of functions that were never called.Nick Mathewson
2014-02-12Split crypto_global_init() into pre/post configNick Mathewson
It's increasingly apparent that we want to make sure we initialize our PRNG nice and early, or else OpenSSL will do it for us. (OpenSSL doesn't do _too_ bad a job, but it's nice to do it ourselves.) We'll also need this for making sure we initialize the siphash key before we do any hashes.
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-12-24Merge remote-tracking branch 'public/bug10485'Nick Mathewson
2013-12-24Move onion-type stats message into heartbeatNick Mathewson
Fix for 10485. Fix on 0.2.4.17-alpha.
2013-11-18Merge branch 'backtrace_squashed'Nick Mathewson
Conflicts: src/common/sandbox.c src/common/sandbox.h src/common/util.c src/or/main.c src/test/include.am src/test/test.c
2013-11-18Add a sighandler-safe logging mechanismNick Mathewson
We had accidentially grown two fake ones: one for backtrace.c, and one for sandbox.c. Let's do this properly instead. Now, when we configure logs, we keep track of fds that should get told about bad stuff happening from signal handlers. There's another entry point for these that avoids using non-signal-handler-safe functions.
2013-11-18Basic backtrace abilityNick Mathewson
On platforms with the backtrace/backtrace_symbols_fd interface, Tor can now dump stack traces on assertion failure. By default, I log them to DataDir/stack_dump and to stderr.
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-11Make --version, --help, etc incremement quiet level, never decrease itNick Mathewson
Fixes other case of #9578
2013-09-13Merge remote-tracking branch 'Ryman/bug6384'Nick Mathewson
Conflicts: src/or/config.c src/or/main.c
2013-09-13Merge branch 'bug4647_squashed'Nick Mathewson
2013-09-13Add a --dump-config option to help testing option parsing.Nick Mathewson
2013-09-13Add '--digests' to "that which implies --hush."Nick Mathewson
And have these various commandline options imply "hush", not "quiet", since we like to see warnings.
2013-09-13Use commandline parser for other optionsNick Mathewson
These were previously allowed only in the initial position: --help, -h , --version, --digests, --list-torrc-options
2013-09-13Expose commandline parser so that we can use it for --quiet,etc.Nick Mathewson
Fix for bug 9578.
2013-09-13Merge remote-tracking branch 'ctoader/gsoc-cap-stage2'Nick Mathewson
Conflicts: src/common/sandbox.c
2013-09-09Build correctly with older libeventsNick Mathewson
2013-09-09Basic compilation fixes.Nick Mathewson