b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
8c6bcbf892c60ec33292dd3a912f03f36b27be27 |
|
04-Feb-2016 |
Klearchos Chaloulos <klearchos.chaloulos@nokia.com> |
journal-remote: decrease microhttpd memory limit
Set the MHD_OPTION_CONNECTION_MEMORY_LIMIT to 128KB. The precious value was DATA_SIZE_MAX, which was defined as 1024*1024*768. This caused journal-remote to allocate 756MB for each journal-upload connection, thus exhausting the available memory. |
2f1acf6f1321e00c8e48ca8f161c4d7883ffad63 |
|
24-Jan-2016 |
Yu Watanabe <watanabe.yu+github@gmail.com> |
journal-remote: fix broken --getter option
This commit fixes the following broken --getter option:
when systemd-journal-remote is called with --getter option,
it causes the error meesage "Zero sources specified" and
the getter command will not be called. |
d10accb0b1af1950882fd91f19dc7df4b0e11aa6 |
|
24-Jan-2016 |
Yu Watanabe <watanabe.yu+github@gmail.com> |
journal-remote: output file name is determined by the remote hostname
When --url option is specified, e.g. --url='http://some.host:19531/entries'
retrieved remote journal entries will be stored to
/var/log/journal/remote/remote-some.host.journal |
b68f6b0a794f9e6cb6457a0ac55041c4e7b1a5cb |
|
24-Jan-2016 |
Yu Watanabe <watanabe.yu+github@gmail.com> |
journal-remote: make --url option support arbitrary url
Currently, --url option supports the only form like http(s)://some.host:19531.
This commit adds support to call systemd-journal-remote as follwos:
systemd-journal-remote --url='http://some.host:19531'
systemd-journal-remote --url='http://some.host:19531/'
systemd-journal-remote --url='http://some.host:19531/entries'
systemd-journal-remote --url='http://some.host:19531/entries?boot&follow'
The first three example result the same and retrieve all entries.
The last example retrieves only current boot entries and wait new events. |
7b7afdfc072b14a4fa4dc195f50becaa7cecc5e8 |
|
22-Jan-2016 |
Susant Sahani <ssahani@gmail.com> |
systemd-activate: Add support for datagram sockets
core: Add flexible way to provide socket type
the socket type should be a diffrent argumet
in make_socket_fd . In this way we can set the socket
type like SOCK_STREAM SOCK_DGRAM in the address.
journal-remote: modify make_socket_fd |
ce7229a224228bb996f50181d09757406891e3d6 |
|
18-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: fix warning about deprecated µhttpd macro
src/journal-remote/journal-remote.c:590:13: warning: Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE
return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE,
^
The new define was added in 0.9.38. Instead of requiring the new
libmicrohttpd version, provide the fallback, it is trivial. |
9d3737f13e9b38f88ed7acc800db66c2f025fac9 |
|
20-Dec-2015 |
Michael Scherer <misc@redhat.com> |
Add Seal option in the configuration file for journald-remote
While journal received remotely can be sealed, it can only be done
on the command line using --seal, so for consistency, we will
also permit to set it in the configuration file. |
366b7db4b65b994cd33cf4fd3c1be429be561307 |
|
01-Dec-2015 |
Klearchos Chaloulos <klearchos.chaloulos@nokia.com> |
journal-remote: split-mode=host, remove port from journal filename
When constructing the journal filename to store logs from a remote host, remove the port of the tcp connection, as the port will change with every reboot/connection loss between sender/reveiver machines. Having the port in the filename will cause a new journal file to be created for every reboot or connection loss.
For the implementation, a new argument "bool include_port" is added to the getpeername_pretty() function. This is passed to the sockaddr_pretty() function. The value of the include_port argument is set to true in all calls of getpeername_pretty(), except for 2 calls in journal-remote.c, where it is set to false. |
75eb615480afd787fa412f0a529523f568f79b26 |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
defs: rework CONF_DIRS_NULSTR() macro
The macro is generically useful for putting together search paths, hence
let's make it truly generic, by dropping the implicit ".d" appending it
does, and leave that to the caller. Also rename it from
CONF_DIRS_NULSTR() to CONF_PATHS_NULSTR(), since it's not strictly about
dirs that way, but any kind of file system path.
Also, mark CONF_DIR_SPLIT_USR() as internal macro by renaming it to
_CONF_PATHS_SPLIT_USR() so that the leading underscore indicates that
it's internal. |
709f6e46a35ec492b70eb92943d82a8d838ce918 |
|
05-Nov-2015 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use the negative error codes returned by our functions
Our functions return negative error codes.
Do not rely on errno being set after calling our own functions. |
a0f29c767a3bb3d621c658fa5b87063e1f44e24a |
|
03-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move CONF_DIRS_NULSTR definition to def.h
After all, this is not some compiler or C magic, but something very
specific to how systemd works, hence let's move it into def.h, and out
of macro.h |
3958325852869a5e490b5741016c93b8b9a80e11 |
|
01-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
journal-remote: remove unused variable warning when building without GNUTLS. |
5e3efccfc97c521107057ab088f58acfae8a8956 |
|
30-Oct-2015 |
Dongsu Park <dongsu@endocode.com> |
journal-remote: increase memory limit per connection to avoid errors with HTTPS
Explicitly set MHD_OPTION_CONNECTION_MEMORY_LIMIT to a larger value,
when setting up microhttpd, to give more memory per HTTP(S) connection.
This way systemd-journal-remote can now prevent microhttpd from failing
in creating response headers with messages like "Not enough memory for
write", especially when lots of HTTPS requests arrive. That's precisely
because MHD_OPTION_CONNECTION_MEMORY_LIMIT in libmicrohttpd defaults to
32768, which is in practice insufficient in this case.
See also https://gnunet.org/bugs/view.php?id=4007 for more details.
Fixes: https://github.com/coreos/bugs/issues/927 |
b1f48e3c94d09b28a8325eed55f6c3cbb719ce4b |
|
28-Oct-2015 |
Susant Sahani <ssahani@gmail.com> |
journal-remote: port to extract_first_word |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
15a5e95075a7f6007dd97b2a165c8ed16fe683df |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out printf() helpers to stdio-util.h |
8b43440b7ef4b81c69c31de7ff820dc07a780254 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move string table stuff into its own string-table.[ch] |
8fcde01280adcbd07e8205b91ac52b06305b6208 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out escaping code into escape.[ch]
This really deserves its own file, given how much code this is now. |
ef08ced6b44d4f56477a6798e56ba5c5c9e0023f |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: make sure to set MHD_USE_PIPE_FOR_SHUTDOWN for libmicrohttpd servers
This makes sure libmicrohttpd won't call shutdown() on our listening
sockets, which make sure socket activation and re-activation will work
cleanly.
See:
https://github.com/systemd/systemd/pull/1286
https://lists.gnu.org/archive/html/libmicrohttpd/2015-09/msg00014.html
Fixes #1286 |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
f823da67a66a12352159ba506767000063a1343a |
|
29-Sep-2015 |
Branislav Blaskovic <bblaskov@redhat.com> |
journal-remote: typo in log_error when no sources are specified |
57255510c95ca3369d241502f26d7bbd8fac30a6 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: replace while(1) by for(;;) everywhere
Another Coccinelle script. |
1f6b411372076426c0faf0bb350437fb4d82931f |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: update empty-if coccinelle script to cover empty-while and more
Let's also clean up single-line while and for blocks. |
76ef789d264f9eb7d7624b994aa6eead1dacfac4 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: make use of log_error_errno() return value
Turns this:
r = -errno;
log_error_errno(errno, "foo");
into this:
r = log_error_errno(errno, "foo");
and this:
r = log_error_errno(errno, "foo");
return r;
into this:
return log_error_errno(errno, "foo"); |
8adaf7bd23baa6e2cd99e9e88e55d0f5f5db29a2 |
|
07-Aug-2015 |
Richard Maw <richard.maw@codethink.co.uk> |
strv: convert strv_split_quotes into a generic strv_split_extract
strv_split_extract is to strv_split_quotes as extract_first_word was to
unquote_first_word.
Now there's extract_first_word for extracting a single argument,
extract_many_words for extracting a bounded number of arguments,
and strv_split_extract for extracting an arbitrary number of arguments. |
1938ac5136ddd87dd4f0bccc42b6f5d41f4ca6ba |
|
29-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
socket-util: library calls shouldn't log on their own
Instead, make sure that all callers log properly. |
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9 |
|
15-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: port everything to sigprocmask_many() and friends
This ports a lot of manual code over to sigprocmask_many() and friends.
Also, we now consistly check for sigprocmask() failures with
assert_se(), since the call cannot realistically fail unless there's a
programming error.
Also encloses a few sd_event_add_signal() calls with (void) when we
ignore the return values for it knowingly. |
ce30c8dcb41dfe9264f79f30c7f51c0e74576638 |
|
10-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
Also, when the child is potentially long-running make sure to set a
death signal.
Also, ignore the result of the reset operations explicitly by casting
them to (void). |
24882e06c135584f16f31ba8a00fecde8b7f6fad |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out signal-util.[ch] from util.[ch]
No functional changes. |
a7f7d1bde43fc825c49afea3f946f5b4b3d563e0 |
|
27-Mar-2015 |
Harald Hoyer <harald@redhat.com> |
fix gcc warnings about uninitialized variables
like:
src/shared/install.c: In function ‘unit_file_lookup_state’:
src/shared/install.c:1861:16: warning: ‘r’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
return r < 0 ? r : state;
^
src/shared/install.c:1796:13: note: ‘r’ was declared here
int r;
^ |
4034a06ddb82ec9868cd52496fef2f5faa25575f |
|
26-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework word parsing and c unescaping code
When parsing words from input files, optionally automatically unescape
the passed strings, controllable via a new flags parameter.
Make use of this in tmpfiles, and port everything else over, too.
This improves parsing quite a bit, since we no longer have to process the
same string multiple times with different calls, where an earlier call
might corrupt the input for a later call. |
d357562c48ac71e2197ea63bc57671a29ba12cf6 |
|
14-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
µhttp-util: setup gnutls logs in one function |
15411c0cb1192799b37ec8f25d6f30e8d7292fc6 |
|
13-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses. |
ff55c3c7327e6ad8ab139aef52d498386d4f4a72 |
|
13-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
journal-remote: stop using EWOULDBLOCK
There is no reason to ever use EWOULDBLOCK. It's equivalent to EAGAIN on
all architectures on linux. |
043945b93824e33e040954612aaa934cd1a43a1b |
|
13-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: process events without delay
journal-remote buffers input, and then parses it handling one journal entry at a time.
It was possible for useful data to be left in the buffer after some entries were
processesed. But all data would be already read from the fd, so there would be
no reason for the event loop to call the handler again. After some new data came in,
the handler would be called again, and would then process the "old" data in the buffer.
Fix this by enabling a handler wherever we process input data and do not exhaust data
from the input buffer (i.e. when EAGAIN was not encountered). The handler runs until
we encounter EAGAIN.
Looping over the input data is done in this roundabout way to allow the event loop
to dispatch other events in the meanwhile. If the loop was inside the handler, a
source which produced data fast enough could completely monopolize the process.
https://bugs.freedesktop.org/show_bug.cgi?id=89516 |
f53f7c8fc43df4e38655f2a1f57777c5934fee06 |
|
13-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: check also for EWOULDBLOCK
This matches similar code elsewhere. |
0e72da6fe8671d49b4d458519f5ac7600fd04f03 |
|
13-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: downgrade routine messages to debug
https://bugs.freedesktop.org/show_bug.cgi?id=89486 |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
63c372cb9df3bee01e3bf8cd7f96f336bddda846 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary. |
5ffa8c818120e35c89becd938d160235c069dd12 |
|
01-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add a snprinf wrapper which checks that the buffer was big enough
If we scale our buffer to be wide enough for the format string, we
should expect that the calculation was correct.
char_array_0() invocations are removed, since snprintf nul-terminates
the output in any case.
A similar wrapper is used for strftime calls, but only in timedatectl.c. |
1fa2f38f0f011010bf57522b42fcc168856a7003 |
|
22-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Assorted format fixes
Types used for pids and uids in various interfaces are unpredictable.
Too bad. |
abc08d4d08006fa19dec645859f81af9f227339e |
|
12-Dec-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
wrap a few *_FOREACH macros in curly braces
cppcheck would give up with "syntax error" without them. This led
to reports of syntax errors in unrelated locations and potentially
hid other errors |
bf257aed057efd113f1b84e037fde09ffeed32ee |
|
29-Nov-2014 |
Josh Triplett <josh@joshtriplett.org> |
journald-remote,journal-upload: Support .d directories in the usual search paths |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
f647962d64e844689f3e2acfce6102fc47e76df2 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: yet more log_*_errno + return simplifications
Using:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg;
print;'
$f
done
And a couple of manual whitespace fixups. |
23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno + return simplifications |
eb56eb9b40950f1edcffdb7313f8de4f8572a6d5 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: simplify log_*_errno(r,...) immediately followed by "return r" |
c33b329709ebe2755181980a050d02ec7c81ed87 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno() conversions, multiline calls
Basically:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \
$f; done
Plus manual indentation fixups. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
f88e6be5ee31ff0e45fabcdedaf26d3be0d4817a |
|
10-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
strv: rework strv_split_quoted() to use unquote_first_word()
This should make the unquoting scheme a bit less naive. |
f1f00dbb7f3741b30d4a26b1a8b65ec46ff1fde3 |
|
04-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-event: implicitly set signal event source's descriptions to the signal name |
356779df90a2ecab5da2cb310ad0f8ebc9ca9f46 |
|
04-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-event: rename sd_event_source_set_name() to sd_event_source_get_name()
To mirror the recent name change of the concept for sd_bus objects,
follow the same logic for sd_event_source objects, too. |
cb41ff2922b8a555c01d52e1038ac26360253c15 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
shared/log: add log_trace as compile-time optional debugging
Repetetive messages can be annoying when running with
SYSTEMD_LOG_LEVEL=debug, but they are sometimes very useful
when debugging problems. Add log_trace which is like log_debug
but becomes a noop unless LOG_TRACE is defined during compilation.
This makes it easy to enable very verbose logging for a subset
of programs when compiling from source. |
a7736b14de340c01580dd4c09145c846d21211b9 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: add --split-mode to help |
9ce998b93770708ce992b53e93c3c7781ec9a8a2 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: better error message on failure
Return a proper code instead of simply NULL for failure. |
1af719edc5958c01c19204fb68d6fc45c9eea85c |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd-upload: print paths in help() |
43300d9d38dd26b197c70401d3054483ba248b95 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: give names to event sources
This possibility was recently added, and it makes debugging much nicer. |
42b6bf75e414c4e6ff5b92cda1c76b6b73677cb7 |
|
23-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: fix socket activation |
1f8af042d99cf40543dad0ec049cf7aa2911feba |
|
15-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: fix mem leak on error |
70f1b2ddc6b94d3fa5539eb8503887b465f7fcc7 |
|
29-Sep-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: fix handling of non-blocking sources
In the conversion to sd-event loop, handling of normal files got
broken. We do not want to perform non-blocking reads on them, but
simply do read() in a loop. Install a statically-enabled "source"
to do that. |
22259a00fdb54dee818eeb1019421e2c516a330d |
|
26-Sep-2014 |
Jonathan Liu <net147@gmail.com> |
journal-remote: initialize writer hashmap before use
https://bugs.freedesktop.org/show_bug.cgi?id=83682
[zj: move the initalization even earlier, before any sockets are
looked at.] |
b1604b341bcd190d67894f416d842990a082a4a4 |
|
18-Sep-2014 |
Andreas Henriksson <andreas@fatal.se> |
journal-remote: check return code of sd_event_default
Handle sd_event_default returning error and bail out properly
as done in every other caller of this function.
Found by coverity. Fixes: CID#1238957 |
d5099efc47d4e6ac60816b5381a5f607ab03f06e |
|
15-Sep-2014 |
Michal Schmidt <mschmidt@redhat.com> |
hashmap: introduce hash_ops to make struct Hashmap smaller
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. |
af4ec4309e8f82aad87a8d574785c12f8763d5f8 |
|
21-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
notify: send STOPPING=1 from our daemons |
7a855149eaf6dbd336d9defab5b4a9c70b75d5e6 |
|
20-Aug-2014 |
Lukas Nykryn <lnykryn@redhat.com> |
journal-remote: remove unreachable code |
dad29dff1925a114e20d4eb7b47fca23c4f25fd7 |
|
20-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
cmdline: for new tools avoid introduce new negative switches, and properly 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. |
d7bf74d9cccdc6ffa567ea0e08f814863610f88e |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
journal-remote: fix parsing of fd command line argument |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
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. |
799a8f39d8eb9ea725e85a598c0f5dbd658c8ba7 |
|
03-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: rename KEY_FILE to avoid confict with <linux/input.h> |
b2fadec6048adb3596f2633cb7fe7a49f5937a18 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Properly report invalid quoted strings
$ 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 |
a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Reject invalid quoted strings
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 |
36f822c4bd077f9121757e24b6516e5c7ada63b5 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Let config_parse open file where applicable
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. |
40780a626def76f611807b71994fdaafac4d2b7b |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: remove obsolete variable |
9ff48d0982fcb97923955685fe9fa4e0e67cb238 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: rework fd and writer reference handling |
a83f403760cb63b1bf7787e9ff325ffb6d891d39 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: improve some messages |
4a0a6ac03864998c83918175609275df712a5a05 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix problem with allocating large buffers and log leftovers |
8201af08fa09c2bd0f005fbe262f27e2c5bd2d86 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: allow splitting incoming logs by source host
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. |
24739b7b757d22a4b629d410a768e4e85fb02282 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Allow addresses to be specified for --listen-... args
Hostnames still aren't accepted. |
ad95fd1d2b9c6344864857c2ba7634fd87753f8e |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: add units and read certs from default locations |
a3152e7655231b94fa7b9582906fb86ab00b9c99 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: add watchdog support |
eacbb4d33e2bb5c54311544851140efe3dd0f774 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: use journal as the source |
7449bc1f34c206e3ff8e274cd74e2db950d492a1 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-upload: HTTPS support |
851d4e2a67efb2c8777df151b697391ff1a76af0 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: reject fields above maximum size
Also fix an infinite loop on E2BIG.
Remember what range we already scanned for '\n', to avoid
quadratic behaviour on long "text" fields. |
5c879495eab608bf9b6e7bec1020d916a0503b6e |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
journal-remote: small fixes |
1e4e7b71e1938daa9b2b9718a9f54c69017a9ef5 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Move network-related journal programs to src/journal-remote/
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. |