Commits
- Commit:
86693a33abd5e8c31530adb3045c9f4664d4d6c9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add a privsep crypto engine
Incorporate the OpenSMTPD' privsep crypto engine. The idea behind
it is to never load the certificate' private keys in a networked
process, instead they are loaded in a separate process (the `crypto'
one) which signs payloads on the behalf of the server processes.
This way, we greatly reduce the risk of leaking the certificate'
private key should the server process be compromised.
This currently compiles only on LibreSSL (portable fix is in the
way).
- Commit:
f81a97b3569478a36e5cbe95229efd1b831b7a7b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop useless debug statement
- Commit:
af1dab18702cf135aa80bf15065f73050c915347
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't have the config being a global
- Commit:
e45334e6ae0b658a2d3d4f47bc3e9ddfdb83a44f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move hosts into the config struct
- Commit:
5d22294a59e7e9cbe6457b9e6244fff2ede09956
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move fastcgi from global var to the config struct
while here also make them a list rather than a fixed-size array.
- Commit:
deadd9e1311204415754dcfa404bec4bf3cd557c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
readd proxy certs and `require client ca' support
Was temporarly disabled during the transition to real privsep.
While here, fix a memory leak when using `require client ca'.
Also, avoid leaking info about the parent address space layout to
server processes by not sending pointer values.
- Commit:
8eeb992206592a3bc858ffda8216ca0538cb7ecf
- From:
- Omar Polo <op@omarpolo.com>
- Date:
less logger.h
- Commit:
3886afceec08126fede93edee884cbd13078cbec
- From:
- Omar Polo <op@omarpolo.com>
- Date:
make server_init and server_configure_done 'public'
server_configure_done is the code we ran in IMSG_RECONF_END splitted
in a separate functions.
This is all needed for ge.c which doesn't do privsep but needs to
bootstrap the server process.
- Commit:
2b4ef796d78a9d76952115852e3aef56f00b7beb
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remove debug code
- Commit:
c26f2460e42aa0822c283c805958989f339e7d8b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rework the daemon to do fork+exec
It uses the 'common' proc.c from various OpenBSD-daemons.
gmid grew organically bit by bit and it was also the first place where I
tried to implement privsep. It wasn't done very well, in fact the
parent process (that retains root privileges) just fork()s a generation
of servers, all sharing *exactly* the same address space. No good!
Now, we fork() and re-exec() ourselves, so that each process has a fresh
address space.
Some features (require client ca for example) are temporarly disabled,
will be fixed in subsequent commits. The "ge" program is also
temporarly disabled as it needs tweaks to do privsep too.
- Commit:
eae52ad493f582222b4f2b748c0043c42bb851cb
- From:
- Omar Polo <op@omarpolo.com>
- Date:
switch to the more usual log.c
- Commit:
281a8852b3a2d76c10d2fb6476a706746d05509b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename log.[ch] to logger.[ch]
- Commit:
070b32952caf91e2f7f7598230236fdd872f99e5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move and dedup the tls initalization in server.c
- Commit:
df5058c919cbd1538d0a04cb2a4c179c0291566f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
provide a more usual fatal
fatal usually appends the error string. Add 'fatalx' that doesn't.
Fix callers and move the prototypes to log.h
- Commit:
a01a91db06a943ef0cc8fbb7294786814a63b65c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move some server-related code to server.c