1994 Commits

Author SHA1 Message Date
Joris Vink
681e3b2b6e sse example: set http_timeout to 0. 2025-02-10 13:59:29 +01:00
Joris Vink
542c0f1a29 example doesn't need to spawn all workers 2025-02-10 13:59:18 +01:00
Joris Vink
3410a9db91 linux: add readv and pipe2 to acme seccomp filters. 2024-12-12 10:21:25 +01:00
Joris Vink
6122affe22 ugh, typo 2024-12-08 14:58:16 +01:00
Joris Vink
978cb0ab79 pgsql: postgresql 17 added PGRES_TUPLE_CHUNK. 2024-12-08 14:56:33 +01:00
Joris Vink
d3afe09d4e Give keymgr up to 60 seconds to start under ACME=1.
The keymgr is responsible for generating private keys for the
account and domains which can take a while. However the
worker supervisor still only gave keymgr 5 seconds to
start which usually leads to strange errors when
trying to start keymgr with ACME=1 if no
account-key was present.
2024-12-08 12:48:56 +01:00
Joris Vink
5df4d075cf this should actually be 0, not 3.
according to the rfc the only version is 1, which is encoded as a 0.
2024-11-27 11:21:44 +01:00
Joris Vink
4bd456a334 Support Python 3.13.
Since we're using some cpython internals that change from time to time
we have to adjust for the 3.13 release accordingly.
2024-11-08 20:08:19 +01:00
Joris Vink
c437e15b5c style nits 2024-11-08 19:29:40 +01:00
Joris Vink
001096460d Fix the tls-proxy example 2024-11-08 19:28:22 +01:00
Joris Vink
0356286486 up the beer counter 2024-10-25 12:13:55 +02:00
Rickard Lind
510ad9926a Make it safe to call timer close method from timer callback. 2024-10-25 12:12:38 +02:00
Joris Vink
860e21aa50 linux: add faccessat2 to default seccomp rules. 2024-04-29 09:46:44 +02:00
Joris Vink
6fbb6d188e swap macos to dynamic_lookup for undefined. 2024-03-25 19:09:48 -04:00
Joris Vink
1451e0fb43 style nits 2024-01-25 18:32:17 +01:00
Joris Vink
2179c5e5d3 Get rid of X509V3_EXT_add_alias().
The code shuffling to avoid using this is a bit more complex but
in the end perhaps a more sane approach.

diff from tb@ with minor cleanups from me
2024-01-25 18:23:43 +01:00
Joris Vink
16e283e932 Tabs are ok when decoding post data. 2024-01-14 13:01:23 +01:00
Joris Vink
3d88ea442e double acme timeout.
helps when having large installations of certs renewing at the same time.
2023-12-08 07:47:15 +01:00
Joris Vink
f47f8d3f5e Missing options for HTTP method restrictions.
While Kore supports the OPTIONS method, it was not possible
to specify this in the route methods configuration.

Pointed out via discord.
2023-12-01 00:33:18 +01:00
Joris Vink
4df120704d Add stat64() to keymgr seccomp whitelist. 2023-11-28 09:23:08 +01:00
Joris Vink
ff5a3982ce Add unlink and rename system calls to whitelist.
The keymgr uses these when handling entropy files.
2023-11-28 09:22:05 +01:00
Joris Vink
dad6cc7bfe remove const from kore_runtime_count().
via some github PR, please don't make me interact with github too much.
2023-11-03 12:25:39 +01:00
Joris Vink
4fe2baee57 sync syscall lists from linux 2023-09-07 11:10:50 +02:00
Joris Vink
92e1ffcc10 remove -f from the cli, it is default. 2023-04-15 10:03:31 +02:00
Joris Vink
e2dbda88b6 More seccomp work. 2023-04-06 10:16:06 +02:00
Joris Vink
208b0e868f add more syscalls to seccomp whitelists. 2023-04-06 09:33:48 +02:00
Joris Vink
4974a769d4 Add missing inttypes header 2023-04-06 09:23:43 +02:00
Dennis Dillert
ef37ab611d Fix bug: Added syscalls for tasks example.
The tasks example stopped working on Linux (Ubuntu 22.04) due to the use of missing syscalls, which have been added in this fix. In addition, the definition files have been updated to include the newer clone3 system call (in the Linux kernel since 5.6) for new process and thread creation.
2023-04-02 22:08:24 +02:00
Joris Vink
b1a3f2b0f8 fix single binary builds using PYTHON flavor. 2023-04-02 18:54:36 +02:00
Joris Vink
5dd2e922b3 Minor style nits from previous patches. 2023-04-02 18:51:10 +02:00
Alibek Omarov
54f6234e4f kodev: add support for generating Clang compilation database
* generated sources for assets are skipped through filepath check
  it's fine for now, but probably should be redone
* despite Kore supports JSON manipulation, kodev doesn't share this code
  so for now JSON file is being regenerated each build
* tested in Qt Creator, works OK
2023-04-02 18:51:03 +02:00
Alibek Omarov
b3802d186d kodev: split generating compiler commandline to separate function
args array is supposed to hold 34 + CFLAGS_MAX pointers and like the original
function lacks any checks
2023-04-02 18:51:03 +02:00
Alibek Omarov
f9e64ea5f0 kodev: small improvement, fix argv offset, making that argv[0] current command name
* so potential getopt users are happy now
* and no more very specific check for "create" command in main()
2023-04-02 18:51:03 +02:00
Joris Vink
15071f5a14 Change http_argument_urldecode().
Takes a new parameter now `qs`, if set to 1 it'll urldecode
according to how its always done it before.

If not set to 0 (for posts for example), the decoder will allow
\n and \r in addition to the other ones.
2023-03-12 23:35:18 +01:00
Joris Vink
21839aeaa2 demote sched_setaffinity log message to a notice. 2023-03-08 20:30:34 +01:00
Joris Vink
d49d65dfa0 Reshuffle call to kore_platform_worker_setcpu().
Its better to place this inside of kore_worker_privsep(), this
way it'll be called for each process still and we can do it
before we sandbox the processes completely.
2023-03-08 20:28:49 +01:00
Joris Vink
21f466c8b6 Move CPU pinning to kore_worker_started().
When trying to pin a worker to a certain CPU, Kore will log
if it fails but still continue.

The problem is that it tried to do it a bit early and the logging
facilities were not yet setup, causing it to be unable to continue
if kore_log() was called too early.

By moving it to kore_worker_started() we are certain all facilities
are up and running correctly.
2023-03-08 20:11:49 +01:00
Joris Vink
66e893f1d4 Python API domain improvement.
Add redirect() method to add a redirect on a domain much like
in the Kore configuration file.

eg:

domain.redirect("^/account/(.*)$", 301, "https://site/account/$1")
2023-03-04 23:15:49 +01:00
Joris Vink
a68a53c59e new contributer I owe a beer too 2023-03-01 17:15:12 +01:00
Joris Vink
4e38d8a323 Allow clock_gettime64() if defined. 2023-03-01 17:11:27 +01:00
Joris Vink
ecbc373433 revert some labbing in kore_realloc() 2023-03-01 16:41:33 +01:00
Joris Vink
13f9921679 cleanup 2023-03-01 16:35:11 +01:00
Joris Vink
3e944e106b Change kore_realloc() behaviour a bit.
If kore_realloc() decides that a new block must be allocated it will
explicitly call the new kore_free_zero() function to erase the
contents of the old block once the move is done.
2023-03-01 16:29:06 +01:00
Daniel Melani
a5342a0120 Remove libressl log message.
The feature has been removed.
2023-02-22 19:15:42 +01:00
Joris Vink
83d1ff1013 Get rid of the openssl libcrypto allocation hooks.
In practice this rarely works anyway as other libs can end up
allocating things before we even reach main() as demonstrated
on the discord channel earlier.
2023-01-25 08:00:45 +01:00
Joris Vink
9fec810ce8 add lua to built-ins log 2023-01-23 21:56:49 +01:00
Joris Vink
98fba44147 mention lua in readme 2023-01-23 21:34:22 +01:00
Joris Vink
24390b8d6b Allow setting of LUA_VERSION for pkg-config. 2023-01-23 21:33:11 +01:00
Joris Vink
4718bae098 Initial lua runtime.
Works enough so one can do basic configuration and handle HTTP.
2023-01-21 23:41:35 +01:00
Joris Vink
2f5d274059 Rework runtime init a little bit.
It was hardcoded that if KORE_USE_PYTHON was defined we would
look at the passed argument on the command-line as the python
script or module to be run.

This won't work when adding more runtimes.

So instead call a kore_runtime_resolve() function that in
turn calls each available runtime its resolve function.

That resolve function will check if its a script / module
that it can load, and if so will load it.

This way we can remove all those KORE_USE_PYTHON blocks in the
Kore startup path and we pave the way for lua.
2023-01-16 21:00:01 +01:00