]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoMerge pull request #16976 from keszybz/systemctl-service-log-levels
Yu Watanabe [Tue, 15 Sep 2020 00:34:07 +0000 (09:34 +0900)] 
Merge pull request #16976 from keszybz/systemctl-service-log-levels

systemctl: add service-log-{level,target} verbs

3 years agoMerge pull request #17055 from keszybz/two-coverity-fixes
Yu Watanabe [Tue, 15 Sep 2020 00:22:39 +0000 (09:22 +0900)] 
Merge pull request #17055 from keszybz/two-coverity-fixes

Two coverity fixes

3 years agoMerge pull request #17049 from mrc0mmand/code-and-spell-check
Lennart Poettering [Mon, 14 Sep 2020 21:00:02 +0000 (23:00 +0200)] 
Merge pull request #17049 from mrc0mmand/code-and-spell-check

tree-wide: assorted cleanups/fixes

3 years agobasic/copy: vodify unlinkat() call 17055/head
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 20:34:43 +0000 (22:34 +0200)] 
basic/copy: vodify unlinkat() call

Not much we can do at this point.

Coverity CID#1432670.

3 years agotest: use pclose() for popen()
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 20:32:52 +0000 (22:32 +0200)] 
test: use pclose() for popen()

Coverity CID#1432701.

3 years agosystemctl: give a nice hint about org.freedesktop.LogControl1 when applicable 16976/head
Zbigniew Jędrzejewski-Szmek [Fri, 11 Sep 2020 14:00:22 +0000 (16:00 +0200)] 
systemctl: give a nice hint about org.freedesktop.LogControl1 when applicable

3 years agoMerge pull request #17031 from poettering/path-start-limit
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 19:51:39 +0000 (21:51 +0200)] 
Merge pull request #17031 from poettering/path-start-limit

core: propagate start limit hit from triggered unit to path unit

3 years agoMerge pull request #17039 from poettering/dbus-default-dep
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 19:45:53 +0000 (21:45 +0200)] 
Merge pull request #17039 from poettering/dbus-default-dep

tweak when we synthesize dbus deps for service units

3 years agoman: rework UMask= explanation
Lennart Poettering [Mon, 14 Sep 2020 09:03:59 +0000 (11:03 +0200)] 
man: rework UMask= explanation

Mention the JSON user record stuff. Mention pam_umask explicitly.
Mention that UMask= of the per-user user@.service instance can be used
too.

Fixes: #16963
3 years agotree-wide: don't needlessly negate error number passed to bus_error_message()
Lennart Poettering [Mon, 14 Sep 2020 16:16:54 +0000 (18:16 +0200)] 
tree-wide: don't needlessly negate error number passed to bus_error_message()

Like it's customary in our codebase bus_error_message() internally takes
abs() of the passed error anyway, hence no need to explicitly negate it.
We mostly got this right, but in too many cases we didn't. Fix that.

3 years agobootctl: handle if LoaderSystemToken is invalid for some reason
Lennart Poettering [Mon, 14 Sep 2020 10:35:19 +0000 (12:35 +0200)] 
bootctl: handle if LoaderSystemToken is invalid for some reason

This points to some firmware issue, but we should still be able to
correct things if this happens. Hence log about this and fix it.

Fixes: #17041
3 years agoMerge pull request #17027 from poettering/env-escape-fix
Lennart Poettering [Mon, 14 Sep 2020 14:48:00 +0000 (16:48 +0200)] 
Merge pull request #17027 from poettering/env-escape-fix

make sure we our env file writer, parser and shell agree on things

3 years agoshared: drop a redundant if statement 17049/head
Frantisek Sumsal [Mon, 14 Sep 2020 14:18:18 +0000 (16:18 +0200)] 
shared: drop a redundant if statement

3 years agolibsystemd: drop a redundant if statement
Frantisek Sumsal [Mon, 14 Sep 2020 14:18:02 +0000 (16:18 +0200)] 
libsystemd: drop a redundant if statement

3 years agohome: return SYNTHETIC_ERRNO() when appropriate
Frantisek Sumsal [Mon, 14 Sep 2020 14:16:59 +0000 (16:16 +0200)] 
home: return SYNTHETIC_ERRNO() when appropriate

3 years agobasic: drop a redundant if statement
Frantisek Sumsal [Mon, 14 Sep 2020 14:16:18 +0000 (16:16 +0200)] 
basic: drop a redundant if statement

3 years agocore: consolidate alloc & put operations into one statement
Frantisek Sumsal [Mon, 14 Sep 2020 14:13:44 +0000 (16:13 +0200)] 
core: consolidate alloc & put operations into one statement

3 years agotree-wide: fix typos found by codespell
Frantisek Sumsal [Mon, 14 Sep 2020 13:32:37 +0000 (15:32 +0200)] 
tree-wide: fix typos found by codespell

Reported by Fossies.org

3 years agounit-def: drop pointless 0 initialization of first enum value 17031/head
Lennart Poettering [Mon, 14 Sep 2020 10:59:38 +0000 (12:59 +0200)] 
unit-def: drop pointless 0 initialization of first enum value

This is implied in C and we generally don't bother with this, so don't
bother with this here either.

3 years agocore: propagate unit start limit hit state to triggering path unit
Lennart Poettering [Fri, 11 Sep 2020 17:57:09 +0000 (19:57 +0200)] 
core: propagate unit start limit hit state to triggering path unit

We already do this for socket and automount units, do it for path units
too: if the triggered service keeps hitting the start limit, then fail
the triggering unit too, so that we don#t busy loop forever.

(Note that this leaves only timer units out in the cold for this kind of
protection, but it shouldn't matter there, as they are naturally
protected against busy loops: they are scheduled by time anyway).

Fixes: #16669
3 years agocore: propagate triggered unit in more load states
Lennart Poettering [Fri, 11 Sep 2020 17:49:33 +0000 (19:49 +0200)] 
core: propagate triggered unit in more load states

In 4c2ef3276735ad9f7fccf33f5bdcbe7d8751e7ec we enabled propagating
triggered unit state to the triggering unit for service units in more
load states, so that we don't accidentally stop tracking state
correctly.

Do the same for our other triggering unit states: automounts, paths, and
timers.

Also, make this an assertion rather than a simple test. After all it
should never happen that we get called for half-loaded units or units of
the wrong type. The load routines should already have made this
impossible.

3 years agotest-fileio: test test strings with shell, too 17027/head
Lennart Poettering [Fri, 11 Sep 2020 15:43:05 +0000 (17:43 +0200)] 
test-fileio: test test strings with shell, too

3 years agotest-env-file: add test that tests our env file read + writer + shell against each...
Lennart Poettering [Fri, 11 Sep 2020 13:18:07 +0000 (15:18 +0200)] 
test-env-file: add test that tests our env file read + writer + shell against each other

Should hopefully make regressions on this unlikely.

3 years agoenv-file: bring our decoding of double-quoted strings in env files in line with shell
Lennart Poettering [Fri, 11 Sep 2020 13:14:03 +0000 (15:14 +0200)] 
env-file: bring our decoding of double-quoted strings in env files in line with shell

In shell, inside of double quotes only a select few chars should be
escaped. If other chars are escaped this has no effect. Correct the list
of chars that need such escaping.

Also, make sure we can read back the stuff we wrote out without loss.

Fixes: #16788
3 years agotest-fileio: use test strings that are actually valid in shell
Lennart Poettering [Fri, 11 Sep 2020 15:42:46 +0000 (17:42 +0200)] 
test-fileio: use test strings that are actually valid in shell

3 years agoservice: add implicit dbus deps only for Type=dbus units 17039/head
Lennart Poettering [Sat, 12 Sep 2020 13:53:24 +0000 (15:53 +0200)] 
service: add implicit dbus deps only for Type=dbus units

We want to be able to use BusName= in services that run during early boot
already, and thus don't synthesize deps on dbus there. Instead add them
when Type=dbus is set, because in that case we actually really need
D-Bus support.

Fixes: #17037
3 years agocore: don't warn if BusName= is used for non-Type=dbus services
Lennart Poettering [Sat, 12 Sep 2020 13:52:02 +0000 (15:52 +0200)] 
core: don't warn if BusName= is used for non-Type=dbus services

It's useful for more than just Type=dbus now, given #16976. Hence, let's
drop the warning.

3 years agoman: document that RemainAfterElapse=no means that also the triggered unit needs...
Lennart Poettering [Thu, 10 Sep 2020 17:08:45 +0000 (19:08 +0200)] 
man: document that RemainAfterElapse=no means that also the triggered unit needs to deactivate

Fixes: #16378
3 years agosystemctl: immediately reject invalid log levels
Zbigniew Jędrzejewski-Szmek [Fri, 11 Sep 2020 13:42:23 +0000 (15:42 +0200)] 
systemctl: immediately reject invalid log levels

Symbolic names and number in the appropriate range are allowed
(log_level_from_string() DTRT already).

The target names are more messy, so we leave the verification to the service.

3 years agosystemctl: merge log_target(), log_level(), service_log_setting()
Zbigniew Jędrzejewski-Szmek [Fri, 11 Sep 2020 12:47:44 +0000 (14:47 +0200)] 
systemctl: merge log_target(), log_level(), service_log_setting()

3 years agosystemctl: add service-log-{level,target} verbs
Zbigniew Jędrzejewski-Szmek [Mon, 7 Sep 2020 19:25:24 +0000 (21:25 +0200)] 
systemctl: add service-log-{level,target} verbs

Heavily inspired by #15622. This adds:
  systemctl service-log-level systemd-resolved
  systemctl service-log-level systemd-resolved info
  systemctl service-log-target systemd-resolved
  systemctl service-log-target systemd-resolved console

We already have systemctl verbs log-level, log-target, and service-watchdogs.
Those two new verbs tie nicely into this scheme.

3 years agoMerge pull request #17009 from poettering/rootprefix-noslash
Zbigniew Jędrzejewski-Szmek [Sat, 12 Sep 2020 08:07:40 +0000 (10:07 +0200)] 
Merge pull request #17009 from poettering/rootprefix-noslash

remove duplicate slashes in systemd-path output if rootprefixdir is "/"

3 years agohashmap: make sure to initialize shared hash key atomically
Lennart Poettering [Fri, 11 Sep 2020 22:09:07 +0000 (00:09 +0200)] 
hashmap: make sure to initialize shared hash key atomically

if we allocate a bunch of hash tables all at the same time, with none
earlier than the other, there's a good chance we'll initialize the
shared hash key multiple times, so that some threads will see a
different shared hash key than others.

Let's fix that, and make sure really everyone sees the same hash key.

Fixes: #17007
3 years agosocket: downgrade log warnings about inability to set socket buffer sizes
Lennart Poettering [Fri, 11 Sep 2020 17:58:54 +0000 (19:58 +0200)] 
socket: downgrade log warnings about inability to set socket buffer sizes

In containers we might lack the privs to up the socket buffers. Let's
not complain so loudly about that. Let's hence downgrade this to debug
logging if it's a permission problem.

(This wasn't an issue before b92f350789e33942be0cf85af22a580c1fd483d6
because back then the failures wouldn't be detected at all.)

3 years agotest-acl-util: skip test if /tmp doesn't do ACLs
Lennart Poettering [Fri, 11 Sep 2020 20:25:25 +0000 (22:25 +0200)] 
test-acl-util: skip test if /tmp doesn't do ACLs

Fixes: #17013
3 years agomkosi: include libfido2 in fedora mkosi image
Lennart Poettering [Fri, 11 Sep 2020 17:48:53 +0000 (19:48 +0200)] 
mkosi: include libfido2 in fedora mkosi image

We want to build this image with as many deps turned on as we can make
happen, hence include libfido2 in the image.

3 years agoMerge pull request #17028 from poettering/logind-replace-job
Lennart Poettering [Fri, 11 Sep 2020 20:17:41 +0000 (22:17 +0200)] 
Merge pull request #17028 from poettering/logind-replace-job

logind: make TerminateSession() count

3 years agonetwork: do not add prefix to RA if radv is not configured
Yu Watanabe [Fri, 11 Sep 2020 09:39:16 +0000 (18:39 +0900)] 
network: do not add prefix to RA if radv is not configured

Fixes #17017.

3 years agocryptsetup: generate the unit to umount keydev filesystem
Michal Sekletár [Wed, 9 Sep 2020 12:00:42 +0000 (14:00 +0200)] 
cryptsetup: generate the unit to umount keydev filesystem

Previously we would call umount from ExecStartPost= of
systemd-cryptsetup instance in order to get rid of the keydev
mount (i.e. filesystem containing keyfile). Let's generate unit to
handle umount. Making this symmetrical (both mount and umount of keydev
are handled by units) fixes the problem with lingering keydev mounts.

Motivation for the change is the issue where keydev mount would stay
around even if device was successfully unlocked and mount is no longer
needed. That could happen previously because when generator options are
not prefixed with "rd." we run generators twice (e.g. rd.luks.key=...).

In such case disk is unlocked in initramfs phase of boot (assuming the
initrd image contains the generator and is able to handle unlocking of
LUKS devices). After switchroot we however enqueue start job for
systemd-cryptsetup instance (because units are regenerated second time)
and that pulls in its dependencies into transaction. Later the main
systemd-cryptsetup unit not actually started since it is already active
and has RemainaAfterExit=yes. Nevertheless, dependencies get activated
and keydev mount is attached again. Because previously we called umount
from ExecStartPost= of systemd-cryptsetup instance the umount is not
called second time and keydev filesystem stays lingering.

3 years agologind: make sure when we are explicitly asked to terminate session/user/seat to... 17028/head
Lennart Poettering [Fri, 11 Sep 2020 16:06:59 +0000 (18:06 +0200)] 
logind: make sure when we are explicitly asked to terminate session/user/seat to use "replace" job mode

Otherwise our request will possibly fail if something else is already
enqeued, but given this is an explicit user request, let's not allow
things to fail.

Fixes: #16702
3 years agologind: clarify what the second argument of session_stop() means when calling it
Lennart Poettering [Fri, 11 Sep 2020 15:59:39 +0000 (17:59 +0200)] 
logind: clarify what the second argument of session_stop() means when calling it

3 years agologind: minor simplification
Lennart Poettering [Fri, 11 Sep 2020 16:02:07 +0000 (18:02 +0200)] 
logind: minor simplification

3 years agoman: document the random delay of persistent timers
Nazar Vinnichuk [Fri, 11 Sep 2020 10:38:53 +0000 (13:38 +0300)] 
man: document the random delay of persistent timers

The manual states that a persistent timer triggers it's service
immediately on activation to catch up with missed invocations, but since
PR #11608 it is no longer the case if RandomizedDelaySec= is set to a
non-zero value.

3 years agotest-network: add test for ENOBUFS issue #17012
Yu Watanabe [Fri, 11 Sep 2020 04:57:07 +0000 (13:57 +0900)] 
test-network: add test for ENOBUFS issue #17012

The issue seems already fixed by PR #16982 and its follow-up commit
4934ba2121d76229659939e19ab7d70a89446629.

3 years agounit: declare BusName= in all our units that are on the bus, event if they don't...
Lennart Poettering [Fri, 11 Sep 2020 08:56:06 +0000 (10:56 +0200)] 
unit: declare BusName= in all our units that are on the bus, event if they don't use Type=dbus

This information is always useful, so let's always declare it,
particular in the light of #16976.

3 years agoMerge pull request #17020 from yuwata/backlight
Lennart Poettering [Fri, 11 Sep 2020 12:23:47 +0000 (14:23 +0200)] 
Merge pull request #17020 from yuwata/backlight

backlight: validate sysattr value

3 years agohostnamed: add various debugging log messages when we determine chassis type
Lennart Poettering [Fri, 11 Sep 2020 08:10:15 +0000 (10:10 +0200)] 
hostnamed: add various debugging log messages when we determine chassis type

No actual code flow changes, just a bunch of debug messages.

3 years agoMerge pull request #17005 from poettering/sockopt-ipv4-ipv6
Lennart Poettering [Fri, 11 Sep 2020 11:13:41 +0000 (13:13 +0200)] 
Merge pull request #17005 from poettering/sockopt-ipv4-ipv6

rework how we call per-ipv4/per-ipv6 sockopts that conceptually exist on both

3 years agopkg-config: prefix is not really configurable, don't pretend it was 17009/head
Lennart Poettering [Thu, 10 Sep 2020 16:27:18 +0000 (18:27 +0200)] 
pkg-config: prefix is not really configurable, don't pretend it was

We generally don't support prefix being != /usr, and this is hardcoded
all over the place. In the systemd.pc file it wasn't so far. Let's
adjust this to match the rest of the codebase.

3 years agosd-path: use ROOTPREFIX without suffixed slash
Lennart Poettering [Thu, 10 Sep 2020 16:20:05 +0000 (18:20 +0200)] 
sd-path: use ROOTPREFIX without suffixed slash

We already have rootprefix_noslash as meson variable, export it so that
we can also use it in C code.

Fixes: #16773
3 years agobacklight: validate read sysattr value 17020/head
Yu Watanabe [Fri, 11 Sep 2020 08:46:08 +0000 (17:46 +0900)] 
backlight: validate read sysattr value

If actual_brightness is larger than max_brightness, then fall back to
use brightness attribute.

Also, if the saved value is invalid, then this makes remove the file in
/var/lib/systemd/backlight.

Hopefully fixes #17011.

3 years agobacklight: do not claim that ID_BACKLIGHT_CLAMP= property is not set
Yu Watanabe [Fri, 11 Sep 2020 08:44:20 +0000 (17:44 +0900)] 
backlight: do not claim that ID_BACKLIGHT_CLAMP= property is not set

3 years agosd-device: introduce sd_device_set_sysattr_valuef()
Yu Watanabe [Fri, 11 Sep 2020 08:41:10 +0000 (17:41 +0900)] 
sd-device: introduce sd_device_set_sysattr_valuef()

3 years agoman: always document both the ipv4 and the ipv6 sockopt 17005/head
Lennart Poettering [Thu, 10 Sep 2020 14:35:31 +0000 (16:35 +0200)] 
man: always document both the ipv4 and the ipv6 sockopt

3 years agotree-wide: add helper for IPv4/IPv6 sockopts
Lennart Poettering [Thu, 10 Sep 2020 14:31:31 +0000 (16:31 +0200)] 
tree-wide: add helper for IPv4/IPv6 sockopts

A variety of sockopts exist both for IPv4 and IPv6 but require a
different pair of sockopt level/option number. Let's add helpers for
these that internally determine the right sockopt to call.

This should shorten code that generically wants to support both ipv4 +
ipv6 and for the first time adds correct support for some cases where we
only called the ipv4 versions, and not the ipv6 options.

3 years agotimesyncd: don't attempt to call IP_TOS sockopt on IPv6 sockets
Lennart Poettering [Thu, 10 Sep 2020 14:36:35 +0000 (16:36 +0200)] 
timesyncd: don't attempt to call IP_TOS sockopt on IPv6 sockets

3 years agohostnamed: map 'all-in-one' DMI chassis type to desktop
lichangze [Tue, 8 Sep 2020 08:26:23 +0000 (16:26 +0800)] 
hostnamed: map 'all-in-one' DMI chassis type to desktop

3 years agoMerge pull request #16933 from poettering/copy-hardlinks
Zbigniew Jędrzejewski-Szmek [Thu, 10 Sep 2020 17:04:52 +0000 (19:04 +0200)] 
Merge pull request #16933 from poettering/copy-hardlinks

copy: optionally recreate hardlinks when copying file trees

3 years agoMerge pull request #16947 from keszybz/socket-parsing-rework
Lennart Poettering [Thu, 10 Sep 2020 14:47:37 +0000 (16:47 +0200)] 
Merge pull request #16947 from keszybz/socket-parsing-rework

Socket parsing rework

3 years agoMerge pull request #17003 from yuwata/conf-parser-downgrade-log-level
Zbigniew Jędrzejewski-Szmek [Thu, 10 Sep 2020 13:43:29 +0000 (15:43 +0200)] 
Merge pull request #17003 from yuwata/conf-parser-downgrade-log-level

tree-wide: downgrade log level in conf-parsers

3 years agoMerge pull request #16986 from yuwata/network-fix-routing-policy-rule-issue-16784
Lennart Poettering [Thu, 10 Sep 2020 12:50:38 +0000 (14:50 +0200)] 
Merge pull request #16986 from yuwata/network-fix-routing-policy-rule-issue-16784

network: fix routing policy rule issue

3 years agofs-util,tmpfiles: fix error handling of fchmod_opath()
Lennart Poettering [Wed, 9 Sep 2020 18:35:33 +0000 (20:35 +0200)] 
fs-util,tmpfiles: fix error handling of fchmod_opath()

When 4dfaa528d45 was first commited its callers relied on `errno` instead of the
return value for error reporting. Which worked fine, since internally
under all conditions base were set — even if ugly and not inline with
our coding style. Things then got broken in
f8606626ed3c2582e06543550d58fe9886cdca5f where suddenly additional
syscalls might end up being done in the function, thus corrupting `errno`.

3 years agosystemd-user: move pam snippet default location to /usr/lib/pam.d
Lennart Poettering [Wed, 9 Sep 2020 16:55:35 +0000 (18:55 +0200)] 
systemd-user: move pam snippet default location to /usr/lib/pam.d

3 years agobootctl: don't accidentally propagate errors in "bootctl status"
Lennart Poettering [Wed, 9 Sep 2020 21:04:17 +0000 (23:04 +0200)] 
bootctl: don't accidentally propagate errors in "bootctl status"

Fixes: #16989
3 years agotest-network: update tests for issue #16784 16986/head
Yu Watanabe [Tue, 8 Sep 2020 20:09:58 +0000 (05:09 +0900)] 
test-network: update tests for issue #16784

3 years agonetwork: replace FRA_IFNAME -> FRA_IIFNAME
Yu Watanabe [Tue, 8 Sep 2020 20:05:08 +0000 (05:05 +0900)] 
network: replace FRA_IFNAME -> FRA_IIFNAME

No functional change, as FRA_IFNAME is an alias of FRA_IIFNAME.

3 years agonetwork: also process RTM_NEWRULE or RTM_DELRULE message which does not contain src...
Yu Watanabe [Tue, 8 Sep 2020 19:59:39 +0000 (04:59 +0900)] 
network: also process RTM_NEWRULE or RTM_DELRULE message which does not contain src and dst addresses

Fixes #16784.

3 years agonetwork: fix the default mask for FirewallMark=
Yu Watanabe [Tue, 8 Sep 2020 19:45:54 +0000 (04:45 +0900)] 
network: fix the default mask for FirewallMark=

And always send FRA_FWMASK if FirewallMark= is set.

C.f. https://github.com/torvalds/linux/commit/b8964ed9fa727109c9084abc807652ebfb681c18

Partially fixes #16784.

3 years agonetwork: do not assign return value if the parse_fwmark_fwmask() fails
Yu Watanabe [Tue, 8 Sep 2020 19:26:49 +0000 (04:26 +0900)] 
network: do not assign return value if the parse_fwmark_fwmask() fails

This also removes redundant logs, and makes input string not copied if
it does not contain '/'.

3 years agonetwork: add debug log for removing routing policy rules
Yu Watanabe [Tue, 8 Sep 2020 18:50:08 +0000 (03:50 +0900)] 
network: add debug log for removing routing policy rules

3 years agonetwork: also logs priority of routing policy rules
Yu Watanabe [Tue, 8 Sep 2020 18:49:14 +0000 (03:49 +0900)] 
network: also logs priority of routing policy rules

3 years agonetwork: update log message for rtnl messages
Yu Watanabe [Tue, 8 Sep 2020 18:12:38 +0000 (03:12 +0900)] 
network: update log message for rtnl messages

3 years agocore: downgrade error level and ignore several non-critical errors 17003/head
Yu Watanabe [Thu, 10 Sep 2020 07:24:31 +0000 (16:24 +0900)] 
core: downgrade error level and ignore several non-critical errors

3 years agohomed: downgrade log level
Yu Watanabe [Thu, 10 Sep 2020 06:21:43 +0000 (15:21 +0900)] 
homed: downgrade log level

3 years agojournal: downgrade log level
Yu Watanabe [Thu, 10 Sep 2020 06:20:35 +0000 (15:20 +0900)] 
journal: downgrade log level

3 years agologin: downgrade log level if the error will be ignored
Yu Watanabe [Thu, 10 Sep 2020 06:18:26 +0000 (15:18 +0900)] 
login: downgrade log level if the error will be ignored

3 years agonspawn: downgrade log level if the error will be ignored
Yu Watanabe [Thu, 10 Sep 2020 06:16:14 +0000 (15:16 +0900)] 
nspawn: downgrade log level if the error will be ignored

3 years agorepart: downgrade log level
Yu Watanabe [Thu, 10 Sep 2020 06:08:13 +0000 (15:08 +0900)] 
repart: downgrade log level

3 years agoresolve: downgrade error level when the error will be ignored
Yu Watanabe [Thu, 10 Sep 2020 06:06:29 +0000 (15:06 +0900)] 
resolve: downgrade error level when the error will be ignored

3 years agoresolve: check DNSSD service name template before assigning it
Yu Watanabe [Thu, 10 Sep 2020 06:05:19 +0000 (15:05 +0900)] 
resolve: check DNSSD service name template before assigning it

3 years agoconf-parser: logs about OOM error
Yu Watanabe [Thu, 10 Sep 2020 05:14:19 +0000 (14:14 +0900)] 
conf-parser: logs about OOM error

3 years agoconf-parser: use SYNTHETIC_ERRNO() at one more place
Yu Watanabe [Thu, 10 Sep 2020 05:13:56 +0000 (14:13 +0900)] 
conf-parser: use SYNTHETIC_ERRNO() at one more place

3 years agotimesync: downgrade error level when the error will be ignored
Yu Watanabe [Thu, 10 Sep 2020 05:13:26 +0000 (14:13 +0900)] 
timesync: downgrade error level when the error will be ignored

3 years agoxdg-autostart-generator: downgrade error level when the error will be ignored
Yu Watanabe [Thu, 10 Sep 2020 05:07:56 +0000 (14:07 +0900)] 
xdg-autostart-generator: downgrade error level when the error will be ignored

3 years agovlan: downgrade error level if the error will be ignored
Yu Watanabe [Thu, 10 Sep 2020 04:52:27 +0000 (13:52 +0900)] 
vlan: downgrade error level if the error will be ignored

3 years agoethtool: downgrade log level when the error will be ignored
Yu Watanabe [Thu, 10 Sep 2020 04:50:10 +0000 (13:50 +0900)] 
ethtool: downgrade log level when the error will be ignored

3 years agonetwork: slightly update log message
Yu Watanabe [Thu, 10 Sep 2020 04:43:47 +0000 (13:43 +0900)] 
network: slightly update log message

3 years agonetwork do not ignore OOM error in config_parse_macsec_key_id()
Yu Watanabe [Thu, 10 Sep 2020 04:40:50 +0000 (13:40 +0900)] 
network do not ignore OOM error in config_parse_macsec_key_id()

3 years agonetwork: use _cleanup_ attribute at one more place
Yu Watanabe [Thu, 10 Sep 2020 04:39:01 +0000 (13:39 +0900)] 
network: use _cleanup_ attribute at one more place

3 years agonetwork: do not ignore OOM error in wireguard_decode_key_and_warn()
Yu Watanabe [Thu, 10 Sep 2020 04:38:31 +0000 (13:38 +0900)] 
network: do not ignore OOM error in wireguard_decode_key_and_warn()

3 years agonetwork: unify config_parse_wireguard_public_key() and config_parse_wireguard_preshar...
Yu Watanabe [Thu, 10 Sep 2020 04:37:02 +0000 (13:37 +0900)] 
network: unify config_parse_wireguard_public_key() and config_parse_wireguard_preshared_key()

3 years agoudev: fix indentation
Yu Watanabe [Thu, 10 Sep 2020 04:11:17 +0000 (13:11 +0900)] 
udev: fix indentation

Follow-up for 90e30d767a32dc93c9ee94ad8b8d665eecf79e96.

3 years agoMerge pull request #17000 from poettering/network-fixlets
Zbigniew Jędrzejewski-Szmek [Wed, 9 Sep 2020 22:51:16 +0000 (00:51 +0200)] 
Merge pull request #17000 from poettering/network-fixlets

network: a bunch of unimportant cleanups across the board

3 years agoMinor simplification in sockaddr_un_set_path() 16947/head
Zbigniew Jędrzejewski-Szmek [Wed, 9 Sep 2020 21:57:59 +0000 (23:57 +0200)] 
Minor simplification in sockaddr_un_set_path()

3 years agoUse sockaddr_un_set_path() in socket_address_parse()
Zbigniew Jędrzejewski-Szmek [Wed, 9 Sep 2020 21:49:51 +0000 (23:49 +0200)] 
Use sockaddr_un_set_path() in socket_address_parse()

Two functional changes:
- "/" is now refused. The test is adjusted.
- The trailing NUL is *not* included in the returned size for abstract size. The
  comments in sockaddr_un_set_path() indicate that this is the right thing to do,
  and the code in socket_address_parse() wasn't doing that.

3 years agoshared/socket-netlink: set output in socket_address_parse_netlink() only on success
Zbigniew Jędrzejewski-Szmek [Sat, 5 Sep 2020 19:25:11 +0000 (21:25 +0200)] 
shared/socket-netlink: set output in socket_address_parse_netlink() only on success

3 years agoAllow interface scopes to be specified in ListenStream=
Zbigniew Jędrzejewski-Szmek [Thu, 3 Sep 2020 13:33:25 +0000 (15:33 +0200)] 
Allow interface scopes to be specified in ListenStream=

Closes #12624.

The formatting in systemd.socket.xml is updated a bit.

Currently in_addr_port_ifindex_name_to_string() always prints the ifindex
numerically. This is not super useful since the interface numbers are
semi-random. Should we use interface names in preference?

3 years agoresolved: drop duplicated check
Zbigniew Jędrzejewski-Szmek [Sat, 5 Sep 2020 19:14:36 +0000 (21:14 +0200)] 
resolved: drop duplicated check

The same conditional appears a few lines down.

3 years agoshared: don't unconditionally set SOCK_STREAM as type in socket_address_parse()
Zbigniew Jędrzejewski-Szmek [Thu, 3 Sep 2020 21:51:21 +0000 (23:51 +0200)] 
shared: don't unconditionally set SOCK_STREAM as type in socket_address_parse()

We would set .type to a fake value. All real callers (outside of tests)
immediately overwrite .type with a proper value after calling
socket_address_parse(). So let's not set it and adjust the few places
that relied on it being set to the fake value.

socket_address_parse() is modernized to only set the output argument on
success.

3 years agoshared: make socket_address_parse use the generic parser for IPv[46] addresses
Zbigniew Jędrzejewski-Szmek [Thu, 3 Sep 2020 11:01:13 +0000 (13:01 +0200)] 
shared: make socket_address_parse use the generic parser for IPv[46] addresses

One special syntax is not supported anymore: "iface:port" would be parsed as an
interface name plus numerical port, equivalent to "[::]%iface:port". This was
added in 542563babda, but was undocumented, and we had no tests for it. It seems
that this actually wasn't doing anything useful, because the kernel only uses the
scope identifier for link-local addresses.