196 Commits

Author SHA1 Message Date
Nick Mathewson
629a613398 When running set[ug]id, don't check the environment.
Idea from OpenBSD, but made a bit more generic to handle uncivilized lands
that do not define issetugid.

svn:r1530
2009-11-15 18:59:59 +00:00
Nick Mathewson
e2b2de79bf Use arc4random() for dns transaction ids where available. Patch taken from OpenBSD
svn:r1528
2009-11-15 18:59:48 +00:00
Nick Mathewson
47bad8abb7 Implement size limits on HTTP header length and body length.
Patch from Constantine Verutin, simplified a little.

svn:r1500
2009-11-04 20:17:32 +00:00
Nick Mathewson
0b9eb1bffb Add a bufferevent function to resolve a name then connect to it.
This function, bufferevent_socket_connect_hostname() can either use
evdns to do the resolve, or use a new function (evutil_resolve) that
uses getaddrinfo or gethostbyname, like http.c does now.

This function is meant to eventually replace the hostname resolution mess in
http.c.

svn:r1496
2009-11-03 20:40:48 +00:00
Nick Mathewson
18fe400805 Forward-port: fix android compilation
svn:r1435
2009-09-23 23:51:26 +00:00
Nick Mathewson
22bd5b4287 Support sendfile on solaris: patch from Caitlin Mercer.
svn:r1419
2009-08-16 16:40:42 +00:00
Nick Mathewson
709c21c48c Bufferevent support for openssl.
This code adds a new Bufferevent type that is only compiled when the
openssl library is present.  It supports using an SSL object and an
event alert mechanism, which can either be an fd or an underlying
bufferevent.

There is still more work to do: the unit tests are incomplete, and we
need to support flush and shutdown much better.  Sometimes events are
generated needlessly: this will hose performance.

There's a new encrypting proxy in sample/le-proxy.c.

This code has only been tested on OSX, and nowhere else.

svn:r1382
2009-07-28 04:03:57 +00:00
Niels Provos
6fbeb9237c call it 2.0.2-alpha
svn:r1378
2009-07-25 03:23:46 +00:00
Nick Mathewson
1fb2e818a6 Use a uniform strategy when a function is not working: do not expose
it.

Rather than failing at runtime, it is better to fail at compile or
link time.

svn:r1363
2009-07-17 21:47:45 +00:00
Nick Mathewson
d3a8ccb807 Change use of AC_CHECK_LIB to AC_SEARCH_LIBS.
Patch from Zack Weinberg.  His message:

  This one eliminates all use of AC_CHECK_LIB in the configure script.
  AC_CHECK_LIB has a serious flaw: if the library you mention *exists*
  but is not *necessary* for the function you want, it adds it to
  $(LIBS) anyway.  This was fine in the days of static libraries,
  because the linker would ignore an .a library that didn't contain
  anything you needed. However, ELF shared libraries are different
  (let's not get into why): the linker will by default record a
  DT_NEEDED entry for every shared object mentioned on the link
  command line. Thus, every use of AC_CHECK_LIB is a potential
  unnecessary DT_NEEDED, making extra work for the dynamic loader. The
  cure is simply to use AC_SEARCH_LIBS instead; it first tries to find
  the function you ask for in libc, and only if that doesn't work does
  it try to use the extra library you mention.

  For the same reasons, pkg-config .pc files should distinguish
  between the libraries to use for shared linkage (Libs:) and the
  additional libraries needed for static linkage (Libs.private:). I
  have also made that correction in this patch. I also took the
  opportunity to clean up the substitution variables a little and make
  absolutely sure that the core library does not get linked against
  zlib.

svn:r1338
2009-07-10 19:38:16 +00:00
Nick Mathewson
49f18a0aab Add requirement in configure.in for autoconf 2.59c. Needed for ssize_t test. Spotted by Yang Hong.
svn:r1313
2009-05-25 20:02:51 +00:00
Nick Mathewson
b2e8fd0e41 Apparently MSVC lacks a ssize_t. Define an ev_ssize_t for headers, and make ssize_t work elsewhere.
svn:r1261
2009-04-30 23:56:53 +00:00
Nick Mathewson
df0617f289 Use signal.h, not sys/signal.h.
This is patch 2673214 from mmadia.  It is correct, since we unconditionally
include signal.h in many other places, and only sometimes include sys/signal.h.
It is necessary to compile on Haiku, I'm told.

svn:r1228
2009-04-23 00:21:23 +00:00
Nick Mathewson
e2b987ede1 bump the numeric version; this is not the same as the alpha.
svn:r1224
2009-04-23 00:01:05 +00:00
Nick Mathewson
99de18670e Bump version to 2.0.1-alpha-dev so that nobody mistakes a svn checkout for 2.0.1-alpha.
svn:r1196
2009-04-17 23:07:48 +00:00
Nick Mathewson
d047b323bd Increment version to 2.0.1-alpha, and add a numeric version facility
svn:r1193
2009-04-17 17:22:32 +00:00
Nick Mathewson
7fa8451d7e Add a configure flag to hardcode all of our mm functions.
svn:r1186
2009-04-17 06:56:57 +00:00
Niels Provos
edfc28caef pkgconfig support from Ted Bullock
svn:r1177
2009-04-17 00:24:58 +00:00
Nick Mathewson
52eb495130 Build with the -fno-strict-aliasing flag on GCC.
You do not want to know about the 2 hours I just spent tracking down
an evdns bug that only affected me on some platforms to the way we
were using sockaddr* and sockaddr_in*.  Suffice it to say that I do
not think this is the only C99-aliasing-dubiousness in our code, nor
that I am smart enough to keep my code correct with the GCC's strict
aliasing optimizations in place.

svn:r1079
2009-01-31 07:31:47 +00:00
Niels Provos
fdf694933c sendfile/mmap and memory reference implementation for evbuffers
svn:r1057
2009-01-27 06:05:38 +00:00
Niels Provos
a077fb8c09 rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku
svn:r1033
2009-01-22 02:47:35 +00:00
Nick Mathewson
309fc7c4ad New functions to provide sane threading callbacks with pthreads and win32 threading implementations.
svn:r1031
2009-01-21 07:51:25 +00:00
Nick Mathewson
a5901991c7 Use eventfd for main-thread notification where available (i.e., linux).
svn:r1023
2009-01-19 20:37:24 +00:00
Nick Mathewson
ec4cfa33c9 Make event_break threadsafe; make notify-thread mechanism a little more generic; let it use pipes where they work.
svn:r1019
2009-01-19 01:34:14 +00:00
Nick Mathewson
980bcd68f7 Work better with platforms that do not have ipv6 structures, or that do not have sin_len fields, etc.
svn:r986
2009-01-02 21:21:58 +00:00
Nick Mathewson
0d9d5cfe22 New functions in evutil to clone inet_pton and inet_ntop, with tests.
Adapted from Tor code.

svn:r983
2009-01-02 20:46:12 +00:00
Niels Provos
950af18679 replace fnmatch with homegrown function
svn:r804
2008-05-10 05:58:17 +00:00
Nick Mathewson
64ce799083 r15555@tombo: nickm | 2008-05-08 19:56:51 -0400
fwd-port The IRIX compiler thinks #error means warn.  Fix configure.in to tolerate this.


svn:r801
2008-05-08 23:57:31 +00:00
Niels Provos
f2a81fbc67 add support for virtual http hosts; no tests yet
svn:r771
2008-05-05 07:17:05 +00:00
Niels Provos
ccb70f1bc7 provide example bufferevent filters doing compression and decompression as additional regression test
svn:r751
2008-04-30 04:31:10 +00:00
Nick Mathewson
44ceb945a3 r19305@catbus: nickm | 2008-04-10 15:34:10 -0400
Fix bug 1938754: do not warn when epoll_create() fails with ENOSYS.


svn:r706
2008-04-10 19:34:50 +00:00
Niels Provos
558de9b377 Provide OpenSSL style support for multiple threads accessing the same event_base
svn:r684
2008-03-02 21:18:33 +00:00
Nick Mathewson
0322ce0a3b r18486@catbus: nickm | 2008-02-28 13:35:53 -0500
Make offsetof into evutil_offsetof.  Be a little more willing to call evbuffer_chain_align() from evbuffer_expand().  Clarify some docs, and add some XXX comments to note questionable areas.


svn:r677
2008-02-28 18:36:03 +00:00
Niels Provos
5c70ea4c9d improved code for evbuffer; avoids memcpy
svn:r674
2008-02-28 02:47:43 +00:00
Nick Mathewson
0d26f1605f r18169@catbus: nickm | 2008-02-18 15:13:20 -0500
Rebuild and re-run configure etc when configure.in or Makefile.am changes.  Also, have automake do its dependency tracking.


svn:r651
2008-02-18 20:13:27 +00:00
Nick Mathewson
11230f7e16 r18145@catbus: nickm | 2008-02-18 15:02:20 -0500
Stop using deprecated autoconf code to set integer types; detect actual files to include more thoroughly.   This should make us work on solaris 9 again.  This should be a backport candidate, if it works.  Also, make all libevent code use ev_uint32_t etc, rather than uint_32_t.


svn:r649
2008-02-18 20:04:01 +00:00
Niels Provos
f09e9d91b1 1.3.99-trunk -> 1.4.99-trunk
svn:r644
2008-02-17 01:12:09 +00:00
Nick Mathewson
807ab182d0 r14211@tombo: nickm | 2008-02-16 15:28:54 -0500
Add new evutil_strtoll() function so we can apply 64-bit content-length patch from Scott Lamb in a portable way.


svn:r640
2008-02-16 20:49:47 +00:00
Niels Provos
d4bdbca847 add -Wstrict-aliasing and remove bogus evtag_test from event.h
svn:r602
2007-12-18 03:54:19 +00:00
Nick Mathewson
ce4ee418d2 r16733@catbus: nickm | 2007-11-26 14:18:25 -0500
Add an --enable-gcc-warnings option (lifted from Tor) to the configure script.  When provided, and when we are using GCC, we enable a bunch of extra GCC warnings in the compiler.  Also, make the code all build happily with these warnings.


svn:r553
2007-11-26 19:18:49 +00:00
Nick Mathewson
4e1ec3e05e Make all the C files in the libraries compile under MSVC 2005 Express. There are still a few warnings, and probably some subtle issues, but it's better than nothing.
svn:r499
2007-11-07 21:01:26 +00:00
Nick Mathewson
e9564eceb3 r16487@catbus: nickm | 2007-11-06 22:38:44 -0500
Remove rtsig method, as discussed in July.  It hasn't compiled for quite a while, and nobody has seemed to miss it much.  Please let us know if this was a bad call. [Tracker issue 1826539].


svn:r485
2007-11-07 03:40:26 +00:00
Nick Mathewson
f0e06d75e5 r15217@catbus: nickm | 2007-09-20 14:04:32 -0400
Fix win32 signals: teach win32 that we have per-base signal queues; teach signal.c that not everybody has sigaction().


svn:r442
2007-09-20 18:26:46 +00:00
Nick Mathewson
250071830a r15216@catbus: nickm | 2007-09-20 13:58:23 -0400
Add a new evutil module to contain the usual cross-platform hacks: socketpair, closesocket, and make_socket_nonblocking()


svn:r441
2007-09-20 18:26:40 +00:00
Nick Mathewson
9c3ac4e444 r14970@catbus: nickm | 2007-09-06 20:09:39 -0400
Fix compilation on Solaris; Patch from Magne Mahre.


svn:r409
2007-09-07 00:10:15 +00:00
Nick Mathewson
5f04e3b7b5 Bump version number in svn trunk to 1.3.99.
svn:r403
2007-08-24 01:08:39 +00:00
Niels Provos
5e0ac7f239 check for sys/select.h
svn:r377
2007-07-31 00:25:22 +00:00
Niels Provos
3ad6b47e03 make clock_monotonic work; do not use default timeout;
from Scott Lamb, plus some fixes from me.


svn:r371
2007-07-30 22:41:00 +00:00
Niels Provos
753ffa563b convert u_int8_t types to uint8_t types
svn:r368
2007-06-30 19:08:46 +00:00
Niels Provos
aa5c806888 make it compile on solaris; from Andrei Nigmatulin
svn:r366
2007-06-16 03:23:15 +00:00