summaryrefslogtreecommitdiff
path: root/src/journal/microhttpd-util.c
AgeCommit message (Collapse)Author
2014-04-23journal-gatewayd: bugfix for invalid level caseThomas Hindoe Paaboel Andersen
introduced in cafc7f91306ea17ace4a6c3d76d81c8780c87452
2014-03-18microhttpd-util: avoid double free on errorZbigniew Jędrzejewski-Szmek
It seems that resources are properly deallocated by MHD_destroy_response, even if enqueuing the request fails. Also replace a trivial printf with alloca and fixup log message (it'll now be something like "Connection from CN=some.host.name", which seems clear enough.)
2014-03-17microhttpd-util: use static buffer for static messagesZbigniew Jędrzejewski-Szmek
Most of the messages we send do not require a allocating and freeing a buffer, to optimize this by using const strings. Also, rename respond_error to mhd_respond*, since it is used not only for errors. Make use of information from printf to avoid one extra call to strlen.
2014-03-17journal-remote: HTTP(s) supportZbigniew Jędrzejewski-Szmek
The whole tool is made dependent on µhttpd availability. It should be easy to make the µhttpd parts conditional, but since transfer over HTTP seems to be the primary use case, currently this is not done. Current implementation uses nested epoll loops: sd-event is used for the external event loop, and µhttpd uses epoll in its own loop. Unfortunately µhttpd does not expose enough information to add the descriptors it uses to the external event loop. This means that starvation of other events is possible, if one of the inner µhttpd loops is constantly busy. This means that µhttpd servers should not be mixed with other sources. The TLS authentication parts haven't been really tested properly, and should not be take too seriously.
2014-03-17journal-gatewayd: check if certificate is signed by CAZbigniew Jędrzejewski-Szmek
If --trust=ca.crt is used, only clients presenting certificates signed by the ca will be allowed to proceed. No hostname matching is performed, so any client wielding a signed certificate will be authorized. Error functions are moved from journal-gateway to microhttp-util and made non-static, since now they are used in two source files.
2014-03-17journal-gatewayd: log to journal from gnutlsZbigniew Jędrzejewski-Szmek
Prefix "gnutls: " is added. Some semi-random mapping of gnutls levels to syslog levels is done, but since gnutls levels seem to be used rather loosely, most end up as debug.
2014-02-20macro: introduce a nice macro for disabling -Wformat-nonliteral temporarilyLennart Poettering
2013-12-15bus: _printf_ attributes should be on prototypes not function definitions ↵Lennart Poettering
for non-static functions
2013-12-14Add more _printf_'s for format-nonliteralsThomas Hindoe Paaboel Andersen
Clang is a bit more strict wrt format-nonliterals: http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking Adding these extra printf attributes also makes gcc able to find more problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c Some parts looked intetional about breaking the format-nonliteral check. I added some supression for warnings there.
2013-04-18move _cleanup_ attribute in front of the typeHarald Hoyer
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-01-18journal-gatewayd: redirect microhttpd messages to journalZbigniew Jędrzejewski-Szmek
A prefix ("microhttpd: ") is added to the log lines to make it easy to distinguish the source.