summaryrefslogtreecommitdiff
path: root/src/journal-remote
AgeCommit message (Collapse)Author
2014-09-15hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt
It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
2014-08-31journal-remote: fix check if realloc failedThomas Hindoe Paaboel Andersen
2014-08-21notify: send STOPPING=1 from our daemonsLennart Poettering
2014-08-20journal-upload: make sure that 'r' is initializedLukas Nykryn
2014-08-20journal-remote: remove unreachable codeLukas Nykryn
2014-08-20journal-upload: allow the tool to startLennart Poettering
2014-08-20cmdline: for new tools avoid introduce new negative switches, and properly ↵Lennart Poettering
align --help texts Negative switches are a bad un-normalized thing. We alerady have some, but we should try harder to avoid intrdoucing new ones. Hence, instead of adding two switches: --foobar --no-foobar Let's instead use the syntax --foobar --foobar=yes --foobar=no Where the first two are equivalent. The boolean argument is parsed following the usual rules. Change all new negative switches this way. This patch also properly aligns the --help table, so that single char switches always get a column separate of the long switches.
2014-08-11journal-remote: fix parsing of fd command line argumentLennart Poettering
2014-08-03Unify parse_argv styleZbigniew Jędrzejewski-Szmek
getopt is usually good at printing out a nice error message when commandline options are invalid. It distinguishes between an unknown option and a known option with a missing arg. It is better to let it do its job and not use opterr=0 unless we actually want to suppress messages. So remove opterr=0 in the few places where it wasn't really useful. When an error in options is encountered, we should not print a lengthy help() and overwhelm the user, when we know precisely what is wrong with the commandline. In addition, since help() prints to stdout, it should not be used except when requested with -h or --help. Also, simplify things here and there.
2014-08-03journal-remote: rename KEY_FILE to avoid confict with <linux/input.h>Zbigniew Jędrzejewski-Szmek
2014-07-31Properly report invalid quoted stringsZbigniew Jędrzejewski-Szmek
$ systemd-analyze verify trailing-g.service [./trailing-g.service:2] Trailing garbage, ignoring. trailing-g.service lacks ExecStart setting. Refusing. Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument. Failed to create trailing-g.service/start: Invalid argument
2014-07-31Reject invalid quoted stringsZbigniew Jędrzejewski-Szmek
String which ended in an unfinished quote were accepted, potentially with bad memory accesses. Reject anything which ends in a unfished quote, or contains non-whitespace characters right after the closing quote. _FOREACH_WORD now returns the invalid character in *state. But this return value is not checked anywhere yet. Also, make 'word' and 'state' variables const pointers, and rename 'w' to 'word' in various places. Things are easier to read if the same name is used consistently. mbiebl_> am I correct that something like this doesn't work mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"' mbiebl_> systemd seems to strip of the quotes mbiebl_> systemctl status shows mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint mbiebl_> which is pretty weird
2014-07-16Let config_parse open file where applicableZbigniew Jędrzejewski-Szmek
Special care is needed so that we get an error message if the file failed to parse, but not when it is missing. To avoid duplicating the same error check in every caller, add an additional 'warn' boolean to tell config_parse whether a message should be issued. This makes things both shorter and more robust wrt. to error reporting.
2014-07-16journal-remote: remove obsolete variableZbigniew Jędrzejewski-Szmek
2014-07-16journal-remote: fix double typedef and add missing headerZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: avoid copying input dataZbigniew Jędrzejewski-Szmek
Instead of copying fields into new memory allocations, simply keep pointers into the receive buffer. Data in this buffer is only copied when there is not enough space for new data and a large chunk of the buffer contains old data.
2014-07-15µhttp-util: fix compilation without gnutlsZbigniew Jędrzejewski-Szmek
2014-07-15journal-upload: add config fileZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: let user specify just the main part of the urlZbigniew Jędrzejewski-Szmek
We can append /upload ourselves.
2014-07-15journal-remote: rework fd and writer reference handlingZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: improve some messagesZbigniew Jędrzejewski-Szmek
2014-07-15Fix problem with allocating large buffers and log leftoversZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: allow splitting incoming logs by source hostZbigniew Jędrzejewski-Szmek
Previously existing scheme where the file name would be based on the source was just too ugly and unpredicatable. Now there are only two options: 1. just one file (until rotation), 2. one file per source host, using the hostname as filename part. For the cases where the source is specified by the user, only option one is allowed, and the full of the file must be specified.
2014-07-15Allow addresses to be specified for --listen-... argsZbigniew Jędrzejewski-Szmek
Hostnames still aren't accepted.
2014-07-15Add simple generator of fake journal export streamZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: add units and read certs from default locationsZbigniew Jędrzejewski-Szmek
2014-07-15journal-upload: add watchdog supportZbigniew Jędrzejewski-Szmek
2014-07-15journal-upload: make state persistentZbigniew Jędrzejewski-Szmek
2014-07-15journal-upload: use journal as the sourceZbigniew Jędrzejewski-Szmek
2014-07-15journal-upload: HTTPS supportZbigniew Jędrzejewski-Szmek
2014-07-15journal-upload: a tool to push messages to systemd-journal-remoteZbigniew Jędrzejewski-Szmek
2014-07-15journal-remote: reject fields above maximum sizeZbigniew Jędrzejewski-Szmek
Also fix an infinite loop on E2BIG. Remember what range we already scanned for '\n', to avoid quadratic behaviour on long "text" fields.
2014-07-15journal-remote: small fixesZbigniew Jędrzejewski-Szmek
2014-07-15Move network-related journal programs to src/journal-remote/Zbigniew Jędrzejewski-Szmek
Directory src/journal has become one of the largest directories, and since systemd-journal-gatewayd, systemd-journal-remote, and forthcoming systemd-journal-upload are all closely related, create a separate directory for them.