Commit Graph

26 Commits (3958adce9e1613d5fb1e78fa4d3adb45a224eff8)

Author SHA1 Message Date
Soner Tari 1a446cd243 Refactoring: Create child ctx
Rearrange, clean-up
7 years ago
Soner Tari d033ea68dd Plain TCP version is running good enough, next will try to switch the SSL on 7 years ago
Daniel Roethlisberger 0506024587 Update copyright notices to 2016 8 years ago
Daniel Roethlisberger e384d89b35 Replace percent in IPv6 addrs in filenames
Percent is used to specify the interface for link-local addresses.
Even though this is not strictly necessary for NTFS, it makes sense to
replace percent with underscore as well to have cleaner filenames.

Also add some unit tests for sys_ip46str_sanitize() that actually test
the intended behaviour.
9 years ago
Daniel Roethlisberger 01d10b192a IPv6 addrs in filenames use underscore not colon
Use underscore instead of colon for all IPv6 addresses in generated
filenames in order to generate NTFS clean filenames.

Issue:		#69
9 years ago
Daniel Roethlisberger 914360eb5e Separate host and port into separate strings
Store host and port in separate strings internally and get rid of the
[host]:port representation where separate host and port would be
cleaner.  This includes the following user-visible changes:

-   Generated filenames that contain host and port, such as by -S and
    -F %d and %s, now use a host,port format instead of [host]:port.

-   Connect log now uses separate fields for host and port.

Issue:		#69 #74
Reported by:	Adam Jacob Muller
9 years ago
Daniel Roethlisberger 91da4674e5 Update copyright, license and tagline
-   Update copyright to 2015
-   Remove the non-standard "unmodified" from the 2-clause BSD license
-   Remove scalable from the tagline to avoid misinterpretations
10 years ago
Daniel Roethlisberger e69b13f2eb SIGUSR1 re-opens -l/-L log files; add defaults.h
Issue:		#52
10 years ago
Daniel Roethlisberger 0e0a465f5d Fix build on OpenBSD by adding missing includes 10 years ago
Daniel Roethlisberger c01ace1261 Introduce privilege separation architecture
Fork into a monitor parent process and an actual proxy child process,
communicating over AF_UNIX sockets.  Certain privileged operations are
performed through the privileged parent process, like opening log files
or listener sockets, while all other operations happen in the child
process, which can now drop its privileges without side-effects for
log file opening and other privileged operations.  This is also a
preparation for -l/-L logfile reopening through SIGUSR1.

This means that -S and -F are no longer relative to chroot() if used
with -j.  This is a deliberate POLA violation.
10 years ago
Daniel Roethlisberger a027f87c1c Check if -u and -m user and group exist immediately 10 years ago
Daniel Roethlisberger a09f42a507 Handle EINTR in sys_sendmsgfd() and sys_recvmsgfd() 10 years ago
Daniel Roethlisberger 71743feaa1 Add functions to send/recv UNIX dgram socket msgs and fds 10 years ago
Daniel Roethlisberger d1d6d295df Fixing error-case memory leaks in uid/gid lookups 10 years ago
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.
10 years ago
Daniel Roethlisberger fcd008df4b Unify asprintf error handling 10 years ago
Daniel Roethlisberger 18c3e055e3 Refactor recursive mkdir() into sys_mkpath() 10 years ago
Daniel Roethlisberger 966fe80c0c Move process information code from sys to proc 10 years ago
Daniel Roethlisberger 2cc353f274 Check malloc retval and mark ptr arguments non-null 10 years ago
Landon Fuller 5ed49c4985 Implement user and group name lookup. 10 years ago
Landon Fuller 52d979e29d Add a standard API for fetching process name, uid, and gid. 10 years ago
Landon Fuller 9d54677009 Add support for specifying an explicit group when dropping privileges.
This simplifies my use of pf(4) when using group-based
rules to exclude splitssl from redirection.
10 years ago
Daniel Roethlisberger ca923ee7f1 Update copyright notices to 2014 11 years ago
Daniel Roethlisberger c972501063 Update copyright notices 11 years ago
Daniel Roethlisberger 92db084d25 Fix documentation of sys_sockaddr_parse() 12 years ago
Daniel Roethlisberger 4cfdef405a Initial import of sslsplit-0.4.2 12 years ago