Tom MTT.
f3fbb4c77f
feat(feuille.c): handle children exit codes
1 year ago
Tom MTT.
1694929221
fix(feuille.c): reorganize some of its code
1 year ago
Tom MTT.
4894825dac
fix(feuille.c): documentation (x2)
1 year ago
Tom MTT.
741800f7f3
fix(feuille.c): documentation
1 year ago
Tom MTT.
00e6fe5582
feat(feuille.c): accept_loop, better DEBUG mode, some style fixes
1 year ago
Tom MTT.
bf42903592
feat(feuille.c): do not create thread pool if in DEBUG mode
...
Will be useful when a batch of static/dynamic analysis tools will
check feuille's code.
1 year ago
Tom MTT.
43be904636
style: macros indentations (again)
1 year ago
Tom MTT.
bb9a60b240
style(feuille.c): minor padding fix
1 year ago
Tom MTT.
5ba58b1bd7
feat: reduce timeout, max file size, and use more workers by default
1 year ago
Tom MTT.
4867ff3468
chore: update headers
1 year ago
Tom MTT.
42cdd1e16d
fix(feuille.c): ignore SIGPIPE errors
...
feuille was being killed by SIGPIPE when it tried to send data to an
already closed socket (e.g. when someone did a nmap scan on feuille's
port.)
1 year ago
Tom MTT.
e3622822fb
fix(feuille.c): add TODO comment and fix style issue
1 year ago
Tom MTT.
6c57a4d03c
feat: safer `free()'s
...
`free' allocated buffers only on success inside the main loop, and
`free' them on error inside their respective functions
(fixes an UB where an already freed buffer is freed again in the main
loop)
2 years ago
Tom MTT.
24da772e56
feat: dissociate timeouts and empty pastes
...
feuille was handling those two errors the same way, by sending
`Timeout'd.' even if the client just sent an EOF.
2 years ago
Tom MTT.
7904d4dfc4
fix: use port 9999 instead of port 8888
...
web crawlers were creating a shit-ton of pastebins while trying to
connect to feuille.
2 years ago
Tom MTT.
d453de5108
fix(feuille.c): print non-root warning before running in background
2 years ago
Tom MTT.
58db0b6b33
fix(feuille.c): don't check user if not running as root
2 years ago
Tom MTT.
d2c3270b4b
fix(feuille.c): added some space around important blocks
2 years ago
Tom MTT.
e9009b9198
fix(feuille.c): background mode wasn't working when chrooted
...
freopen() could not find /dev/null but still closed std(in|out|err).
New sockets took the stdin file descriptor and broke everything.
Now it's fixed, and I even discovered the daemon() function.
2 years ago
Tom MTT.
7781c2b960
fix(feuille.c): pledge indentation
2 years ago
Tom MTT.
01057061f9
fix: use /var/www/feuille instead of /var/www/htdocs/feuille
2 years ago
Tom MTT.
fdf588e523
fix(feuille.c): pledge promises
2 years ago
Tom MTT.
601f8e4c24
fix(feuille.c): remove pledge stages 1 and 3
...
Stage 1 was causing issues with the chroot syscall, and, since stage
3 was causing more harm than security in terms of readability, I also
removed it.
2 years ago
Tom MTT.
8453d41a00
feat: First stable release
2 years ago