platform/upstream/systemd.git
6 years agoDrop more copyright headers
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 11:24:48 +0000 (13:24 +0200)]
Drop more copyright headers

6 years agoMerge pull request #8876 from yuwata/meson-0.46
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 11:41:57 +0000 (13:41 +0200)]
Merge pull request #8876 from yuwata/meson-0.46

meson: bump minimum required version to 0.46

6 years agoresolve: add assert_not_reached()
Yu Watanabe [Tue, 24 Jul 2018 08:51:18 +0000 (17:51 +0900)]
resolve: add assert_not_reached()

Follow-up for 3fe30d85e37a4aa6729e1e3738d44e9a16d7232d.

6 years agotest-network-tables: add dhcp6_message_type to test
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 08:48:12 +0000 (10:48 +0200)]
test-network-tables: add dhcp6_message_type to test

Follow-up for e91c99059b0d111bd681ea9077d014bd3b6a1f97.

6 years agoMerge pull request #9708 from keszybz/copyright-headers
Lennart Poettering [Tue, 24 Jul 2018 10:59:30 +0000 (12:59 +0200)]
Merge pull request #9708 from keszybz/copyright-headers

Copyright header removal continuation

6 years agoDrop some more copyright headers
Zbigniew Jędrzejewski-Szmek [Mon, 23 Jul 2018 12:40:53 +0000 (14:40 +0200)]
Drop some more copyright headers

Acks in https://github.com/systemd/systemd/issues/9320.

6 years agoDrop "Copyright abandonded" header
Zbigniew Jędrzejewski-Szmek [Mon, 23 Jul 2018 10:37:09 +0000 (12:37 +0200)]
Drop "Copyright abandonded" header

Add CC0 as the license. SPDX does not have a "public domain" tag, but CC0 is
more or less equivalent. We should have *some* header to avoid doubts in the
future.

6 years agofixed ugly colorcodes on brackets
Christian Rebischke [Mon, 23 Jul 2018 23:46:20 +0000 (01:46 +0200)]
fixed ugly colorcodes on brackets

Signed-off-by: Christian Rebischke <Chris.Rebischke@posteo.de>
6 years agoMerge pull request #9687 from yuwata/rfe-9662
Lennart Poettering [Tue, 24 Jul 2018 07:43:57 +0000 (09:43 +0200)]
Merge pull request #9687 from yuwata/rfe-9662

analyze: several systemd-analyze plot improvements

6 years agoMerge pull request #9685 from yuwata/fix-9663
Lennart Poettering [Mon, 23 Jul 2018 19:17:07 +0000 (21:17 +0200)]
Merge pull request #9685 from yuwata/fix-9663

core: serialize and deserialize current ShowStatus

6 years agoMerge pull request #9701 from yuwata/string-table-cleanups
Lennart Poettering [Mon, 23 Jul 2018 19:16:34 +0000 (21:16 +0200)]
Merge pull request #9701 from yuwata/string-table-cleanups

String table cleanups

6 years agoanalyze: add a space in pretty boot time string
Yu Watanabe [Sun, 22 Jul 2018 05:48:24 +0000 (14:48 +0900)]
analyze: add a space in pretty boot time string

6 years agoanalyze: show information from hostnamed in plot even when user mode
Yu Watanabe [Sun, 22 Jul 2018 05:33:31 +0000 (14:33 +0900)]
analyze: show information from hostnamed in plot even when user mode

6 years agoanalyze: plot initrd related timestamps
Yu Watanabe [Sun, 22 Jul 2018 05:04:32 +0000 (14:04 +0900)]
analyze: plot initrd related timestamps

6 years agocore: expose initrd related timestamps on bus
Yu Watanabe [Sun, 22 Jul 2018 04:42:12 +0000 (13:42 +0900)]
core: expose initrd related timestamps on bus

6 years agocore: serialize/deserialize several timestamps on initrd in different names
Yu Watanabe [Sun, 22 Jul 2018 04:41:44 +0000 (13:41 +0900)]
core: serialize/deserialize several timestamps on initrd in different names

6 years agoanalyze: plot units in initrd
Yu Watanabe [Sun, 22 Jul 2018 04:05:32 +0000 (13:05 +0900)]
analyze: plot units in initrd

Closes #9662.

6 years agoMerge pull request #9560 from mbiebl/uaccess-dev-kvm
Zbigniew Jędrzejewski-Szmek [Mon, 23 Jul 2018 18:10:38 +0000 (20:10 +0200)]
Merge pull request #9560 from mbiebl/uaccess-dev-kvm

Re-add uaccess tag for /dev/kvm

6 years agomake dir-locals work again with emacs 26.1
Lennart Poettering [Wed, 20 Jun 2018 08:59:44 +0000 (10:59 +0200)]
make dir-locals work again with emacs 26.1

After upgrading to emacs-26.1-1.fc28.x86_64 I noticed that our
.dir-locals.el files weren't honoured anymore (specifically the fill
column variable is not correctly set for c-mode files). I finally
tracked this down to the order in which items are listed in
.dir-locals.el: if the "nil" one is listed last everything works,
otherwise, it's the one that is applied instead of the c-mode one.

This patch simply swaps the entries, and puts the "nil" one last. My
emacs lisp fu is a bit too limited to understand the full impact for
this, and why emacs 26.1 changed behaviour in this regard, but from an
outsider's view the order shouldn't negatively affect things otherwise,
hence this patch.

6 years agoLGTM: make LGTM.com use meson from pip
Yu Watanabe [Mon, 23 Jul 2018 16:37:29 +0000 (01:37 +0900)]
LGTM: make LGTM.com use meson from pip

6 years agomeson: use has_link_argument() and friends
Yu Watanabe [Tue, 15 May 2018 11:18:24 +0000 (20:18 +0900)]
meson: use has_link_argument() and friends

This bumps the minimum required version of meson to 0.46, as
`has_link_argument()` and friends are supported since 0.46.

6 years agomeson: use integer type in options
Yu Watanabe [Thu, 10 May 2018 07:04:16 +0000 (16:04 +0900)]
meson: use integer type in options

This bumps the minimum required version of meson to 0.45 and
python to 3.5, as integer type option is supported since meson-0.45
and meson-0.45 requires python-3.5.

6 years agotest: add more string-table tests in test-tables
Yu Watanabe [Mon, 23 Jul 2018 16:26:30 +0000 (01:26 +0900)]
test: add more string-table tests in test-tables

6 years agotest: add more string-table tests in test-resolve-tables
Yu Watanabe [Mon, 23 Jul 2018 16:26:14 +0000 (01:26 +0900)]
test: add more string-table tests in test-resolve-tables

6 years agotest: add comment in test-network-tables.c
Yu Watanabe [Mon, 23 Jul 2018 16:25:24 +0000 (01:25 +0900)]
test: add comment in test-network-tables.c

6 years agoresolve: define _DNS_SERVER_TYPE_MAX in enum
Yu Watanabe [Mon, 23 Jul 2018 16:23:41 +0000 (01:23 +0900)]
resolve: define _DNS_SERVER_TYPE_MAX in enum

6 years agosd-device: include sd-device.h in device-internal.h
Yu Watanabe [Mon, 23 Jul 2018 16:22:32 +0000 (01:22 +0900)]
sd-device: include sd-device.h in device-internal.h

6 years agocoredumpctl: info shows the last entry by default
Lion Yang [Sat, 7 Jul 2018 22:00:39 +0000 (06:00 +0800)]
coredumpctl: info shows the last entry by default

Closes #9524.

6 years agoMerge pull request #9658 from LukeShu/to-upstream/misc-cleanup
Lennart Poettering [Mon, 23 Jul 2018 15:44:56 +0000 (17:44 +0200)]
Merge pull request #9658 from LukeShu/to-upstream/misc-cleanup

nspawn: Miscellaneous touch-up

6 years agosystemctl: set string table size for safety
Yu Watanabe [Mon, 23 Jul 2018 14:59:09 +0000 (23:59 +0900)]
systemctl: set string table size for safety

6 years agotest: add a table test for ShowStatus
Yu Watanabe [Mon, 23 Jul 2018 14:45:01 +0000 (23:45 +0900)]
test: add a table test for ShowStatus

6 years agocore: serialize and deserialize current ShowStatus
Yu Watanabe [Mon, 23 Jul 2018 12:55:42 +0000 (21:55 +0900)]
core: serialize and deserialize current ShowStatus

Fixes #9663.

6 years agocore: normalize ShowStatus
Yu Watanabe [Mon, 23 Jul 2018 12:55:26 +0000 (21:55 +0900)]
core: normalize ShowStatus

6 years agomeson: allow building resolved and machined without nss modules
Yu Watanabe [Wed, 18 Jul 2018 00:25:57 +0000 (09:25 +0900)]
meson: allow building resolved and machined without nss modules

This adds -Dnss-resolve= and -Dnss-mymachines= meson options.
By using this option, e.g., resolved can be built without nss-resolve.
When no nss modules are built, then test-nss is neither built.

Also, This changes the option name -Dmyhostname= to -Dnss-myhostname=
for consistency to other nss related options.

Closes #9596.

6 years agomeson: drop redundant messages
Yu Watanabe [Wed, 18 Jul 2018 00:29:28 +0000 (09:29 +0900)]
meson: drop redundant messages

The equivalent messages are shown in the last summary.

6 years agoMake final kill signal configurable
Jon Ringle [Fri, 20 Jul 2018 15:22:43 +0000 (11:22 -0400)]
Make final kill signal configurable

Usecase is to allow changing the final kill from SIGKILL to SIGQUIT which
should create a core dump useful for debugging why the service didn't stop
with the SIGTERM

6 years agocheck nobody user/group validity only when not cross compiling
Chen Qi [Mon, 23 Jul 2018 06:53:09 +0000 (14:53 +0800)]
check nobody user/group validity only when not cross compiling

Using `getent' and `id' command in case of cross compiling does not
make much sense. This is because it is the host files that are checked.

Besides, in some restricted cross compilation environment, these two
command may not even be available. This is to avoid host comtamination.

So we should only check the validity using getent and id when not
cross compiling.

6 years agotests: skip test_get_process_cmdline_harder if `mount --make-rslave /` fails with...
Evgeny Vereshchagin [Thu, 19 Jul 2018 10:24:07 +0000 (10:24 +0000)]
tests: skip test_get_process_cmdline_harder if `mount --make-rslave /`  fails with EPERM or EACCESS

That call to mount was added as a safeguard against a kernel bug which was fixed in
torvalds/linux@bbd5192.

In principle, the error could be ignored because

* normally everything mounted on /proc/PID should disappear as soon as the PID has gone away
* test-mount-util that had been confused by those phantom entries in /proc/self/mountinfo was
  taught to ignore them in 112cc3b.

On the other hand, in practice, if the mount fails, then the next one is extremely unlikely to
succeed, so it seems to be reasonable to just skip the rest of `test_get_process_cmdline_harder`
if that happens.

Closes https://github.com/systemd/systemd/issues/9649.

6 years agologin1: policy: Authorize active users to boot to firmware
Carlo Caione [Fri, 20 Jul 2018 21:22:50 +0000 (22:22 +0100)]
login1: policy: Authorize active users to boot to firmware

Currently to set the flag to reboot into the firmware setup an
authentication by an administrative user is required. Since we are
already enabling active users to reboot the system, it is advisable to
let the user decide if he wants to boot into the firmware setup without
any more hassle.

6 years agomeson: check the existence of ninja.build for fuzzer tests
Yu Watanabe [Sun, 22 Jul 2018 14:39:26 +0000 (23:39 +0900)]
meson: check the existence of ninja.build for fuzzer tests

6 years agomeson: do not build module-util.c when libkmod is not found
Yu Watanabe [Sun, 22 Jul 2018 14:25:07 +0000 (23:25 +0900)]
meson: do not build module-util.c when libkmod is not found

Follow-up for 3cb9b42af3b205fba176ebf51ce0e07739698278 (#9516).

Fixes oss-fuzz-9532.

6 years agotree-wide: drop empty lines in comments
Yu Watanabe [Sun, 22 Jul 2018 18:54:35 +0000 (03:54 +0900)]
tree-wide: drop empty lines in comments

6 years agosystemctl: Only wait when there's something to wait for.
Filipe Brandenburger [Fri, 20 Jul 2018 18:32:55 +0000 (11:32 -0700)]
systemctl: Only wait when there's something to wait for.

Tested:
- `systemctl --wait start i-do-not-exist.service` does not wait.
- `systemctl --wait start i-do-not-exist.service valid-unit.service` does.

6 years agoFix grammar
glitsj16 [Fri, 20 Jul 2018 23:32:02 +0000 (23:32 +0000)]
Fix grammar

6 years agoMinor grammar changes
Josh Soref [Fri, 20 Jul 2018 19:40:15 +0000 (15:40 -0400)]
Minor grammar changes

mostly inserting / removing commas / periods as appropriate.
occasionally fixing duplicated words, proper brand case, and singular/plurals.

6 years agoMerge pull request #9671 from keszybz/tasks-max-doc
Lennart Poettering [Fri, 20 Jul 2018 18:05:45 +0000 (20:05 +0200)]
Merge pull request #9671 from keszybz/tasks-max-doc

Document user@.service and friends

6 years agonspawn: mount_sysfs(): Unconditionally mkdir /sys/fs/cgroup
Luke Shumaker [Thu, 1 Jun 2017 17:59:20 +0000 (13:59 -0400)]
nspawn: mount_sysfs(): Unconditionally mkdir /sys/fs/cgroup

Currently, mount_sysfs() only creates /sys/fs/cgroup if cg_ns_supported().
The comment explains that we need to "Create mountpoint for
cgroups. Otherwise we are not allowed since we remount /sys read-only.";
that is: that we need to do it now, rather than later.  However, the
comment doesn't do anything to explain why we only need to do this if
cg_ns_supported(); shouldn't we _always_ need to do it?

The answer is that if !use_cgns, then this was already done by the outer
child, so mount_sysfs() only needs to do it if use_cgns.  Now,
mount_sysfs() doesn't know whether use_cgns, but !cg_ns_supported() implies
!use_cgns, so we can optimize" the case where we _know_ !use_cgns, and deal
with a no-op mkdir_p() in the false-positive where cgns_supported() but
!use_cgns.

But is it really much of an optimization?  We're potentially spending an
access(2) (cg_ns_supported() could be cached from a previous call) to
potentially save an lstat(2) and mkdir(2); and all of them are on virtual
fileystems, so they should all be pretty cheap.

So, simplify and drop the conditional.  It's a dubious optimization that
requires more text to explain than it's worth.

6 years agocgroup-util: cg_kernel_controllers(): Fix comment about including "name="
Luke Shumaker [Sat, 10 Jun 2017 04:06:45 +0000 (00:06 -0400)]
cgroup-util: cg_kernel_controllers(): Fix comment about including "name="

Remove "arbitrary named hierarchies" from the list of things that
cg_kernel_controllers() might return, and clarify that "name="
pseudo-controllers are not included in the returned list.

/proc/cgroups does not contain "name=" pseudo-controllers, and
cg_kernel_controllers() makes no effort to enumerate them via a different
mechanism.

6 years agonspawn: sync_cgroup(): Rename arg_uid_shift -> uid_shift
Luke Shumaker [Fri, 7 Jul 2017 19:17:41 +0000 (15:17 -0400)]
nspawn: sync_cgroup(): Rename arg_uid_shift -> uid_shift

Naming it arg_uid_shift is confusing because of the global arg_uid_shift in
nspawn.c

6 years agonspawn: Move cgroup mount stuff from nspawn-mount.c to nspawn-cgroup.c
Luke Shumaker [Fri, 7 Jul 2017 22:57:08 +0000 (18:57 -0400)]
nspawn: Move cgroup mount stuff from nspawn-mount.c to nspawn-cgroup.c

6 years agonspawn: Simplify tmpfs_patch_options() usage, and trickle that up
Luke Shumaker [Tue, 13 Jun 2017 22:06:09 +0000 (18:06 -0400)]
nspawn: Simplify tmpfs_patch_options() usage, and trickle that up

One of the things that tmpfs_patch_options does is take an (optional) UID,
and insert "uid=${UID},gid=${UID}" into the options string.  So we need a
uid_t argument, and a way of telling if we should use it.  Fortunately,
that is built in to the uid_t type by having UID_INVALID as a possible
value.

So this is really a feature that requires one argument.  Yet, it is somehow
taking 4!  That is absurd.  Simplify it to only take one argument, and have
that trickle all the way up to mount_all()'s usage.

Now, in may of the uses, the argument becomes

    uid_shift == 0 ? UID_INVALID : uid_shift

because it used to treat uid_shift=0 as invalid unless the patch_ids flag
was also set.  This keeps the behavior the same.  Note that in all cases
where it is invoked, if !use_userns (sometimes called !userns), then
uid_shift is 0; we don't have to add any checks for that.

That said, I'm pretty sure that "uid=0" and not setting "uid=" are the
same, but Christian Brauner seemed to not think so when implementing the
cgns support.  https://github.com/systemd/systemd/pull/3589

6 years agonspawn: Simplify mkdir_userns() usage, and trickle that up
Luke Shumaker [Fri, 7 Jul 2017 22:30:03 +0000 (18:30 -0400)]
nspawn: Simplify mkdir_userns() usage, and trickle that up

One of the things that mkdir_userns{,_p}() does is take an (optional) UID,
and chown the directory to that.  So we need a uid_t argument, and a way of
telling if we should use that uid_t argument.  Fortunately, that is built
in to the uid_t type by having UID_INVALID as a possible value.

However, currently mkdir_userns() also takes a MountSettingsMask and checks
a couple of bits in it to decide if it should perform the chown.

Drop the mask argument, and instead have the caller pass UID_INVALID if it
shouldn't chown.

6 years agoman: add a description of user@.service, user-runtime-dir@.service, user-*.slice
Zbigniew Jędrzejewski-Szmek [Fri, 20 Jul 2018 13:49:57 +0000 (15:49 +0200)]
man: add a description of user@.service, user-runtime-dir@.service, user-*.slice

Fixes #9590.

6 years agoman: split systemd.special(7) into separate system/user sections
Zbigniew Jędrzejewski-Szmek [Thu, 19 Jul 2018 16:45:23 +0000 (18:45 +0200)]
man: split systemd.special(7) into separate system/user sections

User units were in the middle, which is just confusing. Let's discuss
all system units first, and all user units second.

I'm using "System manager units" and "user manager units" instead of the more
obvious "system units" and "user units", because there are also units like
"user@.service".

6 years agotests: prefer MS_SLAVE over MS_PRIVATE for turning off mount propagation
Lennart Poettering [Fri, 20 Jul 2018 13:33:48 +0000 (15:33 +0200)]
tests: prefer MS_SLAVE over MS_PRIVATE for turning off mount propagation

When we open our own little namespace for running our tests in, let's
turn off mount propagation only one way, rather than both ways. This is
better as this means we don't pin host mounts unnecessarily long in our
namespace, even though the host already got rid of them. This is because
MS_SLAVE in contrast to MS_PRIVATE allows umount events to propagate
from the host into our environment.

6 years agoVarious accountings are not implied by their controllers
Ryutaroh Matsumoto [Fri, 20 Jul 2018 11:37:54 +0000 (20:37 +0900)]
Various accountings are not implied by their controllers

The original manpage says "Implies BBBAccounting" many times but actually that accounting is not implied by the respective resource control in v239 with the unified cgroup hierarchy. This commit removes those false explanations.

6 years agoupdate TODO
Lennart Poettering [Fri, 20 Jul 2018 14:38:53 +0000 (16:38 +0200)]
update TODO

6 years agoMerge pull request #9500 from zsol/append
Lennart Poettering [Fri, 20 Jul 2018 13:45:08 +0000 (15:45 +0200)]
Merge pull request #9500 from zsol/append

Add support for opening files for appending

6 years agocore: remove support for API bus "started outside our own logic"
Alan Jenkins [Thu, 21 Jun 2018 13:12:30 +0000 (14:12 +0100)]
core: remove support for API bus "started outside our own logic"

Looking at a recent Bad Day, my log contains over 100 lines of

    systemd[23895]: Failed to connect to API bus: Connection refused

It is due to "systemd --user" retrying to connect to an API bus.[*]  I
would prefer to avoid spamming the logs.  I don't think it is good for us
to retry so much like this.

systemd was mislead by something setting DBUS_SESSION_BUS_ADDRESS.  My best
guess is an unfortunate series of events caused gdm to set this.  gdm has
code to start a session dbus if there is not a bus available already (and
in this case it exports the environment variable).  I believe it does not
normally do this when running under systemd, because "systemd --user" and
hence "dbus.service" would already have been started by pam_systemd.

I see two possibilities

1. Rip out the check for DBUS_SESSION_BUS_ADDRESS entirely.
2. Only check for DBUS_SESSION_BUS_ADDRESS on startup.  Not in the
   "recheck" logic.

The justification for 2), is that the recheck is called from unit_notify(),
this is used to check whether the service just started (or stopped) was
"dbus.service".  This reason for rechecking does not apply if we think
the session bus was started outside our logic.

But I think we can justify 1).  dbus-daemon ships a statically-enabled
/usr/lib/systemd/user/dbus.service, which would conflict with an attempt to
use an external dbus.  Also "systemd --user" is started from user@.service;
if you try to start it manually so that it inherits an environment
variable, it will conflict if user@.service was started by pam_systemd
(or loginctl enable-linger).

6 years agoMerge pull request #9516 from keszybz/module-load-unification
Lennart Poettering [Fri, 20 Jul 2018 11:55:56 +0000 (13:55 +0200)]
Merge pull request #9516 from keszybz/module-load-unification

Module load unification

6 years agoMerge pull request #9614 from poettering/negative-sec
Lennart Poettering [Fri, 20 Jul 2018 11:22:01 +0000 (13:22 +0200)]
Merge pull request #9614 from poettering/negative-sec

parse-util: make sure "-0.-0s" is not considered a valid time specifi…

6 years agoAdd support for opening files for appending
Zsolt Dollenstein [Tue, 3 Jul 2018 19:22:29 +0000 (12:22 -0700)]
Add support for opening files for appending

Addresses part of #8983

6 years agoanalyze: fix width calculation in plot command
Yu Watanabe [Fri, 20 Jul 2018 08:21:10 +0000 (17:21 +0900)]
analyze: fix width calculation in plot command

6 years agoMerge pull request #9659 from yuwata/fix-network-memleak2
Lennart Poettering [Fri, 20 Jul 2018 10:38:49 +0000 (12:38 +0200)]
Merge pull request #9659 from yuwata/fix-network-memleak2

fix networkd memleak and voidify several function calls

6 years agoMerge pull request #9661 from yuwata/add-sigprocmask-to-short-lived-daemons
Lennart Poettering [Fri, 20 Jul 2018 07:50:28 +0000 (09:50 +0200)]
Merge pull request #9661 from yuwata/add-sigprocmask-to-short-lived-daemons

Add sigprocmask to short lived daemons

6 years agohostname: set sd_event_add_signal()
Yu Watanabe [Fri, 20 Jul 2018 06:00:02 +0000 (15:00 +0900)]
hostname: set sd_event_add_signal()

6 years agolocale: set sd_event_add_signal()
Yu Watanabe [Fri, 20 Jul 2018 05:59:36 +0000 (14:59 +0900)]
locale: set sd_event_add_signal()

6 years agotimedate: set sd_event_add_signal()
Yu Watanabe [Fri, 20 Jul 2018 05:59:23 +0000 (14:59 +0900)]
timedate: set sd_event_add_signal()

6 years agoparse-util: make sure "3.+1s" or "3. 1s" are not considered valid time specification
Filipe Brandenburger [Fri, 20 Jul 2018 04:50:35 +0000 (21:50 -0700)]
parse-util: make sure "3.+1s" or "3. 1s" are not considered valid time specification

Indeed, strtoll() is super-hard to use properly! :-(

Also added more tests for those cases and copied the tests to parse_nsec as well.

6 years agotimesync: voidify sd_event_add_signal() and sd_event_set_watchdog()
Yu Watanabe [Fri, 20 Jul 2018 02:30:11 +0000 (11:30 +0900)]
timesync: voidify sd_event_add_signal() and sd_event_set_watchdog()

6 years agoresolve: voidify sd_event_add_signal() and sd_event_set_watchdog()
Yu Watanabe [Fri, 20 Jul 2018 02:29:59 +0000 (11:29 +0900)]
resolve: voidify sd_event_add_signal() and sd_event_set_watchdog()

6 years agonetwork: voidify sd_event_add_signal() and sd_event_set_watchdog()
Yu Watanabe [Fri, 20 Jul 2018 02:29:49 +0000 (11:29 +0900)]
network: voidify sd_event_add_signal() and sd_event_set_watchdog()

6 years agonetwork: add missing sd_netlink_unref()
Yu Watanabe [Fri, 20 Jul 2018 02:23:24 +0000 (11:23 +0900)]
network: add missing sd_netlink_unref()

6 years agoudev-builtin-kmod: adjust logging
Zbigniew Jędrzejewski-Szmek [Fri, 6 Jul 2018 10:47:39 +0000 (12:47 +0200)]
udev-builtin-kmod: adjust logging

I guess the one about "execute" was from the time when modprobe was called
directly.

6 years agocore: use the generic module_load() function
Zbigniew Jędrzejewski-Szmek [Fri, 6 Jul 2018 10:41:50 +0000 (12:41 +0200)]
core: use the generic module_load() function

This allows aliases to be used for the basic modules we load from pid1 before
udev is started. In #9501 the kernel renamed autofs4 to autofs, with "autofs4"
as alias, but we wouldn't load the module, because we didn't follow aliases.
The kernel change was reverted, but it's probably better to support aliases.

6 years agoshared/module-util: fix preexisting mixup with errno sign
Zbigniew Jędrzejewski-Szmek [Thu, 19 Jul 2018 16:27:22 +0000 (18:27 +0200)]
shared/module-util: fix preexisting mixup with errno sign

6 years agoudev-builtin-kmod: use the generic module_load() function
Zbigniew Jędrzejewski-Szmek [Fri, 6 Jul 2018 10:28:09 +0000 (12:28 +0200)]
udev-builtin-kmod: use the generic module_load() function

There should be no functional change.

6 years agoman: fix list-files example
Zbigniew Jędrzejewski-Szmek [Thu, 19 Jul 2018 08:48:46 +0000 (10:48 +0200)]
man: fix list-files example

The dot is only shown for failed units.

Alternative for #9644.

6 years agoMicmute Key support of ThinkCentre M820z and M920z (#9619)
Shengyao Xue [Thu, 19 Jul 2018 09:30:03 +0000 (17:30 +0800)]
Micmute Key support of ThinkCentre M820z and M920z (#9619)

Micmute Key support of ThinkCentre M820z and M920z

There was a ThinkCentre M800z Micmute Key support entry.
But on new models M820z and M920z, the lines must change a bit,
the keyboard:name... must change to evdev:name.
Already tested on the M820z and M920z hardwares.

Per Poettering's comment in https://github.com/systemd/systemd/pull/9619,
We better combine M800z and M820/M920z entries and use the "evdev" prefix.

6 years agoresolve: drop unused slot
Yu Watanabe [Wed, 18 Jul 2018 09:12:50 +0000 (18:12 +0900)]
resolve: drop unused slot

6 years agocoverity: Add custom assertion macros for Coverity
Filipe Brandenburger [Wed, 18 Jul 2018 02:43:20 +0000 (19:43 -0700)]
coverity: Add custom assertion macros for Coverity

These custom macros make the expression go through a function, in order
to prevent ASSERT_SIDE_EFFECT false positives on our macros such as
assert_se() and assert_return() that cannot be disabled and will always
evaluate their expressions.

This technique has been described and recommended in:
https://community.synopsys.com/s/question/0D534000046Yuzb/suppressing-assertsideeffect-for-functions-that-allow-for-sideeffects

Tested by doing a local cov-build and uploading the resulting tarball to
scan.coverity.com, confirmed that the ASSERT_SIDE_EFFECT false positives
were gone.

6 years agoAdd HP Chromebook 14 (Falco) HWDB rule to fix scroll stutter (#9646)
Jérémy Nouhaud [Wed, 18 Jul 2018 22:41:56 +0000 (00:41 +0200)]
Add HP Chromebook 14 (Falco) HWDB rule to fix scroll stutter (#9646)

6 years agoMerge pull request #9600 from keszybz/systemctl-mask-check
Lennart Poettering [Wed, 18 Jul 2018 19:03:02 +0000 (21:03 +0200)]
Merge pull request #9600 from keszybz/systemctl-mask-check

Systemctl mask check

6 years agoMerge pull request #9346 from keszybz/journald-exact2
Lennart Poettering [Wed, 18 Jul 2018 19:00:43 +0000 (21:00 +0200)]
Merge pull request #9346 from keszybz/journald-exact2

Store a copy of the input message if any stripping or truncation occurs

6 years agosd-bus: make bus_slot_disconnect() also unref the slot object
Yu Watanabe [Tue, 17 Jul 2018 08:53:22 +0000 (17:53 +0900)]
sd-bus: make bus_slot_disconnect() also unref the slot object

This makes bus_slot_disconnect() unref the slot object from bus when
`unref == true` and it is floating, as the function removes the
reference from the relevant bus object.

This reverts 20d4ee2cbc21e0c4d2dd6c01d5a18a4cf0d98222, as it
introduces #9604.

Fixes #9604.

6 years agoMerge pull request #9643 from keszybz/two-meson-fixmes
Lennart Poettering [Wed, 18 Jul 2018 18:32:28 +0000 (20:32 +0200)]
Merge pull request #9643 from keszybz/two-meson-fixmes

Two meson fixmes

6 years agoMerge pull request #9633 from yuwata/network-fix-memleak
Lennart Poettering [Wed, 18 Jul 2018 18:32:03 +0000 (20:32 +0200)]
Merge pull request #9633 from yuwata/network-fix-memleak

network: fix memleak

6 years agohwdb: Add force-release for Clevo W65_67SZ media keys
Saleem Rashid [Tue, 17 Jul 2018 21:44:59 +0000 (22:44 +0100)]
hwdb: Add force-release for Clevo W65_67SZ media keys

6 years agoMerge pull request #9640 from keszybz/move-dont-destroy-bus
Lennart Poettering [Wed, 18 Jul 2018 16:40:15 +0000 (18:40 +0200)]
Merge pull request #9640 from keszybz/move-dont-destroy-bus

Move BUS_DONT_DESTROY

6 years agohwdb: fix trailing whitespace
Lennart Poettering [Wed, 18 Jul 2018 16:37:39 +0000 (18:37 +0200)]
hwdb: fix trailing whitespace

Correct whitespace mess introduced by
dc6e5724df3d9b2a5863a9aea8fa9413dbfaa23d.

6 years agomeson: remove false check for key_serial_t
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jul 2018 15:42:06 +0000 (17:42 +0200)]
meson: remove false check for key_serial_t

key_serial_t is defined in keyutil.h, which wasn't included in the header list
in the test, so the test always failed. We were always compiling stuff with
!HAVE_KEY_SERIAL_T.

We could try to add keyutil.h to the test, but then we'd have to first check if
it is available, which just doesn't seem worth the trouble.

key_serial_t should always be defined as int32_t. Let's keep the uncoditional
define, since repeated compatible typedefs are not a problem, and it allows us
to compile even if the header file is missing. If there's ever a change in the
definition, we'll have to adjust the code for the different type anyway, and
our compiler will tell us.

6 years agomeson: unify linux/stat.h check with other checks and use _GNU_SOURCE
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jul 2018 15:26:17 +0000 (17:26 +0200)]
meson: unify linux/stat.h check with other checks and use _GNU_SOURCE

Using _GNU_SOURCE is better because that's how we include the headers in the
actual build, and some headers define different stuff when it is defined.
sys/stat.h for example defines 'struct statx' conditionally.

6 years agobus: add comment to explain assert
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jul 2018 10:23:59 +0000 (12:23 +0200)]
bus: add comment to explain assert

6 years agoAdd accelerometer mount matrix for Linx 12X64
apnix-uk [Tue, 17 Jul 2018 22:00:16 +0000 (23:00 +0100)]
Add accelerometer mount matrix for Linx 12X64

6 years agoman/systemd.resource-control.xml: point user to correct url
Chen Qi [Wed, 18 Jul 2018 08:33:29 +0000 (16:33 +0800)]
man/systemd.resource-control.xml: point user to correct url

cpu.cfs_quota_us is actually explained in sched-bwc.txt instead of
sched-design-CFS.txt.

6 years agobus: move BUS_DONT_DESTROY calls after asserts
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jul 2018 10:16:33 +0000 (12:16 +0200)]
bus: move BUS_DONT_DESTROY calls after asserts

It's not useful to bump the reference count before checking if the object is
NULL. Thanks to d40f5cc498 we can do this ;).

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1576084,
https://bugzilla.redhat.com/show_bug.cgi?id=1575340,
https://bugzilla.redhat.com/show_bug.cgi?id=1575350. I'm not sure why those two
people hit this code path, while most people don't. At least we won't abort.

6 years agonetwork: free routes assigned to link
Yu Watanabe [Wed, 18 Jul 2018 04:07:27 +0000 (13:07 +0900)]
network: free routes assigned to link

6 years agonetwork: simplify link_free()
Yu Watanabe [Wed, 18 Jul 2018 04:06:34 +0000 (13:06 +0900)]
network: simplify link_free()

6 years agonetwork: move sd_event initialization to manager_new()
Yu Watanabe [Wed, 18 Jul 2018 03:37:50 +0000 (12:37 +0900)]
network: move sd_event initialization to manager_new()

6 years agotests: allow passing additional arguments to nspawn via NSPAWN_ARGUMENTS
Evgeny Vereshchagin [Thu, 5 Jul 2018 16:30:52 +0000 (16:30 +0000)]
tests: allow passing additional arguments to nspawn via NSPAWN_ARGUMENTS