1. 31 Jan, 2012 1 commit
  2. 18 Jan, 2012 1 commit
  3. 17 Jan, 2012 1 commit
  4. 25 Dec, 2011 1 commit
  5. 22 Dec, 2011 1 commit
  6. 02 Dec, 2011 1 commit
  7. 25 Nov, 2011 2 commits
  8. 20 Nov, 2011 1 commit
  9. 09 Nov, 2011 1 commit
  10. 03 Nov, 2011 1 commit
  11. 09 Aug, 2011 1 commit
  12. 15 Jul, 2011 1 commit
  13. 23 May, 2011 1 commit
    • Nick Mathewson's avatar
      Use a 64-bit type to hold sockets on win64. · cfeafe5e
      Nick Mathewson authored
      On win64, sockets are of type UINT_PTR; on win32 they're u_int;
      elsewhere they're int.  The correct windows way to check a socket for
      being set is to compare it with INVALID_SOCKET; elsewhere you see if
      it is negative.
      On Libevent 2, all callbacks take sockets as evutil_socket_t; we've
      been passing them int.
      This patch should fix compilation and correctness when built for
      64-bit windows.  Fixes bug 3270.
  14. 16 May, 2011 1 commit
  15. 10 May, 2011 1 commit
  16. 28 Apr, 2011 1 commit
    • Nick Mathewson's avatar
      Detect and handle NULL returns from (gm/local)time_r · 51e551d3
      Nick Mathewson authored
      These functions can return NULL for otherwise-valid values of
      time_t.  Notably, the glibc gmtime manpage says it can return NULL
      if the year if greater than INT_MAX, and the windows MSDN gmtime
      page says it can return NULL for negative time_t values.
      Also, our formatting code is not guaranteed to correctly handle
      years after 9999 CE.
      This patch tries to correct this by detecting NULL values from
      gmtime/localtime_r, and trying to clip them to a reasonable end of
      the scale.  If they are in the middle of the scale, we call it a
      downright error.
      Arguably, it's a bug to get out-of-bounds dates like this to begin
      with.  But we've had bugs of this kind in the past, and warning when
      we see a bug is much kinder than doing a NULL-pointer dereference.
      Boboper found this one too.
  17. 30 Mar, 2011 1 commit
  18. 16 Mar, 2011 1 commit
  19. 03 Jan, 2011 2 commits
    • Nick Mathewson's avatar
      Never include pthread.h when building for Windows. · 5c09431c
      Nick Mathewson authored
      On Windows, we never use pthreads, since it doesn't usually exist,
      and when it does it tends to be a little weirdly-behaved.  But some
      mingw installations have a pthreads installed, so autoconf detects
      pthread.h and tells us about it.  This would make us include
      pthread.h, which could make for trouble when the iffy pthread.h
      tried to include config.h.
      This patch changes compat.h so that we never include pthread.h on
      Windows.  Fixes bug 2313; bugfix on
    • Nick Mathewson's avatar
      Bump copyright statements to 2011 · 1a07348a
      Nick Mathewson authored
  20. 16 Dec, 2010 1 commit
  21. 29 Nov, 2010 1 commit
  22. 20 Nov, 2010 2 commits
  23. 15 Oct, 2010 1 commit
    • Nick Mathewson's avatar
      Add a portable tor_timercmp · 94a99ad2
      Nick Mathewson authored
      We can't use the platform timercmp, because
        1) some platforms don't have them
        2) some that do have them only support certain relational operators
  24. 28 Sep, 2010 1 commit
  25. 24 May, 2010 2 commits
    • valerino's avatar
      moved wince related includes and defs to compat.h where possible, removed... · 076063ca
      valerino authored and Nick Mathewson's avatar Nick Mathewson committed
      moved wince related includes and defs to compat.h where possible, removed unused/redundant wince includes
    • valerino's avatar
      Port Tor to work on Windows CE · 8d31141c
      valerino authored and Nick Mathewson's avatar Nick Mathewson committed
      Most of the changes here are switches to use APIs available on Windows
      CE.  The most pervasive change is that Windows CE only provides the
      wide-character ("FooW") variants of most of the windows function, and
      doesn't support the older ASCII verions at all.
      This patch will require use of the wcecompat library to get working
      versions of the posix-style fd-based file IO functions.
      [commit message by nickm]
  26. 27 Feb, 2010 1 commit
  27. 25 Feb, 2010 3 commits
  28. 23 Feb, 2010 1 commit
  29. 27 Oct, 2009 1 commit
    • Jacob Appelbaum's avatar
      Implement DisableAllSwap to avoid putting secret info in page files. · 2aac39a7
      Jacob Appelbaum authored and Roger Dingledine's avatar Roger Dingledine committed
      This commit implements a new config option: 'DisableAllSwap'
      This option probably only works properly when Tor is started as root.
      We added two new functions: tor_mlockall() and tor_set_max_memlock().
      tor_mlockall() attempts to mlock() all current and all future memory pages.
      For tor_mlockall() to work properly we set the process rlimits for memory to
      RLIM_INFINITY (and beyond) inside of tor_set_max_memlock().
      We behave differently from mlockall() by only allowing tor_mlockall() to be
      called one single time. All other calls will result in a return code of 1.
      It is not possible to change DisableAllSwap while running.
      A sample configuration item was added to the torrc.complete.in config file.
      A new item in the man page for DisableAllSwap was added.
      Thanks to Moxie Marlinspike and Chris Palmer for their feedback on this patch.
      Please note that we make no guarantees about the quality of your OS and its
      mlock/mlockall implementation. It is possible that this will do nothing at all.
      It is also possible that you can ulimit the mlock properties of a given user
      such that root is not required. This has not been extensively tested and is
      unsupported. I have included some comments for possible ways we can handle
      this on win32.
  30. 10 Aug, 2009 2 commits
  31. 30 May, 2009 1 commit
    • Nick Mathewson's avatar
      Don't attempt to log messages to a controller from a worker thread. · fd992dee
      Nick Mathewson authored
      This patch adds a function to determine whether we're in the main
      thread, and changes control_event_logmsg() to return immediately if
      we're in a subthread.  This is necessary because otherwise we will
      call connection_write_to_buf, which modifies non-locked data
      Bugfix on 0.2.0.x; fix for at least one of the things currently
      called "bug 977".
  32. 27 May, 2009 1 commit
  33. 04 May, 2009 1 commit