Commit Graph

186 Commits

Author SHA1 Message Date
Roger Dingledine
a27b570788 bugfix for win32 with lots of users
plus general cleanup on switch_id()


svn:r684
2003-10-27 10:26:44 +00:00
Nick Mathewson
faa0f7ffe7 Use daemon(3) function where available.
svn:r665
2003-10-23 14:28:44 +00:00
Steven Hazel
4fef6f4566 switch_id() no longer tries to log the user name when it's calld on
Windows, since we don't know whether it's the user or the group that
was set.


svn:r659
2003-10-22 17:25:58 +00:00
Steven Hazel
4139c1c86a - fixed a bug in the id switching code -- setgid has to happen before
setuid, because after we setuid we don't have the priviledges we
  need to setgid anymore, duh.  merged switch_user() and
  switch_group() into switch_id(), since that code has to be wound
  together.

- return -1 from switch_id() if it's not defined to do anything else.

- moved daemoinize(), write_pidfile(), and switch_id() from main.c to
  util.c


svn:r656
2003-10-22 11:21:29 +00:00
Roger Dingledine
5f1750a288 include our own timegm() impl, since it's not portable
svn:r635
2003-10-20 20:19:59 +00:00
Roger Dingledine
2093f60760 we've been stomping on memory while reading config
doesn't seem to have bitten us yet, but let's fix that :)


svn:r619
2003-10-18 01:28:39 +00:00
Roger Dingledine
82aa621b47 rewrite close_logs so it could possibly work
remove deadbeef memory-clobber testing (for now)


svn:r616
2003-10-18 00:07:58 +00:00
Nick Mathewson
695920d09f Build without warnings on OS X.
svn:r595
2003-10-15 18:48:48 +00:00
Nick Mathewson
77be56fbdd Add tor_realloc to mirror tor_malloc
svn:r582
2003-10-14 01:11:42 +00:00
Roger Dingledine
36fb8e839d change WARNING to WARN
svn:r570
2003-10-10 01:48:03 +00:00
Roger Dingledine
de6cbe53c0 some early bugfixes
our log() conflicts with log(3)
distribute only the correct files from doc/ and src/config/
sometimes laptops go back in time. i guess that's ok for now.
and bump the version number because we're live.


svn:r544
2003-10-07 16:30:05 +00:00
Roger Dingledine
be874358a4 wrap strdup; prefer time() to gettimeofday()
svn:r538
2003-10-04 03:29:09 +00:00
Roger Dingledine
750b238aea clean some includes
svn:r535
2003-10-04 01:36:11 +00:00
Nick Mathewson
6ac42f5ec0 Make testcases run again; more sanity checking to descriptor generation.
svn:r532
2003-10-01 22:31:13 +00:00
Roger Dingledine
3ed7aedc11 bugfixes and features: closer to making dirserv work
fix a variety of seg faults
don't try to list OPs in running-routers
write cached-directory to disk when rebuilding the dir
on boot, dirservers load approved-routers file
on boot, dirservers load cached directory file


svn:r508
2003-09-29 23:14:49 +00:00
Roger Dingledine
467d278b8b more cleanup and rearranging
still not finished integrating new dirserv stuff


svn:r507
2003-09-29 07:50:08 +00:00
Roger Dingledine
677707433e shift read_file_to_str() into util.c
svn:r504
2003-09-28 06:47:29 +00:00
Roger Dingledine
bf10a3c0f1 finish enforcing the log convention
svn:r494
2003-09-26 22:27:24 +00:00
Roger Dingledine
d8f646c44f make writing descs work
svn:r492
2003-09-26 21:26:25 +00:00
Nick Mathewson
92acbe12bc Refactor common file code into util.c; add published to descriptors
svn:r487
2003-09-26 18:27:35 +00:00
Roger Dingledine
e585dad887 fix the cpuworker circ-had-vanished bug (maybe)
still several (many) tls-related bugs outstanding.


svn:r454
2003-09-14 02:58:50 +00:00
Roger Dingledine
2dda97e8fd implemented cpuworkers
please poke at it and report bugs

still needs polishing, and only handles onions now (should handle
OR handshakes too)


svn:r402
2003-08-20 23:05:22 +00:00
Nick Mathewson
1777487f4e Tor now builds on win32.
svn:r400
2003-08-14 17:51:36 +00:00
Nick Mathewson
cd3467bb01 Attempt to make sockets code work right on windows.
svn:r398
2003-08-14 17:13:52 +00:00
Nick Mathewson
bbd4032fc1 Make windows happier still
svn:r392
2003-08-12 08:18:13 +00:00
Nick Mathewson
9b12a48428 Stop trying to #include the world in util.c
svn:r390
2003-08-12 07:49:29 +00:00
Nick Mathewson
2cb4f7a473 Adopt socketpair implementation from perl. For now, always use it.
svn:r389
2003-08-12 07:43:15 +00:00
Nick Mathewson
e4a6ea5c46 Add abstraction for fork vs thread.
svn:r387
2003-08-12 07:01:20 +00:00
Nick Mathewson
c336c99e60 Start of port to win32. Missing are:
- signal support
  - forking for DNS farm
  - changes for async IO
  - daemonizing

In other words, some files still don't build, and the ones that do build,
do nonblocking IO incorrectly.

I'm also not checking in the project files till I have a good place
for them.


svn:r380
2003-08-12 03:08:41 +00:00
Roger Dingledine
968d31162b fix typos, streamline
svn:r337
2003-06-18 07:44:48 +00:00
Nick Mathewson
95e5384af3 Change many files to new log_fn format
svn:r333
2003-06-17 22:18:26 +00:00
Roger Dingledine
59029a3eed replace malloc with tor_malloc; remove broken/unused crypto_pk_set_key
svn:r292
2003-05-20 06:37:34 +00:00
Nick Mathewson
598c3069e1 Apply algebra; remove a condition
svn:r246
2003-04-17 02:03:55 +00:00
Nick Mathewson
2da6482f63 tv_udiff: do not modify arguments, and compute results correctly.
svn:r245
2003-04-17 01:59:41 +00:00
Roger Dingledine
fe1aba7f15 more cleanup
svn:r242
2003-04-16 23:22:05 +00:00
Nick Mathewson
33176c70a5 Factor out timeval-related functions.
svn:r237
2003-04-16 17:04:58 +00:00