Commits
- Commit:
1962764c6292e845cec17393e1c46c1473ca1eeb
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix sandbox_server_process
it does the unveil(2)ing based on the first config, which breaks
config-reloading.
- Commit:
fc440833adbcdb96e6846bc0e1b021c5376473eb
- From:
- Omar Polo <op@omarpolo.com>
- Date:
provide sandbox_main_process on !OpenBSD
- 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:
2dd5994ae172ed8162aff397b907e4fc476fbaae
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use fatal() in code used in the daemon
- 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:
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:
1e0b974519c8228e271b2b6e677c1b8f9a109b6b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
send capsicum/landlock/seccomp hack to Valhalla
- Commit:
0b62f4842d7c65b8f64c5f676a0a05333fd7db6f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop landlock/seccomp and capsicum support
it reached a point where this stuff is not maintenable. I'd like
to move forward with gmid, but the restriction of capsicum and the
linux environment at large that make landlock unusable (how can you
resolve DNS portably when under landlock?) -and don't get me started
on seccomp- makes it impossible for me to do any work.
So, I prefer removing the crap, resuming working on gmid by cleaning
stuff and consolidating the features, improving various things
etc... and then eventually see how to introduce some sandboxing
again on other systems. Patches to resume sandboxing are, as always,
welcome!
- Commit:
b24c6fcc1c81fa2a6b71048a9d2fc532402448b7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
adjust pledge/unveil on OpenBSD
to connect to unix-domain sockets the `unix' pledge is needed and also
unveil "w". gmid can't mutate files because it doesn't pledge `wpath'
nor `cpath'.
- Commit:
534afd0ddcba7c3d2f8478e89db026010c6190c5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
make the various strings in the config fixed-length
will help in future restructuring to have fixed-size objects.
- Commit:
760009951357d4c36991c4c6a62db973289b32d9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
optionally disable the sandbox on some systems
The FreeBSD and Linux' sandbox can't deal with `fastcgi' and `proxy'
configuration rules: new sockets needs to be opened and it's either
impossible (the former) or a huge pain in the arse (the latter).
The sandbox is still always used in case only static files are served.
- Commit:
1ab7c96bb305e818b5dfa3b525d5ff635ad12a0a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gc sandbox_executor_process
- Commit:
d29a2ee2246e1b1b0c5222a823820e42422c894e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
get rid of the CGI support
I really want to get rid of the `executor' process hack for CGI scripts
and its escalation to allow fastcgi and proxying to work on non-OpenBSD.
This drops the CGI support and the `executor' process entirely and is
the first step towards gmid 2.0. It also allows to have more secure
defaults.
On non-OpenBSD systems this means that the sandbox will be deactivated
as soon as fastcgi or proxying are used: you can't open sockets under
FreeBSD' capsicum(4) and I don't want to go thru the pain of making it
work under linux' seccomp/landlock. Patches are always welcome however.
For folks using CGI scripts (hey, I'm one of you!) not all hope is lost:
fcgiwrap or OpenBSD' slowcgi(8) are ways to run CGI scripts as they were
FastCGI applications.
fixes for the documentation and to the non-OpenBSD sandboxes will
follow.
- Commit:
e5d82d9472513ef742dbb0b5ac451337625feb58
- From:
- Omar Polo <op@omarpolo.com>
- Date:
const-ify some tables
matches found with
% grep -R '=[ ]*{' . | fgrep -v const