Zbigniew Jędrzejewski-Szmek [Mon, 19 Aug 2019 06:51:39 +0000 (08:51 +0200)]
shared/seccomp: add sync_file_range2
Some architectures need the arguments to be reordered because of alignment
issues. Otherwise, it's the same as sync_file_range.
Zbigniew Jędrzejewski-Szmek [Mon, 19 Aug 2019 08:08:23 +0000 (10:08 +0200)]
Merge pull request #13235 from yuwata/network-routing-policy-rule-family-13233
network: add RoutingPolicyRule.Family= setting
Zbigniew Jędrzejewski-Szmek [Mon, 19 Aug 2019 07:59:16 +0000 (09:59 +0200)]
Merge pull request #13345 from yuwata/network-fix-preferred-lifetime-zero-13341
network: fix PreferredLifetime=0
Zbigniew Jędrzejewski-Szmek [Wed, 14 Aug 2019 15:41:31 +0000 (17:41 +0200)]
Revert "shared/conf-parser,networkd: EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE → EXTRACT_UNQUOTE"
This reverts commit
8a07b4033e5d3c86931b3dd2ddbca41118c05c60.
The tests are kept. test-networkd-conf is adjusted to pass.
This fixes #13276. I think current rules are extremely confusing, as the
case in test-networkd-conf shows. We apply some kinds of unescaping (relating
to quoting), but not others (related to escaping of special characters).
But fixing this is hard, because people have adjusted quoting to match
our rules, and if we make the rules "better", things might break in unexpected
places.
Topi Miettinen [Fri, 16 Aug 2019 08:42:04 +0000 (11:42 +0300)]
cgroup-util: update comment to reflect stable kernel fixes
Yu Watanabe [Sun, 18 Aug 2019 15:34:35 +0000 (00:34 +0900)]
Merge pull request #13344 from ddstreet/test-functions
Minor/cosmetic changes to test/test-functions, some test.sh
Dan Streetman [Thu, 15 Aug 2019 20:27:05 +0000 (16:27 -0400)]
test: increase qemu timeout for TEST-18 and TEST-19
These tests runs under qemu, and on some testbeds, without acceleration.
On those systems, the current 180 second overall test timeout is too
short to run the test.
Increasing the timeout to 600s should be enough, even for slow
non-accelerated qemu testbeds.
Yu Watanabe [Sat, 17 Aug 2019 17:15:11 +0000 (02:15 +0900)]
test-network: update test for PreferredLifetime=0
Yu Watanabe [Sun, 18 Aug 2019 15:04:37 +0000 (00:04 +0900)]
network: do not check deprecated flag in address_is_ready()
Without this change, the address with PreferredLifetime=0 cannot be ready,
and thus, no consequent setting up process does not start.
The bug was introduced by 6aa5773.
Follow-up for
b7ed5384ab55cd4d7b8d7d1ec7f5d5e145f0a2b1.
Fixes #13341.
Theo Ouzhinski [Sat, 17 Aug 2019 17:21:50 +0000 (13:21 -0400)]
man: add missing comma
Mr-Foo [Sat, 17 Aug 2019 16:30:57 +0000 (16:30 +0000)]
trivial spelling fixes (#13339)
Dan Streetman [Sat, 17 Aug 2019 16:24:00 +0000 (12:24 -0400)]
test/test-functions: add mkdir to import_initdir
This dir is created by create_empty_image_rootdir, as well as indirectly
by some other functions, but it should be created by import_initdir so
the newly-exported $initdir exists and can be used immediately without
relying on other functions to create it.
Dan Streetman [Thu, 15 Aug 2019 13:39:31 +0000 (09:39 -0400)]
test: replace $TESTDIR/root with $initdir
The $initdir var is already set to $TESTDIR/root, it should be used
instead of direct use of $TESTDIR/root.
Dan Streetman [Sat, 17 Aug 2019 16:20:56 +0000 (12:20 -0400)]
test: TEST-33 and TEST-36 should use create_empty_image_rootdir
This recently added function handles mkdir and mounting of the empty image,
as well as umounting after test_setup.
Dan Streetman [Tue, 13 Aug 2019 11:50:59 +0000 (07:50 -0400)]
test/test-functions: avoid stderr noise, only umount on cleanup if mountpoint
Only umount it during cleanup if the $TESTDIR/root dir is a mountpoint.
This avoids adding noise to the stderr log such as:
mountpoint: /var/tmp/systemd-test.waLOFT/root: No such file or directory
Yu Watanabe [Wed, 31 Jul 2019 03:09:03 +0000 (12:09 +0900)]
test-network: add tests for RoutingPolicyRule.Family=ipv6 and both
Yu Watanabe [Wed, 31 Jul 2019 22:41:36 +0000 (07:41 +0900)]
network: add RoutingPolicyRule.Family= setting
Closes #13233.
Yu Watanabe [Sat, 3 Aug 2019 20:16:43 +0000 (05:16 +0900)]
network: split out copying logic from routing_policy_rule_add_internal()
Yu Watanabe [Sat, 3 Aug 2019 20:09:08 +0000 (05:09 +0900)]
network: rename AddressFamilyBoolean -> AddressFamily
We usually do not call an extended boolean as XxxBoolean.
Yu Watanabe [Thu, 1 Aug 2019 19:22:44 +0000 (04:22 +0900)]
network: add missing entry in serialization/deserialization
Yu Watanabe [Thu, 1 Aug 2019 20:19:26 +0000 (05:19 +0900)]
network: serialize/deserialize address family
Yu Watanabe [Thu, 1 Aug 2019 20:07:40 +0000 (05:07 +0900)]
network: refuse the case To= and From= are in different address family
Zbigniew Jędrzejewski-Szmek [Fri, 16 Aug 2019 08:19:09 +0000 (10:19 +0200)]
Merge pull request #13317 from ddstreet/werror
Fix build warnings, so Ubuntu CI can pass --werror to meson
Yuri Chornoivan [Fri, 16 Aug 2019 07:55:19 +0000 (10:55 +0300)]
po: update Ukrainian translation (#13329)
* Update Ukrainian translation
* po: update Ukrainian translation
Lennart Poettering [Thu, 15 Aug 2019 10:34:31 +0000 (12:34 +0200)]
unit-file: downgrade accidentaly high-prio debug log message
Lennart Poettering [Thu, 15 Aug 2019 17:28:06 +0000 (19:28 +0200)]
networkctl: avoid outputting '(null)' for LLDP ports without description
Dan Streetman [Tue, 13 Aug 2019 00:34:43 +0000 (20:34 -0400)]
src/boot/efi/meson.build: if meson --werror is true, set gcc -Werror
This part of the build does not use the normal meson parameters, so
we need to explicitly check for the meson --werror parameter, and if
it's true, set the gcc -Werror parameter for this subdir's build.
Dan Streetman [Tue, 13 Aug 2019 11:02:33 +0000 (07:02 -0400)]
src/boot/efi/linux: elide __attribute__((regparm(0))) on non-i386
This attribute is x86_32-only, so when building on non-intel archs it
generates a compiler warning. When building with -Werror this turns
into an error, so only include the attribute on i386 arch builds.
Dan Streetman [Tue, 13 Aug 2019 10:45:04 +0000 (06:45 -0400)]
src/boot/efi/shim: elide __attribute__((sysv_abi)) on non-intel archs
This attribute is x86-only, so when building on non-intel archs it
generates a compiler warning. When building with -Werror this turns
into an error, so only include the attribute on intel archs.
Dan Streetman [Thu, 15 Aug 2019 01:08:36 +0000 (21:08 -0400)]
src/basic/missing_syscall: add comment lines for PR 13319 changes
Add a comment line explaining that the syscall defines might be
defined to invalid negative numbers, as libseccomp redefines them
to negative numbers if not defined by the kernel headers, which is
not obvious just from reading the code checking for defined && > 0
Evgeny Vereshchagin [Thu, 15 Aug 2019 07:23:55 +0000 (07:23 +0000)]
README: add an OSS-Fuzz badge
Since bug reports, backtraces, coverage reports and build logs are scattered
across at least four different places and there is no publicly available dashboards
the badge can point to, let's just point it to the build logs, which hopefully are going to be
a little bit more usable once https://github.com/google/oss-fuzz/issues/2690 is
addressed.
Tommi Rantala [Mon, 5 Aug 2019 11:01:58 +0000 (14:01 +0300)]
update-utmp: fix assertion failure if rescue.target, multi-user.target and graphical.target are all inactive
If rescue.target, multi-user.target and graphical.target are all
inactive, get_current_runlevel() is not able to determine current
runlevel, and returns with zero. This zero runlevel value results to
assertion failure in utmp_put_runlevel().
# systemctl stop rescue.target multi-user.target graphical.target
# systemctl start systemd-update-utmp-runlevel.service
systemd[1]: Stopped target Graphical Interface.
systemd[1]: Stopped target Multi-User System.
systemd[1]: Starting Update UTMP about System Runlevel Changes...
systemd-update-utmp[67]: Assertion 'runlevel > 0' failed at src/shared/utmp-wtmp.c:275, function utmp_put_runlevel(). Aborting.
systemd[1]: systemd-update-utmp-runlevel.service: Main process exited, code=dumped, status=6/ABRT
systemd[1]: systemd-update-utmp-runlevel.service: Failed with result 'core-dump'.
systemd[1]: Failed to start Update UTMP about System Runlevel Changes.
Let's just print a warning in this case and skip the utmp update, to
avoid systemd-update-utmp-runlevel.service failures.
Zbigniew Jędrzejewski-Szmek [Wed, 14 Aug 2019 16:21:12 +0000 (18:21 +0200)]
Merge pull request #13273 from RPigott/zshcomp
Enable resolvectl zsh completions
Lennart Poettering [Wed, 7 Aug 2019 10:35:29 +0000 (12:35 +0200)]
sysusers: properly mark generated accounts as locked
Previously, we'd only set the shell to /usr/bin/nologin and lock the
password for system users. Let's go one step further and also lock the
whole account.
This is a paranoid safety precaution, since neither disabling the shell
like this nor disabling the password is sufficient to lock an account,
since remote shell tools generally allow passing different shells, and
logins into ftp or similar protocols don't know the shell concept anyway.
Moreover, in times of ssh authentication by password is just one
option of authentication among many.
Takes inspiration from the recommendations in usermod(8)'s -L switch:
"Note: if you wish to lock the account (not only access with a
password), you should also set the EXPIRE_DATE to 1."
Zbigniew Jędrzejewski-Szmek [Wed, 14 Aug 2019 16:18:55 +0000 (18:18 +0200)]
Merge pull request #13298 from RPigott/busctl
zsh: add busctl completions
EtherGraf [Wed, 14 Aug 2019 16:15:50 +0000 (18:15 +0200)]
hwdb: acceleration mount matrix for a Medion Akoya E3221 (#13310)
Dan Streetman [Thu, 25 Jul 2019 11:57:30 +0000 (07:57 -0400)]
src/basic/missing_syscall: change #ifndef to #if ! (defined && > 0)
The #ifndef check used to work for missing __NR_* syscall defines, but
unfortunately libseccomp now redefines missing syscall number to negative
numbers, in their public header file, e.g.:
https://github.com/seccomp/libseccomp/blob/master/include/seccomp.h.in#L801
When systemd is built, since it includes <seccomp.h>, it pulls in the
incorrect negative value for any __NR_* syscall define that's included in
the seccomp.h header (for those syscalls that the kernel headers don't
yet define, e.g. when built with older/stable-distro kernels). This leads
to bugs like:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1821625
This changes the check so that it can override the negative number that
libseccomp defines, instead of trying to use the negative syscall number.
To avoid gcc warnings (which are failures with meson --werror), this checks
without generating a redefinition gcc warning.
I have no idea why libseccomp decided to define missing syscalls
to negative numbers inside their *public* header file, causing
problems like this.
Zbigniew Jędrzejewski-Szmek [Tue, 6 Aug 2019 19:20:07 +0000 (21:20 +0200)]
shared/unit-file: fix systemctl cat user@.service
I assumed that unit_name_to_instnace() returns NULL if there is no instance.
In fact it returns "", so the check for instance was wrong.
Also avoid unnecessary call to unit_name_is_valid().
Lennart Poettering [Wed, 14 Aug 2019 14:18:06 +0000 (16:18 +0200)]
Merge pull request #13302 from yuwata/network-set-put-fixes
network: fixes related to set_put()
Lennart Poettering [Wed, 14 Aug 2019 14:13:58 +0000 (16:13 +0200)]
Merge pull request #13318 from ddstreet/s390_seccomp
add s390 pkey_mprotect syscall number, and s390 mmap syscall definitions
Mattias Jernberg [Thu, 11 Jul 2019 16:13:46 +0000 (18:13 +0200)]
core: Avoid race when starting dbus services
In high load scenarios it is possible for services to be started
before the NameOwnerChanged signal is properly installed.
Emulate a callback by also queuing a GetNameOwner when the match is
installed.
Fixes: #12956
Daniel Black [Wed, 14 Aug 2019 01:48:26 +0000 (11:48 +1000)]
test: ppc64* qemu is qemu-system-ppc64
Francesco Pennica [Tue, 13 Aug 2019 10:10:56 +0000 (12:10 +0200)]
hwdb: Fix airplane mode spam on HP Spectre x360 Convertible
Added additional rule matching my HP Spectre x360 Convertible from 2015 (skylake)
Ronan Pigott [Wed, 14 Aug 2019 03:27:56 +0000 (20:27 -0700)]
shell-completion: complete --match argument for busctl
Dan Streetman [Thu, 25 Jul 2019 00:48:49 +0000 (20:48 -0400)]
src/shared/seccomp-util.c: Add mmap definitions for s390
Dan Streetman [Wed, 24 Jul 2019 23:58:48 +0000 (19:58 -0400)]
src/basic/missing_syscall: add s390 syscall number for __NR_pkey_mprotect
The syscall number for s390 was added to the kernel at:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
b41c51c8e194c0bdfb4b1778a137aea8246c86cd
Lennart Poettering [Tue, 13 Aug 2019 12:40:30 +0000 (14:40 +0200)]
TODO: add more, and drop implemented stuff
Frantisek Sumsal [Mon, 12 Aug 2019 22:14:54 +0000 (00:14 +0200)]
test: store coredumps in journal
To make debugging much easier, especially for crashes in tests under
QEMU, let's store the entire coredump bundle in the systemd journal,
which is usually kept around by various CIs. Right now, we usually end
up with a journal, but without the coredump itself, which is pretty
useless.
William Wold [Mon, 12 Aug 2019 22:03:55 +0000 (18:03 -0400)]
hwdb: Add axis overrides for HP Envy x360 (#13304)
Frantisek Sumsal [Mon, 12 Aug 2019 19:16:51 +0000 (19:16 +0000)]
Merge pull request #13303 from yuwata/bootctl-segfaults
bootctl: fix segfaults
William A. Kennington III [Fri, 19 Apr 2019 07:53:34 +0000 (00:53 -0700)]
networkd: Keep track of static neighbors
We need to keep track of the static neighbors that are configured on the
interface so that we can delete stale entries that were removed.
Yu Watanabe [Sun, 11 Aug 2019 15:05:28 +0000 (00:05 +0900)]
bootctl: arg_dolloar_boot_path() may return NULL
Yu Watanabe [Sun, 11 Aug 2019 15:04:44 +0000 (00:04 +0900)]
bootctl: clear arg_xbootldr_path when acquire_xbootldr() succeeds
Yu Watanabe [Sun, 11 Aug 2019 00:11:20 +0000 (09:11 +0900)]
network: add missing link_ref()
Yu Watanabe [Sat, 10 Aug 2019 23:56:37 +0000 (08:56 +0900)]
network: fix potential memleaks related to set_put()
frederik [Fri, 9 Aug 2019 10:09:26 +0000 (12:09 +0200)]
man: add example for IPv6 Prefix Delegation
Lennart Poettering [Fri, 9 Aug 2019 14:35:36 +0000 (16:35 +0200)]
firstboot: drop duplicate trailing whitespace from root pw question
Since ask_password() (and related calls) already append one char, we
ended up appending two. That's not pretty. Let's fix this, and do it
like in all other cases ask_password() (or an equivalent function) is
called.
Lennart Poettering [Thu, 8 Aug 2019 11:31:40 +0000 (13:31 +0200)]
docs: fix env var name in random seed markdown documentation
Johannes Christ [Sat, 10 Aug 2019 12:41:52 +0000 (14:41 +0200)]
Fix typo in `analyze-security.c`.
Ronan Pigott [Sat, 10 Aug 2019 08:21:35 +0000 (01:21 -0700)]
zsh: add busctl completions
Evgeny Vereshchagin [Thu, 8 Aug 2019 18:30:44 +0000 (18:30 +0000)]
fuzzit: get MSan to track origins
It's just a follow-up to https://github.com/systemd/systemd/pull/13281
that should make it a little bit easier to make sense of
MSan reports.
https://clang.llvm.org/docs/MemorySanitizer.html#origin-tracking
Evgeny Vereshchagin [Thu, 8 Aug 2019 15:38:21 +0000 (18:38 +0300)]
Merge pull request #13281 from evverx/unleash-msan
fuzzit: an attempt to unleash MSan on all the fuzzers
Evgeny Vereshchagin [Thu, 8 Aug 2019 13:23:53 +0000 (13:23 +0000)]
fuzzit: collapse a series of commands
Now that the ids are gone, we can generate commands simply
using names as we go
Evgeny Vereshchagin [Thu, 8 Aug 2019 11:56:23 +0000 (11:56 +0000)]
fuzzit: switch to a new organization
Matthew Leeds [Wed, 7 Aug 2019 20:10:50 +0000 (13:10 -0700)]
man: Fix grammar in systemd.kill.xml
Evgeny Vereshchagin [Wed, 7 Aug 2019 21:45:19 +0000 (21:45 +0000)]
fuzzit: unleash MSan on all the fuzzers
Lennart Poettering [Mon, 15 Jul 2019 18:29:21 +0000 (20:29 +0200)]
logind: set description for inhibitor event source
William A. Kennington III [Fri, 19 Apr 2019 00:52:28 +0000 (17:52 -0700)]
networkd: Routes should take the gateway into account
Otherwise, changing the default gateway doesn't purge old gateway routes
left on the system during daemon restart. This also fixes removing other
foreign gateway routes that don't match the expected configuration.
Tested:
Changed gateway addresses prior to the patch and they lingered on
the system during each reconfiguration. Applied this patch and
reconfigured gateways and other routes multiple times and it removed
the foreign routes that had gateways that didn't match.
Signed-off-by: William A. Kennington III <william@wkennington.com>
Ronan Pigott [Wed, 7 Aug 2019 05:50:06 +0000 (22:50 -0700)]
shell-completion: add resolvectl commands to zsh completion
Ronan Pigott [Wed, 7 Aug 2019 04:00:36 +0000 (21:00 -0700)]
shell-completion: enable resolvectl zsh completion
Yu Watanabe [Tue, 6 Aug 2019 23:07:57 +0000 (08:07 +0900)]
Merge pull request #13265 from keszybz/timedated-ntp-logging
Timedated logging and service priority
Zbigniew Jędrzejewski-Szmek [Mon, 5 Aug 2019 10:50:11 +0000 (12:50 +0200)]
timedated: always enable&start the service with highest priority
This removes a special case that was implemented before: if some service
was already enabled, we'd treat it as having higher priority.
From https://bugzilla.redhat.com/show_bug.cgi?id=1735584#c4:
> Setting ntp off and on should give the same result as just setting it
> on. There should be no stickiness (hidden state). It should behave like
> running an ansible role.
>
> The other service might have been enabled because no other was installed at
> the time. If I install a new NTP service with a higher priority, setting ntp
> on should enable and start the new service, and disable all other. Also, if
> for some reason multiple services are enabled, after setting ntp on there
> should be only one enabled to avoid systemd selecting between them randomly
> on the next boot.
Ronan Pigott [Tue, 6 Aug 2019 02:07:31 +0000 (19:07 -0700)]
systemctl: Add unit file states to state help message
Ronan Pigott [Mon, 5 Aug 2019 22:41:16 +0000 (15:41 -0700)]
man: fix typo in resolvectl(1) man page
Zbigniew Jędrzejewski-Szmek [Sun, 4 Aug 2019 09:06:59 +0000 (11:06 +0200)]
timedated: log about unit enablement actions and enhance logs in general
The general idea is that for things which can occur repeatedly, like SetNTP
being called with the same argument, we only log at debug level. For things
which change state, like when we realize that a unit that wasn't enabled
before needs to be enabled, we log at info level.
Also, don't return success if there are no units loaded.
Yu Watanabe [Sun, 4 Aug 2019 23:05:54 +0000 (08:05 +0900)]
unit: drop Before=sysinit.target from systemd-random-seed.service
Follow-up for
26ded55709947d936634f1de0f43dcf88f594621.
The commit says,
> Note that with this change sysinit.target (and thus early boot) is NOT
systematically delayed until the entropy pool is initialized,
But the dependency was not dropped.
This was found by David Seifert (@SoapGentoo).
Zbigniew Jędrzejewski-Szmek [Mon, 5 Aug 2019 13:02:13 +0000 (15:02 +0200)]
meson: create (empty) /etc/systemd/system during installation
We explicitly create /etc/systemd/user and other parts of the basic directory
tree. I think we should create /etc/systemd/system too. (The alternative would
be to not create those other directories too, but I think it's nice to have
the basic directory structure in place after installation.)
https://bugzilla.redhat.com/show_bug.cgi?id=1737362
Frantisek Sumsal [Mon, 5 Aug 2019 18:02:40 +0000 (18:02 +0000)]
Merge pull request #12884 from mrc0mmand/numapolicy-test
test: introduce TEST-36-NUMAPOLICY
Zbigniew Jędrzejewski-Szmek [Mon, 5 Aug 2019 14:37:53 +0000 (16:37 +0200)]
shared/exit-status: fix off-by-one in comment
Zbigniew Jędrzejewski-Szmek [Mon, 5 Aug 2019 14:36:45 +0000 (16:36 +0200)]
shared/exit-status: fix lookup
FLAGS_SET() is the wrong operator here, because we want to see if
*any* bits are set. Add test.
https://github.com/systemd/systemd/pull/12884#issuecomment-
518238410
Zbigniew Jędrzejewski-Szmek [Mon, 5 Aug 2019 13:43:23 +0000 (15:43 +0200)]
Merge pull request #13258 from yuwata/login-revert-handle-ignore-assertion
Revert "logind: remove unused check"
Frantisek Sumsal [Mon, 5 Aug 2019 12:38:45 +0000 (14:38 +0200)]
test: add a simple sanity check for systems without NUMA support
Frantisek Sumsal [Mon, 22 Jul 2019 22:56:04 +0000 (00:56 +0200)]
test: give strace some time to initialize
The `coproc` implementation seems to be a little bit different in older
bash versions, so the `strace` is sometimes started AFTER `systemctl
daemon-reload`, which causes unexpected fails. Let's help it a little by
sleeping for a bit.
Frantisek Sumsal [Tue, 2 Jul 2019 07:52:45 +0000 (09:52 +0200)]
test: skip the test on systems without NUMA support
Frantisek Sumsal [Mon, 1 Jul 2019 17:53:45 +0000 (19:53 +0200)]
test: make sure the strace process is indeed dead
It may take a few moments for the strace process to properly terminate
and write all logs to the backing storage
Frantisek Sumsal [Mon, 1 Jul 2019 11:08:26 +0000 (13:08 +0200)]
test: support MPOL_LOCAL matching in unpatched strace versions
The MPOL_LOCAL constant is not recognized in current strace versions.
Let's match at least the numerical value of this constant until the
strace patch is approved & merged.
Frantisek Sumsal [Mon, 1 Jul 2019 07:27:59 +0000 (09:27 +0200)]
test: replace `tail -f` with journal cursor which should be...
more reliable
Frantisek Sumsal [Tue, 25 Jun 2019 21:01:40 +0000 (23:01 +0200)]
test: introduce TEST-36-NUMAPOLICY
Frantisek Sumsal [Tue, 25 Jun 2019 20:45:15 +0000 (22:45 +0200)]
test: allow overriding QEMU_OPTIONS from the outside
Yu Watanabe [Sat, 3 Aug 2019 21:08:06 +0000 (06:08 +0900)]
udev: do not try to import properties on commented out lines
Fixes #13257.
Zbigniew Jędrzejewski-Szmek [Sun, 4 Aug 2019 09:06:33 +0000 (11:06 +0200)]
timedated: minor code simplifications
Yu Watanabe [Sun, 4 Aug 2019 08:07:03 +0000 (17:07 +0900)]
Merge pull request #13256 from keszybz/minor-sd-network-cleanup
Minor sd-network cleanup and other coverity-inspired changes
Yu Watanabe [Sat, 3 Aug 2019 20:43:34 +0000 (05:43 +0900)]
Revert "logind: remove unused check"
This reverts commit
f2330acda408a34451d5e15380fcdd225a672473.
Fixes #13255.
Yu Watanabe [Sat, 3 Aug 2019 20:42:53 +0000 (05:42 +0900)]
login: drop space in empty line
Zbigniew Jędrzejewski-Szmek [Sat, 3 Aug 2019 15:46:56 +0000 (17:46 +0200)]
pid1: replace asprintf() with strjoin()
It's nicer. And coverity doesn't need to complain about unchecked return
value (CID#1401780).
Zbigniew Jędrzejewski-Szmek [Sat, 3 Aug 2019 15:43:51 +0000 (17:43 +0200)]
sd-hwdb: use return value from ordered_hashmap_iterate()
Why not? Coverity CID#1402329.
Zbigniew Jędrzejewski-Szmek [Sat, 3 Aug 2019 14:49:39 +0000 (16:49 +0200)]
libsystemd-network: make option_append() atomic and make the code a bit clearer
Comparisons are done in the normal order (if (need > available), not if (available < need)),
variables have reduced scope and are renamed for clarity.
The only functional change is that if we return -ENAMETOOLONG, we do that
without modifying the options[] array.
I also added an explanatory comment. The use of one offset to point into three
buffers is not obvious.
Coverity (in CID#1402354) says that sname might be accessed at bad offset, but
I cannot see this happening. We check for available space before writing anything.
Yu Watanabe [Fri, 2 Aug 2019 20:05:43 +0000 (05:05 +0900)]
unit: make logind can access ESP
Fixes the following error:
```
logind[601]: Failed to open file system "/dev/block/259:1": Operation not permitted
```
Zbigniew Jędrzejewski-Szmek [Sat, 3 Aug 2019 12:15:52 +0000 (14:15 +0200)]
Merge pull request #13253 from yuwata/udev-update-logs
udev: update log messages
Yu Watanabe [Fri, 2 Aug 2019 21:04:34 +0000 (06:04 +0900)]
udev-node: fix misleading log messages
This fixes the following logs:
```
drm_dp_aux2: Handling device node '/dev/drm_dp_aux2', devnum=c238:2, mode=
037777777777, uid=
4294967295, gid=
4294967295
drm_dp_aux2: Preserve permissions of /dev/drm_dp_aux2,
037777777777, uid=
4294967295, gid=
4294967295
```