Commit Graph

650 Commits

Author SHA1 Message Date
Daniel Roethlisberger
d1d6d295df Fixing error-case memory leaks in uid/gid lookups 2014-11-21 16:19:36 +01:00
Daniel Roethlisberger
b5e3856a97 Move open() and mkdir() to logger thread 2014-11-21 16:10:37 +01:00
Daniel Roethlisberger
5fd1d7de9c Rename flags for clarity 2014-11-21 12:03:08 +01:00
Daniel Roethlisberger
77942a7abb Fix compiler warning on type conversion 2014-11-19 22:54:11 +01:00
Daniel Roethlisberger
007823b16e Fix connect logging for corner cases 2014-11-19 22:39:51 +01:00
Daniel Roethlisberger
80af8f7d52 Fix SSL_METHOD* const mismatch on OpenSSL < 1.0.0 2014-11-19 22:38:21 +01:00
Daniel Roethlisberger
125163a003 Add local process lookup on FreeBSD using sysctl() API 2014-11-19 22:30:01 +01:00
Daniel Roethlisberger
7b8ba7310d Fix uid/gid lookup where sysconf(_SC_GETPW_R_SIZE_MAX) fails
On some platforms, sysconf(_SC_GETPW_R_SIZE_MAX) compiles but never
succeeds (e.g. FreeBSD 8.4).  Fix this by dynamically enlarging an
initially small buffer until it is large enough, and reuse the
determined buffer size on subsequent calls to the same function.
2014-11-20 09:38:14 +01:00
Daniel Roethlisberger
c35e40a597 Update NEWS.md for OpenSSL 0.9.8y bug workaround 2014-11-20 09:38:13 +01:00
Daniel Roethlisberger
341d6b77d1 Use SSL_get_certificate() hack for OpenSSL 0.9.8y
OpenSSL 0.9.8y also crashes in OpenSSL's SSL_get_certificate() on a
NULL pointer dereference.  Fix by also using the direct access hack
developed for OpenSSL 1.0.0k and 1.0.1e with OpenSSL 0.9.8y.
2014-11-19 20:01:42 +01:00
Daniel Roethlisberger
e1156a3482 Make awk regexp more robust 2014-11-17 23:50:16 +01:00
Daniel Roethlisberger
352b199166 Remove spurious space in netfilter output 2014-11-17 23:41:21 +01:00
Daniel Roethlisberger
c5b8fd127f Add version and ciphersuite to connect and debug log 2014-11-17 19:14:29 +01:00
Daniel Roethlisberger
077fb8c348 Handle other address families and abort when found 2014-11-17 19:13:03 +01:00
Daniel Roethlisberger
fcd008df4b Unify asprintf error handling 2014-11-17 19:11:27 +01:00
Daniel Roethlisberger
ec9cc5fb23 Fix usr/grp test with Linux id 2014-11-16 22:47:42 +01:00
Daniel Roethlisberger
b1ec5d0e09 Improve log_content_open() error handling 2014-11-16 22:31:54 +01:00
Daniel Roethlisberger
6f2f0af0c3 Fix usr/grp formatting unit test when id fails 2014-11-16 22:30:50 +01:00
Daniel Roethlisberger
328e3320f9 Fix build for !HAVE_LOCAL_PROCINFO 2014-11-16 21:57:33 +01:00
Daniel Roethlisberger
18c3e055e3 Refactor recursive mkdir() into sys_mkpath() 2014-11-16 21:53:47 +01:00
Daniel Roethlisberger
8c71970f33 Add unit test for sys_user_str and sys_group_str 2014-11-16 20:30:55 +01:00
Daniel Roethlisberger
84dfba04f2 Update manual page 2014-11-16 20:15:19 +01:00
Daniel Roethlisberger
e022b2af26 Add local process information to connect log 2014-11-16 20:11:25 +01:00
Daniel Roethlisberger
08ca5b2891 Also print pid if lookup (partially or fully) fails 2014-11-16 19:37:35 +01:00
Daniel Roethlisberger
48e00cf947 Remove stubs that should never be used 2014-11-16 00:07:10 +01:00
Daniel Roethlisberger
96ad8f92af Add -i and restore order 2014-11-14 16:40:56 +01:00
Daniel Roethlisberger
544b93a9ab Add procinfo status to -V 2014-11-14 16:30:07 +01:00
Daniel Roethlisberger
6cc01ec32b Update NEWS.md for -i 2014-11-14 16:22:46 +01:00
Daniel Roethlisberger
150650c7e9 Make local procinfo run-time optional (-i) and use src host:port 2014-11-14 16:20:07 +01:00
Daniel Roethlisberger
42497693d1 Rename define for consistency 2014-11-14 15:36:16 +01:00
Daniel Roethlisberger
0237fe34dc Only build local process info code where supported 2014-11-14 15:31:30 +01:00
Daniel Roethlisberger
3c7fe37583 Mark params as unused if Darwin libproc unavailable 2014-11-14 01:26:37 +01:00
Daniel Roethlisberger
a906147943 Fix memory leak and handle failure of pathspec formatting 2014-11-14 01:18:43 +01:00
Daniel Roethlisberger
86f509d2ea Skip realloc and elem access for elem_len == 0
Besides obvious benefits, this prevents passing NULL to strncat().
2014-11-14 01:10:47 +01:00
Daniel Roethlisberger
1ce0ee8b12 Safeguard against elem == NULL
This should not normally happen but in theory it can (if match wraps
around in the match++ instruction).
2014-11-14 01:06:51 +01:00
Daniel Roethlisberger
966fe80c0c Move process information code from sys to proc 2014-11-14 01:01:14 +01:00
Daniel Roethlisberger
6adaf00540 Fix pid_t removal for non-pf engines 2014-11-14 01:00:12 +01:00
Daniel Roethlisberger
c3922d9852 Refactor process lookup out of NAT engine code
Local process lookup is independent of the NAT engine used, it depends
only on the operating system's process enumeration API.  Moving the code
out of NAT lookup also makes it work for static and SNI proxyspecs.
2014-11-14 00:41:27 +01:00
Daniel Roethlisberger
18aca24a2c Return 0 with pid -1 if no process matches 2014-11-13 23:59:18 +01:00
Daniel Roethlisberger
8c21170cd3 Break lines to 80 cols 2014-11-13 23:58:58 +01:00
Daniel Roethlisberger
dc7a3ee9e3 Break line to 80 cols 2014-11-13 23:50:59 +01:00
Daniel Roethlisberger
f656bcabb7 Update NEWS.md 2014-11-13 23:45:49 +01:00
Daniel Roethlisberger
ff8ef9528d Merge branch 'issue/55' 2014-11-13 23:40:50 +01:00
Daniel Roethlisberger
0d07aeff7e Don't automatically drop to nobody if logspec is used 2014-11-13 23:38:59 +01:00
Daniel Roethlisberger
38314ea16d Formatting changes 2014-11-13 23:38:46 +01:00
Daniel Roethlisberger
81241139c7 Merge branch 'logspec_path_support' of git://github.com/fix-macosx/sslsplit into issue/55 2014-11-13 22:26:38 +01:00
Daniel Roethlisberger
767f02aadb Merge branch 'issue/54' 2014-11-13 22:19:21 +01:00
Daniel Roethlisberger
2cc353f274 Check malloc retval and mark ptr arguments non-null 2014-11-13 22:17:13 +01:00
Daniel Roethlisberger
a5ccfa3d4b Remove SSLv2 bug section and add contributors 2014-11-13 19:45:43 +01:00
Daniel Roethlisberger
6a072e48e3 Make contribution section more clear and refer to NEWS.md 2014-11-11 20:20:40 +01:00