Lennart Poettering [Mon, 15 Feb 2016 19:29:59 +0000 (20:29 +0100)]
Merge pull request #2611 from 0xAX/deserialize-clkid
time-util: introduce deserialize_timestamp_value()
Alexander Kuleshov [Mon, 15 Feb 2016 18:04:49 +0000 (00:04 +0600)]
logind: use deserialize_timestamp_value()
which is introduced in the
ebf30a086d commit.
Alexander Kuleshov [Mon, 15 Feb 2016 18:04:09 +0000 (00:04 +0600)]
machine: use deserialize_timestamp_value()
which is introduced in the
ebf30a086dfa commit.
Alexander Kuleshov [Mon, 15 Feb 2016 18:01:44 +0000 (00:01 +0600)]
time-util: introduce deserialize_timestamp_value()
The time-util.c provides dual_timestamp_deserialize() function to
convert value to usec_t and set it as value of ts->monotonic and
ts->realtime.
There are some places in code which do the same but only for one
clockid_t (realtime or monotonic), when dual_timestamp_deserialize()
sets value of both.
This patch introduces the deserialize_timestamp_value() which converts
a given value to usec_t and write it to a given timestamp.
Daniel Mack [Mon, 15 Feb 2016 15:50:55 +0000 (16:50 +0100)]
Merge pull request #2620 from bengal/assert-sd-event-now
dhcp: assert the success of sd_event_now()
Beniamino Galvani [Mon, 15 Feb 2016 15:11:51 +0000 (16:11 +0100)]
dhcp: assert the success of sd_event_now()
The function must never fail.
Lennart Poettering [Mon, 15 Feb 2016 13:54:09 +0000 (14:54 +0100)]
Merge pull request #2618 from zonque/busproxy-removal
remove bus-proxyd
Lennart Poettering [Mon, 15 Feb 2016 13:08:28 +0000 (14:08 +0100)]
Merge pull request #2596 from keszybz/move-activate-to-bin
Move activate to bin, extend --fdnames functionality
Daniel Mack [Mon, 15 Feb 2016 10:11:19 +0000 (11:11 +0100)]
Merge pull request #2617 from rabinv/master
missing.h: define IFLA_EXT_MASK
Rabin Vincent [Fri, 12 Feb 2016 07:41:44 +0000 (08:41 +0100)]
missing.h: define IFLA_EXT_MASK
We already define IFLA_PROMISCUITY and some other of these masks in
order to allow building with older headers. Define IFLA_EXT_MASK too,
which was added in the same kernel version as IFLA_PROMISCUITY (v3.10).
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 03:11:33 +0000 (22:11 -0500)]
Promote systemd-activate to /usr/bin/systemd-socket-activate
It has fairly wide functionality now and the interface has been
stable for a while. It it a useful testing tool.
The name is changed to better indicate what it does.
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 21:48:03 +0000 (16:48 -0500)]
Merge pull request #2608 from poettering/resolved-prop-fix
bus property name fix in resolved
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 21:38:58 +0000 (16:38 -0500)]
Merge pull request #2609 from 0xAX/service-dual-timestamp-serialization
service: remove unnecessary check that dual_timestamp is set
Lennart Poettering [Sat, 13 Feb 2016 19:32:11 +0000 (20:32 +0100)]
busctl: when formatting message contents, make sure to print all whitespaces
Previously we'd miss a necessary whitespace at the end of arrays, if more data
was following.
Lennart Poettering [Sat, 13 Feb 2016 19:26:30 +0000 (20:26 +0100)]
resolved: extend ResolveHostname() bus call so that it can parse IP addresses
If the hostname passed to ResolveHostname() is actually an IP address that is
correctly formatted as string parse it as such, avoid any DNS traffic and
return the data in parsed form.
This is useful for clients which can simply call the bus function now without
caring about the precise formatting of specified hostnames. This mimics
getaddrinfo()'s behaviour with the AI_NUMERICHOST flag set.
Note that this logic is only implemented for ResolveHostname(), but not for
calls such as ResolveRecord(), for which only DNS domain names may be used as
input.
The "authenticated" flag is set for look-ups of this type, after all no
untrusted network traffic is involved.
Lennart Poettering [Sat, 13 Feb 2016 19:03:01 +0000 (20:03 +0100)]
resolved: rename "SearchDomains" property in the Manager interface to "Domains"
Another property name fuck-up. The property contains both search and routing
domains and hence should be exposed as "Domains" rather than "SearchDomains".
The counterpart in the Link object was correctly named, and the
SetLinkDomains() and SetDomains() setter calls too, hence let's get this right,
too.
(Yepp, a minor API break actually, but given that this was so far not
documented, and only 3 days public let's fix this now)
Lennart Poettering [Sat, 13 Feb 2016 19:02:30 +0000 (20:02 +0100)]
resolved: fix definition of SD_RESOLVED_FLAGS_MAKE
Lennart Poettering [Sat, 13 Feb 2016 19:01:52 +0000 (20:01 +0100)]
resolved: drop references to two bus error codes no longer used
Lennart Poettering [Sat, 13 Feb 2016 17:22:25 +0000 (18:22 +0100)]
update TODO
Alexander Kuleshov [Sat, 13 Feb 2016 17:55:15 +0000 (23:55 +0600)]
service: remove unnecessary check
We call dual_timestamp_serialize() only if the s->watchdog_timestamp is
set. But the dual_timestamp_serialize() already checks a given dual
timestamp by the call of the dual_timestamp_is_set(). So we can remove
this check safely.
Lennart Poettering [Sat, 13 Feb 2016 17:19:14 +0000 (18:19 +0100)]
resolved: fix DNSSECSupported Link object property name
By mistake the "DNSSECSupported" bus property of the Link object got named
"DNSSECSupport". Internally, it's named correctly, and the counterpart on the
"Manager" object got named correctly too.
Technically this rename is an API break, but given that the interface is not
documented or widely announced yet, and just 3 days in a published release,
let's just fix this, and hope nobody notices.
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 04:33:09 +0000 (23:33 -0500)]
activate: allow multiple, possibly invalid, fd names
Previous code only allowed a single name to be passed, and duplicated
it over all descriptors. For the sake of testing, allow different
names and in arbitrary number. If just one is given, duplicate it
to match the number of sockets. This matches previuos behaviour.
Since this is a testing tool, it seems useful to allow passing invalid
names to test application behaviour with invalid names. Hence, only
warn. When warning, escape the name.
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 04:24:14 +0000 (23:24 -0500)]
basic/strv: fix strv_join for first empty argument
Empty strings were ignored in strv_join, but only if they were at the beginning
of the string. Empty strings after at least one non-empty item were treated
normally.
Previously:
{"x"} → "x"
{"x", ""} → "x"
{"x", "", ""} → "x::"
{""} → ""
{"", ""} → ""
{"", "", ""} → ""
{"", "x"} → "x"
{"", "x", ""} → "x:"
Now:
{"x"} → "x"
{"x", ""} → "x"
{"x", "", ""} → "x::"
{""} → ""
{"", ""} → ":"
{"", "", ""} → "::"
{"", "x"} → ":x"
{"", "x", ""} → ":x:"
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 15:36:02 +0000 (10:36 -0500)]
Merge pull request #2603 from poettering/drop-compat-libs
Some spring cleaning
Lennart Poettering [Sat, 13 Feb 2016 11:28:28 +0000 (12:28 +0100)]
tree-wide: make more global variables static
let's export as little as we can
Lennart Poettering [Sat, 13 Feb 2016 11:28:04 +0000 (12:28 +0100)]
util: drop two unused calls from src/basic/
Lennart Poettering [Sat, 13 Feb 2016 11:03:16 +0000 (12:03 +0100)]
build-sys: drop aufs-util.[ch]
Left over cruft from the dkr excercise.
Lennart Poettering [Sat, 13 Feb 2016 10:55:47 +0000 (11:55 +0100)]
gitignore: remove stuff long lost
Drop some entries of stuff we long removed from the main git repo, either
because it was split out or removed altogether.
Lennart Poettering [Fri, 12 Feb 2016 22:44:22 +0000 (23:44 +0100)]
build-sys: drop Makefile symlink in src/basic/linux
The dir is not used otherwise, hence let's drop the Makefile, so that the dir
stops to exist, too.
Lennart Poettering [Fri, 12 Feb 2016 22:29:57 +0000 (23:29 +0100)]
core: drop Capabilities= setting
The setting is hardly useful (since its effect is generally reduced to zero due
to file system caps), and with the advent of ambient caps an actually useful
replacement exists, hence let's get rid of this.
I am pretty sure this was unused and our man page already recommended against
its use, hence this should be a safe thing to remove.
Lennart Poettering [Fri, 12 Feb 2016 22:10:23 +0000 (23:10 +0100)]
util-lib: drop json parser
This was used by the dkr logic, which is gone now, hence remove this too.
Should we need it one day again the git history never forgets...
Note that this only covers the JSON parser. The JSON generator used by
"journalctl -o json" remains, as its much much simpler and requires no
infrastructure except printf() and the most basic escaping.
Lennart Poettering [Fri, 12 Feb 2016 21:51:55 +0000 (22:51 +0100)]
build-sys: drop libsystemd-{id128,daemon,login,journal}.so compat libs
They have long been obsolete, and upstream distros and packages have mostly
switched over, let's get rid of it for good.
Lennart Poettering [Sat, 13 Feb 2016 10:15:41 +0000 (11:15 +0100)]
Merge pull request #2589 from keszybz/resolve-tool-2
Better support of OPENPGPKEY, CAA, TLSA packets and tests
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 01:36:19 +0000 (20:36 -0500)]
Merge pull request #2601 from poettering/systemd-analyze-dump-align
core: fix indenting in dump output
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2016 02:35:44 +0000 (21:35 -0500)]
resolve: always align flags to 8th column and print CAA flags
Left-over unknown flags are printed numerically. Otherwise,
it wouldn't be known what bits are remaining without knowning
what the known bits are.
A test case is added to verify the flag printing code:
============== src/resolve/test-data/fake-caa.pkts ==============
google.com. IN CAA 0 issue "symantec.com"
google.com. IN CAA 128 issue "symantec.com"
-- Flags: critical
google.com. IN CAA 129 issue "symantec.com"
-- Flags: critical 1
google.com. IN CAA 22 issue "symantec.com"
-- Flags: 22
Zbigniew Jędrzejewski-Szmek [Sun, 31 Jan 2016 21:21:00 +0000 (16:21 -0500)]
resolve: parse CAA records
Zbigniew Jędrzejewski-Szmek [Sun, 31 Jan 2016 21:23:00 +0000 (16:23 -0500)]
Fix hashing of TLSA packets
Also add example files with TLSA and SSHFP records.
Zbigniew Jędrzejewski-Szmek [Thu, 11 Feb 2016 14:18:32 +0000 (09:18 -0500)]
test-dns-packet: allow running without arguments
Zbigniew Jędrzejewski-Szmek [Sun, 31 Jan 2016 05:10:42 +0000 (00:10 -0500)]
test-dns-packet: add framework to read and dump packets
Packets are stored in a simple format:
<size> <packet-wire-format> <size> <packet-wire-format> ...
Packets for some example domains are dumped, to test rr code for various
record types. Currently:
A
AAAA
CAA
DNSKEY
LOC
MX
NS
NSEC
OPENPGPKEY
SOA
SPF
TXT
The hashing code is executed, but results are not checked.
Also build other tests in src/resolve only with --enable-resolve.
Zbigniew Jędrzejewski-Szmek [Sat, 13 Feb 2016 00:14:25 +0000 (19:14 -0500)]
Merge pull request #2600 from poettering/s390-alarm-clock
time-util: map ALARM clockids to non-ALARM clockids in now()
Lennart Poettering [Fri, 12 Feb 2016 20:33:39 +0000 (21:33 +0100)]
core: fix indenting in dump output
Fixes: #2593
Lennart Poettering [Fri, 12 Feb 2016 20:29:01 +0000 (21:29 +0100)]
time-util: map ALARM clockids to non-ALARM clockids in now()
Fixes: #2597
Daniel Mack [Fri, 12 Feb 2016 14:25:27 +0000 (15:25 +0100)]
remove bus-proxyd
As kdbus won't land in the anticipated way, the bus-proxy is not needed in
its current form. It can be resurrected at any time thanks to the history,
but for now, let's remove it from the sources. If we'll have a similar tool
in the future, it will look quite differently anyway.
Note that stdio-bridge is still available. It was restored from a version
prior to
f252ff17, and refactored to make use of the current APIs.
Martin Pitt [Fri, 12 Feb 2016 08:26:18 +0000 (09:26 +0100)]
Merge pull request #2594 from keszybz/spelling
Spelling
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 04:40:11 +0000 (23:40 -0500)]
Merge pull request #2595 from l10n-tw/master
Update zh_TW translation.
Jeff Huang [Fri, 12 Feb 2016 03:47:11 +0000 (11:47 +0800)]
Update zh_TW translation.
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 02:58:46 +0000 (21:58 -0500)]
Merge pull request #2590 from zonque/bus-endpoint-removal
Remove kdbus custom endpoint support
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 02:52:02 +0000 (21:52 -0500)]
Typo
Zbigniew Jędrzejewski-Szmek [Wed, 10 Feb 2016 14:09:36 +0000 (09:09 -0500)]
NEWS: journal device support is limited to current boot, grammar
Reword some sentences for better flow.
Zbigniew Jędrzejewski-Szmek [Fri, 12 Feb 2016 02:47:54 +0000 (21:47 -0500)]
Merge pull request #2592 from mbiebl/typo-fixes
Typo fixes
Michael Biebl [Thu, 11 Feb 2016 23:26:37 +0000 (00:26 +0100)]
Typo fixes
Michael Biebl [Thu, 11 Feb 2016 23:19:51 +0000 (00:19 +0100)]
Merge pull request #2591 from jwilk/spelling
man: fix typos
Jakub Wilk [Thu, 11 Feb 2016 23:01:16 +0000 (00:01 +0100)]
man: fix typos
Daniel Mack [Thu, 11 Feb 2016 21:12:04 +0000 (22:12 +0100)]
Remove kdbus custom endpoint support
This feature will not be used anytime soon, so remove a bit of cruft.
The BusPolicy= config directive will stay around as compat noop.
Lennart Poettering [Thu, 11 Feb 2016 19:38:03 +0000 (20:38 +0100)]
Merge pull request #2587 from haraldh/tpmv3
sd-boot: put hashed kernel command line in a PCR of the TPM
Zbigniew Jędrzejewski-Szmek [Thu, 11 Feb 2016 18:17:42 +0000 (13:17 -0500)]
Merge pull request #2588 from phomes/core-enum-fix
core: use correct enum
Zbigniew Jędrzejewski-Szmek [Sat, 30 Jan 2016 21:42:16 +0000 (16:42 -0500)]
resolved: add cleanup function to rewind packets
This makes the behaviour more consistent. Before we would not rewind
after some errors, but this seems to have been an unintentional
omission.
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2016 23:24:27 +0000 (18:24 -0500)]
systemd-resolve: allow easy querying of openpgp keys
$ systemd-resolve --openpgp zbyszek@fedoraproject.org
d08ee310438ca124a6149ea5cc21b6313b390dce485576eff96f8722._openpgpkey.fedoraproject.org. IN OPENPGPKEY
mQINBFBHPMsBEACeInGYJCb+7TurKfb6wGyTottCDtiSJB310i37/6ZYoeIay/5soJjlM
yfMFQ9T2XNT/0LM6gTa0MpC1st9LnzYTMsT6tzRly1D1UbVI6xw0g0vE5y2Cjk3xUwAyn
...
Zbigniew Jędrzejewski-Szmek [Thu, 28 Jan 2016 23:24:27 +0000 (18:24 -0500)]
Move initialize_libgcrypt to separate file
It's annoying to have the exact same function in three places.
It's stored in src/shared, but it's not added to the library to
avoid the dependency on libgcrypt.
Zbigniew Jędrzejewski-Szmek [Tue, 2 Feb 2016 02:57:41 +0000 (21:57 -0500)]
Add memcpy_safe
ISO/IEC 9899:1999 §7.21.1/2 says:
Where an argument declared as size_t n specifies the length of the array
for a function, n can have the value zero on a call to that
function. Unless explicitly stated otherwise in the description of a
particular function in this subclause, pointer arguments on such a call
shall still have valid values, as described in 7.1.4.
In base64_append_width memcpy was called as memcpy(x, NULL, 0). GCC 4.9
started making use of this and assumes This worked fine under -O0, but
does something strange under -O3.
This patch fixes a bug in base64_append_width(), fixes a possible bug in
journal_file_append_entry_internal(), and makes use of the new function
to simplify the code in other places.
Thomas Hindoe Paaboel Andersen [Thu, 11 Feb 2016 18:02:54 +0000 (19:02 +0100)]
Harald Hoyer [Wed, 3 Feb 2016 16:39:24 +0000 (17:39 +0100)]
sd-boot: put hashed kernel command line in a PCR of the TPM
The UEFI BIOS already hashes the contents of the loaded image, so the
initrd and the command line of the binary are recorded.
Because manually added LoadOptions are not taken into account, these
should be recorded also.
This patch logs and extends a TPM PCR register with the LoadOptions.
This feature can be enabled with configure --enable-tpm
The PCR register index can be specified with
configure --with-tpm-pcrindex=<NUM>
Lennart Poettering [Thu, 11 Feb 2016 16:28:00 +0000 (17:28 +0100)]
configure: bump version number
Lennart Poettering [Thu, 11 Feb 2016 15:25:54 +0000 (16:25 +0100)]
delta: minor coding style fixes
no change in behaviour
Lennart Poettering [Thu, 11 Feb 2016 15:25:22 +0000 (16:25 +0100)]
man: document that resolved cares about /etc/hosts
Lennart Poettering [Thu, 11 Feb 2016 12:55:59 +0000 (13:55 +0100)]
Merge pull request #2581 from evverx/dev-mqueue-cond
units: don't try to mount the mqueue fs if we lack the privileges for it
Martin Pitt [Thu, 11 Feb 2016 12:29:53 +0000 (13:29 +0100)]
Merge pull request #2576 from poettering/random-fixes
Random fixes
Lennart Poettering [Thu, 11 Feb 2016 12:16:39 +0000 (13:16 +0100)]
build-sys: bump so version
Lennart Poettering [Thu, 11 Feb 2016 12:11:02 +0000 (13:11 +0100)]
build-sys: run "make hwdb-update"
Lennart Poettering [Thu, 11 Feb 2016 12:02:35 +0000 (13:02 +0100)]
fill in contributors list in NEWS
Lennart Poettering [Wed, 10 Feb 2016 22:39:31 +0000 (23:39 +0100)]
core: don't choke if a unit another unit triggers vanishes during reload
Fixes: #1981
Daniel Mack [Thu, 11 Feb 2016 09:22:25 +0000 (10:22 +0100)]
Merge pull request #2579 from evverx/TEST-1981
tests: add test for https://github.com/systemd/systemd/issues/1981
Daniel Mack [Thu, 11 Feb 2016 09:22:05 +0000 (10:22 +0100)]
Merge pull request #2578 from keszybz/man-pages
man: follow up fixes for #2575
Evgeny Vereshchagin [Thu, 11 Feb 2016 02:45:11 +0000 (02:45 +0000)]
units: don't try to mount the mqueue fs if we lack the privileges for it
See https://github.com/systemd/systemd/pull/2576#discussion-diff-
52592680
Zbigniew Jędrzejewski-Szmek [Thu, 11 Feb 2016 00:49:40 +0000 (19:49 -0500)]
man: follow up fixes for #2575
Zbigniew Jędrzejewski-Szmek [Thu, 11 Feb 2016 00:49:14 +0000 (19:49 -0500)]
Merge pull request #2575 from poettering/manfixes
A variety of man page fixes
Lennart Poettering [Wed, 10 Feb 2016 21:02:33 +0000 (22:02 +0100)]
man: correct explanation of "systemctl is-enabled" output
The "is-enabled" command doesn't care whether the symlinks are declared in the
[Install] section of a unit file or not, when returning "enabled". Any alias,
.wants/ or .requires/ symlinks suffice.
Fixes: #975
Lennart Poettering [Wed, 10 Feb 2016 20:52:40 +0000 (21:52 +0100)]
man: document that ExecStartPost= is only run if ExecStart= succeeded
Fixes: #846
Lennart Poettering [Wed, 10 Feb 2016 20:47:07 +0000 (21:47 +0100)]
man: document that "systemctl enable" supports abbreviated unit file names
Fixes: #1502
Lennart Poettering [Wed, 10 Feb 2016 20:43:34 +0000 (21:43 +0100)]
man: document that nss-myhostname handles *.localhost and *.localdomain too
(And similar for resolved)
Fixes: #1630
Lennart Poettering [Wed, 10 Feb 2016 20:39:36 +0000 (21:39 +0100)]
man: document that [Install] has no effect in unit file .d/*.conf drop-ins
Fixes: #1774
Fixes: #1090
Lennart Poettering [Wed, 10 Feb 2016 20:30:25 +0000 (21:30 +0100)]
man: document distinction between ConditionXYZ= and AssertXYZ=
References: #2468
Lennart Poettering [Wed, 10 Feb 2016 20:29:45 +0000 (21:29 +0100)]
man: document rescue.target and emergency.target in more detail
Fixes: #2523
Lennart Poettering [Wed, 10 Feb 2016 22:02:53 +0000 (23:02 +0100)]
units: don't try to mount the FUSE fs if we lack the privileges for it
See:
https://lists.freedesktop.org/archives/systemd-devel/2016-February/035740.html
Lennart Poettering [Wed, 10 Feb 2016 21:58:41 +0000 (22:58 +0100)]
nss-mymachines: never resolve unmapped UIDs/GIDs
Don't ever permit successful user or group lookups if no UID/GID mapping is
actually applied. THis way, we can be sure that nss-mymachines cannot be used
to insert invalid cache entries into nscd's cache.
https://bugzilla.redhat.com/show_bug.cgi?id=1285339
Lennart Poettering [Wed, 10 Feb 2016 21:54:33 +0000 (22:54 +0100)]
update TODO
Evgeny Vereshchagin [Wed, 10 Feb 2016 18:13:14 +0000 (18:13 +0000)]
build-sys: add TEST-06-SELINUX to dist
This is a follow-up to https://github.com/systemd/systemd/pull/2493
Evgeny Vereshchagin [Mon, 23 Nov 2015 17:56:45 +0000 (17:56 +0000)]
tests: add test for https://github.com/systemd/systemd/issues/1981
Lennart Poettering [Wed, 10 Feb 2016 16:03:00 +0000 (17:03 +0100)]
Merge pull request #2574 from zonque/netclass-remove
cgroup: remove support for NetClass= directive
Lennart Poettering [Wed, 10 Feb 2016 15:53:49 +0000 (16:53 +0100)]
Merge pull request #2495 from heftig/master
tty-ask-password: Split out password sending
Lennart Poettering [Wed, 10 Feb 2016 15:50:21 +0000 (16:50 +0100)]
Merge pull request #2555 from poettering/coredump-fixes
Coredump fixes and more
Daniel Mack [Wed, 10 Feb 2016 14:44:01 +0000 (15:44 +0100)]
cgroup: remove support for NetClass= directive
Support for net_cls.class_id through the NetClass= configuration directive
has been added in v227 in preparation for a per-unit packet filter mechanism.
However, it turns out the kernel people have decided to deprecate the net_cls
and net_prio controllers in v2. Tejun provides a comprehensive justification
for this in his commit, which has landed during the merge window for kernel
v4.5:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=
bd1060a1d671
As we're aiming for full support for the v2 cgroup hierarchy, we can no
longer support this feature. Userspace tool such as nftables are moving over
to setting rules that are specific to the full cgroup path of a task, which
obsoletes these controllers anyway.
This commit removes support for tweaking details in the net_cls controller,
but keeps the NetClass= directive around for legacy compatibility reasons.
Lennart Poettering [Wed, 10 Feb 2016 15:34:11 +0000 (16:34 +0100)]
update NEWS
Lennart Poettering [Mon, 8 Feb 2016 22:56:30 +0000 (23:56 +0100)]
core: treat JobTimeout=0 as equivalent to JobTimeout=infinity
Corrects an incompatibility introduced with
36c16a7cdd6c33d7980efc2cd6a2211941f302b4.
Fixes: #2537
Lennart Poettering [Mon, 8 Feb 2016 22:54:54 +0000 (23:54 +0100)]
core: simplify how we parse TimeoutSec=, TimeoutStartSec= and TimeoutStopSec=
Let's make things more obvious by placing the parse_usec() invocation directly in config_parse_service_timeout().
Lennart Poettering [Mon, 8 Feb 2016 22:39:40 +0000 (23:39 +0100)]
update TODO
Lennart Poettering [Mon, 8 Feb 2016 22:35:24 +0000 (23:35 +0100)]
coredump: dump priviliges when processing system coredumps
Let's add an extra-safety net and change UID/GID to the "systemd-coredump" user when processing coredumps from system
user. For coredumps of normal users we keep the current logic of processing the coredumps from the user id the coredump
was created under.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=87354
Lennart Poettering [Mon, 8 Feb 2016 21:30:58 +0000 (22:30 +0100)]
core: set RLIMIT_CORE to unlimited by default
The kernel sets RLIMIT_CORE to 0 by default. Let's bump this to unlimited by
default (for systemd itself and all processes we fork off), so that the
coredump hooks have an effect if they honour it.
Bumping RLIMIT_CORE of course would have the effect that "core" files will end
up on the system at various places, if no coredump hook is used. To avoid this,
make sure PID1 sets the core pattern to the empty string by default, so that
this logic is disabled.
This change in defaults should be useful for all systems where coredump hooks
are used, as it allows useful usage of RLIMIT_CORE from these hooks again. OTOH
systems that expect that coredumps are placed under the name "core" in the
current directory will break with this change. Given how questionnable this
behaviour is, and given that no common distro makes use of this by default it
shouldn't be too much of a loss. Also, the old behaviour may be restored by
explicitly configuring a "core_pattern" of "core", and setting the default
system RLIMIT_CORE to 0 again via system.conf.
Lennart Poettering [Mon, 8 Feb 2016 21:08:49 +0000 (22:08 +0100)]
coredump: honour RLIMIT_CORE when saving/processing coredumps
With this change processing/saving of coredumps takes the RLIMIT_CORE resource limit of the crashing process into
account, given the user control whether specific processes shall core dump or not, and how large to make the core dump.
Note that this effectively disables core-dumping for now, as RLIMIT_CORE defaults to 0 (i.e. is disabled) for all
system processes.
Lennart Poettering [Mon, 8 Feb 2016 20:16:08 +0000 (21:16 +0100)]
coredump: rework coredumping logic
This reworks the coredumping logic so that the coredump handler invoked from the kernel only collects runtime data
about the crashed process, and then submits it for processing to a socket-activate coredump service, which extracts a
stacktrace and writes the coredump to disk.
This has a number of benefits: the disk IO and stack trace generation may take a substantial amount of resources, and
hence should better be managed by PID 1, so that resource management applies. This patch uses RuntimeMaxSec=, Nice=, OOMScoreAdjust=
and various sandboxing settings to ensure that the coredump handler doesn't take away unbounded resources from normally
priorized processes.
This logic is also nice since this makes sure the coredump processing and storage is delayed correctly until
/var/systemd/coredump is mounted and writable.
Fixes: #2286