]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agoMerge pull request #11785 from dvdhrm/implicit-sasl
Lennart Poettering [Thu, 14 Mar 2019 14:42:03 +0000 (15:42 +0100)] 
Merge pull request #11785 from dvdhrm/implicit-sasl

sd-bus: allow cross-uid-namespace connections

5 years agoMerge pull request #12000 from poettering/split-more-util
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2019 14:00:04 +0000 (15:00 +0100)] 
Merge pull request #12000 from poettering/split-more-util

split more files in src/basic/

5 years agosd-bus: skip sending formatted UIDs via SASL 11785/head
David Rheinsberg [Thu, 14 Mar 2019 12:34:13 +0000 (13:34 +0100)] 
sd-bus: skip sending formatted UIDs via SASL

The dbus external authentication takes as optional argument the UID the
sender wants to authenticate as. This uid is purely optional. The
AF_UNIX socket already conveys the same information through the
auxiliary socket data, so we really don't have to provide that
information.

Unfortunately, there is no way to send empty arguments, since they are
interpreted as "missing argument", which has a different meaning. The
SASL negotiation thus changes from:

    AUTH EXTERNAL <uid>
    NEGOTIATE_UNIX_FD                   (optional)
    BEGIN

to:

    AUTH EXTERNAL
    DATA
    NEGOTIATE_UNIX_FD                   (optional)
    BEGIN

And thus the replies we expect as a client change from:

    OK <server-id>
    AGREE_UNIX_FD                       (optional)

to:

    DATA
    OK <server-id>
    AGREE_UNIX_FD                       (optional)

Since the old sd-bus server implementation used the wrong reply for
"AUTH" requests that do not carry the arguments inlined, we decided to
make sd-bus clients accept this as well. Hence, sd-bus now allows
"OK <server-id>\r\n" replies instead of "DATA\r\n" replies.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
5 years agosd-bus: fix SASL reply to empty AUTH
David Rheinsberg [Thu, 14 Mar 2019 12:33:28 +0000 (13:33 +0100)] 
sd-bus: fix SASL reply to empty AUTH

The correct way to reply to "AUTH <protocol>" without any payload is to
send "DATA" rather than "OK". The "DATA" reply triggers the client to
respond with the requested payload.

In fact, adding the data as hex-encoded argument like
"AUTH <protocol> <hex-data>" is an optimization that skips the "DATA"
roundtrip. The standard way to perform an authentication is to send the
"DATA" line.

This commit fixes sd-bus to properly send the "DATA" line. Surprisingly
no existing implementation depends on this, as they all pass the data
directly as argument to "AUTH". This will not work if we want to pass
an empty argument, though.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
5 years agosd-bus: avoid magic number in SASL length calculation
David Rheinsberg [Thu, 14 Mar 2019 12:26:50 +0000 (13:26 +0100)] 
sd-bus: avoid magic number in SASL length calculation

Lets avoid magic numbers and use a constant `strlen()` instead.

Signed-off-by: David Rheinsberg <david.rheinsberg@gmail.com>
5 years agomain: use _exit() rather than exit() in code potentially caled from signal handler 12000/head
Lennart Poettering [Thu, 14 Mar 2019 12:14:47 +0000 (13:14 +0100)] 
main: use _exit() rather than exit() in code potentially caled from signal handler

5 years agoutil: split out nulstr related stuff to nulstr-util.[ch]
Lennart Poettering [Thu, 14 Mar 2019 12:14:33 +0000 (13:14 +0100)] 
util: split out nulstr related stuff to nulstr-util.[ch]

5 years agoutil: move some raw memory functions from string-util.h → memory-util.h
Lennart Poettering [Thu, 14 Mar 2019 11:55:37 +0000 (12:55 +0100)] 
util: move some raw memory functions from string-util.h → memory-util.h

5 years agoutil: don't include util.h from def.h
Lennart Poettering [Thu, 14 Mar 2019 11:46:07 +0000 (12:46 +0100)] 
util: don't include util.h from def.h

Nothing it defines is used in it.

5 years agoutil: move dbus specific definition into bus-internal.h
Lennart Poettering [Thu, 14 Mar 2019 11:43:53 +0000 (12:43 +0100)] 
util: move dbus specific definition into bus-internal.h

It shouldn't be defined globally, since it's pretty much an
implementation detail of DBus.

5 years agoutil: split out kbd related stuff
Lennart Poettering [Thu, 14 Mar 2019 11:40:29 +0000 (12:40 +0100)] 
util: split out kbd related stuff

This stuff is neither generic enough to be in def.h, nor really has much
to do with locale, hence give it its own .c/.h file pair.

5 years agoutil: move display_is_local() to pam_systemd.c, its only user
Lennart Poettering [Thu, 14 Mar 2019 11:27:52 +0000 (12:27 +0100)] 
util: move display_is_local() to pam_systemd.c, its only user

It's quite specific anyway, hence let's move this where it's used

5 years agoutil: split out errno related stuff
Lennart Poettering [Thu, 14 Mar 2019 11:24:39 +0000 (12:24 +0100)] 
util: split out errno related stuff

5 years agoutil: split out plymouth related stuff
Lennart Poettering [Thu, 14 Mar 2019 10:35:42 +0000 (11:35 +0100)] 
util: split out plymouth related stuff

5 years agoMerge pull request #11985 from poettering/clean-dir
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2019 11:21:53 +0000 (12:21 +0100)] 
Merge pull request #11985 from poettering/clean-dir

some rafactoring in systemctl/bus-unit-util

5 years agounits: update catalog after systemd-tmpfiles runs
Jonathan Lebon [Tue, 12 Mar 2019 19:23:25 +0000 (15:23 -0400)] 
units: update catalog after systemd-tmpfiles runs

`systemd-journal-catalog-update.service` writes to `/var`. However, it's
not explicitly ordered wrt `systemd-tmpfiles-setup.service`, which means
that it may run before or after.

This is an issue for Fedora CoreOS, which uses Ignition. We want to be
able to prepare `/var` on first boot from the initrd, where the SELinux
policy is not loaded yet. This means that the hierarchy under `/var` is
not correctly labeled. We add a `Z /var - - -` tmpfiles entry so that it
gets relabeled once `/var` gets mounted post-switchroot.

So any service that tries to access `/var` before `systemd-tmpfiles`
relabels it is likely to hit `EACCES`.

Fix this by simply ordering `systemd-journal-catalog-update.service`
after `systemd-tmpfiles-setup.service`. This is also clearer since the
tmpfiles entries are the canonical source of how `/var` should be
populated.

For more context on this, see:
https://github.com/coreos/ignition/issues/635#issuecomment-446620297

5 years agoMerge pull request #11993 from poettering/resolved-stub-edns-size
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2019 10:10:38 +0000 (11:10 +0100)] 
Merge pull request #11993 from poettering/resolved-stub-edns-size

some resolved stub dns reply fixes

5 years agoRe-add uaccess tag for /dev/dri/renderD*
Michael Biebl [Wed, 13 Mar 2019 22:22:26 +0000 (23:22 +0100)] 
Re-add uaccess tag for /dev/dri/renderD*

Setting an access mode != 0666 is explicitly supported via -Dgroup-render-mode
In such a case, re-add the uaccess tag.

This is basically the same change that was done for /dev/kvm in
commit fa53e24130af3a389573acb9585eadbf7192955f and
ace5e3111c0b8d8bfd84b32f2c689b0a4d92c061
and partially reverts the changes from
4e15a7343cb389e97f3eb4f49699161862d8b8b2

5 years agoman: provide an example how to plug systemd-mount into udev
Lennart Poettering [Thu, 14 Mar 2019 09:12:36 +0000 (10:12 +0100)] 
man: provide an example how to plug systemd-mount into udev

Prompted by: #11982

5 years agoMerge pull request #11971 from keszybz/kernel-install-directory
Lennart Poettering [Thu, 14 Mar 2019 09:51:55 +0000 (10:51 +0100)] 
Merge pull request #11971 from keszybz/kernel-install-directory

Make kernel-install create entry directory

5 years agoMerge pull request #11968 from yuwata/network-l2tp
Lennart Poettering [Thu, 14 Mar 2019 09:36:21 +0000 (10:36 +0100)] 
Merge pull request #11968 from yuwata/network-l2tp

network: introduce L2TP tunnel

5 years agohwdb: Fix airplane mode triggering when resuming HP Spectre x360 13
Benjamin Berg [Fri, 8 Mar 2019 16:42:23 +0000 (17:42 +0100)] 
hwdb: Fix airplane mode triggering when resuming HP Spectre x360 13

On these devices the key randomly fires during/after suspend/resume
triggering spurious airplane mode changes. The scancode simply needs to
be ignored.

5 years agoman: mention that DynamicUser= should not be mixed with ReadWriteDirectory= or AF_UNI...
Lennart Poettering [Tue, 12 Mar 2019 14:57:25 +0000 (15:57 +0100)] 
man: mention that DynamicUser= should not be mixed with ReadWriteDirectory= or AF_UNIX dir fd passing

5 years agobootctl: use path_join() to join paths 11971/head
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 08:30:45 +0000 (09:30 +0100)] 
bootctl: use path_join() to join paths

We would say "/boot/efi//loader/entries"...

5 years agoman: be even more explicit that RestartPreventExitStatus= does not affect ExecStartPre=
Lennart Poettering [Wed, 13 Mar 2019 19:28:28 +0000 (20:28 +0100)] 
man: be even more explicit that RestartPreventExitStatus= does not affect ExecStartPre=

The man page was already pretty clear about this, but apparently not
clear enough, let's hence extend this further.

Fixes: #11868
5 years agotest-network: add tests for L2TP 11968/head
Yu Watanabe [Tue, 12 Mar 2019 08:11:24 +0000 (17:11 +0900)] 
test-network: add tests for L2TP

5 years agonetwork: wait for L2TP tunnel to be created before creating sessions
Yu Watanabe [Wed, 13 Mar 2019 07:46:30 +0000 (16:46 +0900)] 
network: wait for L2TP tunnel to be created before creating sessions

And if failed to create L2TP tunnel, then do not try to create sessions.

5 years agonetlink: support NLMSG_ERROR message in genl
Yu Watanabe [Wed, 13 Mar 2019 07:45:06 +0000 (16:45 +0900)] 
netlink: support NLMSG_ERROR message in genl

This resolves the following log message after L2TP tunnel or session is
created:
```
sd-netlink: ignored message with unknown type: 2
```

5 years agonetwork: automatically pick an address on link when L2TP.Local= is not specified
Yu Watanabe [Tue, 12 Mar 2019 02:35:23 +0000 (11:35 +0900)] 
network: automatically pick an address on link when L2TP.Local= is not specified

This makes L2TP.Local= support an empty string, 'auto', 'static', and
'dynamic'. When one of the values are specified, a local address is
automatically picked from the local interface of the tunnel.

5 years agonetworkd: Introduce l2tp tunnel
Susant Sahani [Wed, 6 Mar 2019 19:51:29 +0000 (01:21 +0530)] 
networkd: Introduce l2tp tunnel

This works allows networkd to configure l2tp tunnel.
See http://man7.org/linux/man-pages/man8/ip-l2tp.8.html

5 years agonetwork: introduce new netdev create type NETDEV_CREATE_AFTER_CONFIGURED
Yu Watanabe [Mon, 11 Mar 2019 07:11:47 +0000 (16:11 +0900)] 
network: introduce new netdev create type NETDEV_CREATE_AFTER_CONFIGURED

It will be used to support L2TP tunnel in later commits.

5 years agonetwork: introduce netdev_get_create_type() helper function
Yu Watanabe [Mon, 11 Mar 2019 06:49:09 +0000 (15:49 +0900)] 
network: introduce netdev_get_create_type() helper function

5 years agonetwork: do not call link_joined() when not all netdevs are configured
Yu Watanabe [Mon, 11 Mar 2019 06:35:35 +0000 (15:35 +0900)] 
network: do not call link_joined() when not all netdevs are configured

If some of stacked netdevs are already configured, then link_joined()
is called before netdevs are fully configured.

5 years agoresolved: if we can't append EDNS OPT RR, then indicate truncation to stub client 11993/head
Lennart Poettering [Wed, 13 Mar 2019 18:30:55 +0000 (19:30 +0100)] 
resolved: if we can't append EDNS OPT RR, then indicate truncation to stub client

We do so for any other RR we can't add, do this here too.

Fixes: #11625
5 years agoresolved: don't let EDNS0 OPT dgram size affect TCP
Lennart Poettering [Wed, 13 Mar 2019 18:28:38 +0000 (19:28 +0100)] 
resolved: don't let EDNS0 OPT dgram size affect TCP

Fixes: #11884
5 years agoresolved: don't follow cnames if we already noticed truncation
Lennart Poettering [Wed, 13 Mar 2019 18:26:27 +0000 (19:26 +0100)] 
resolved: don't follow cnames if we already noticed truncation

5 years agovirt: detect WSL environment as a container (id: wsl)
Balint Reczey [Wed, 6 Mar 2019 17:46:04 +0000 (18:46 +0100)] 
virt: detect WSL environment as a container (id: wsl)

5 years agobus-unit-procs: use empty_or_root() where appropriate 11985/head
Lennart Poettering [Wed, 13 Mar 2019 16:44:11 +0000 (17:44 +0100)] 
bus-unit-procs: use empty_or_root() where appropriate

5 years agobus-unit-util: split out code that shows a unit's process tree
Lennart Poettering [Wed, 6 Mar 2019 18:47:06 +0000 (19:47 +0100)] 
bus-unit-util: split out code that shows a unit's process tree

The code is complex enough to deserve its own .c file. Let's split this
out.

5 years agoshared: split out code to wait for jobs to complet into its own source file
Lennart Poettering [Wed, 6 Mar 2019 18:38:45 +0000 (19:38 +0100)] 
shared: split out code to wait for jobs to complet into its own source file

It's complex enough and quite a few functions. Let's hence split this
out.

No code change, just some rearranging of source files.

5 years agosystemctl: drop unnecessary {}
Lennart Poettering [Wed, 6 Mar 2019 18:23:38 +0000 (19:23 +0100)] 
systemctl: drop unnecessary {}

5 years agosystemctl: use strv_consume() where appropriate
Lennart Poettering [Wed, 6 Mar 2019 18:22:33 +0000 (19:22 +0100)] 
systemctl: use strv_consume() where appropriate

5 years agosystemctl: minimize scope of 'p'
Lennart Poettering [Wed, 6 Mar 2019 18:21:48 +0000 (19:21 +0100)] 
systemctl: minimize scope of 'p'

5 years agoexecute: use path_join() where appropriate
Lennart Poettering [Wed, 6 Mar 2019 18:20:08 +0000 (19:20 +0100)] 
execute: use path_join() where appropriate

5 years agobus-unit-util: insist on full initialization
Lennart Poettering [Wed, 6 Mar 2019 18:19:38 +0000 (19:19 +0100)] 
bus-unit-util: insist on full initialization

5 years agobus-unit-util: never call into log_job_error_with_service_result() if we are not...
Lennart Poettering [Wed, 6 Mar 2019 18:18:37 +0000 (19:18 +0100)] 
bus-unit-util: never call into log_job_error_with_service_result() if we are not a service

The call can't handle non-services, hence don't bother.

5 years agobus-unit-util: move explanations array to inner scope
Lennart Poettering [Wed, 6 Mar 2019 18:16:25 +0000 (19:16 +0100)] 
bus-unit-util: move explanations array to inner scope

It's specific to service units, hence let's minimize the scope since it
has no validity outside of the log message generation for service units.

5 years agobus-unit-util: use structure initialization
Lennart Poettering [Wed, 6 Mar 2019 18:16:03 +0000 (19:16 +0100)] 
bus-unit-util: use structure initialization

5 years agobus-unit-util: use free_and_strdup() where we can
Lennart Poettering [Wed, 6 Mar 2019 18:15:22 +0000 (19:15 +0100)] 
bus-unit-util: use free_and_strdup() where we can

5 years agosystemctl: refactor code to watch unit ActiveState a bit
Lennart Poettering [Wed, 6 Mar 2019 17:55:13 +0000 (18:55 +0100)] 
systemctl: refactor code to watch unit ActiveState a bit

let's split out one function, to make this reusable

5 years agotests: add tests for embedded newlines in /proc/cmdline
Lennart Poettering [Tue, 12 Mar 2019 19:41:14 +0000 (20:41 +0100)] 
tests: add tests for embedded newlines in /proc/cmdline

Prompted by: #7097

5 years agobootspec: don't log in boot_entries_load_config_auto() about no ESP
Lennart Poettering [Tue, 12 Mar 2019 19:13:29 +0000 (20:13 +0100)] 
bootspec: don't log in boot_entries_load_config_auto() about no ESP

Let's do it in the caller instead. That way, logind can stay silent
about it.

Fixes: #11950
5 years agotest: avoid double-fsck'ing of the rootfs on Arch
Frantisek Sumsal [Wed, 13 Mar 2019 09:07:44 +0000 (10:07 +0100)] 
test: avoid double-fsck'ing of the rootfs on Arch

Since systemd 206 the combination of systemd and mkinitcpio
causes, under certain conditions, the rootfs to be double fsck'd.

Symptoms:
```
:: performing fsck on '/dev/sda1'
systemd: clean, 3523/125488 files, 141738/501760 blocks
********************** WARNING **********************
*                                                   *
*  The root device is not configured to be mounted  *
*  read-write! It may be fsck'd again later.        *
*                                                   *
*****************************************************
<snip>
[  OK  ] Started File System Check on Root Device
```

This occurs when neither 'ro' or 'rw', or only 'ro' is present
on the kernel command line. The solution is to mount the roofs
as read-write on the kernel command line, so systemd knows to not fsck
it again.

5 years agoman: clarify that sd_journal_seek_head() seeks *before* the first entry
Lennart Poettering [Wed, 13 Mar 2019 11:29:25 +0000 (12:29 +0100)] 
man: clarify that sd_journal_seek_head() seeks *before* the first entry

5 years agoMerge pull request #11986 from poettering/util-split
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2019 16:02:14 +0000 (17:02 +0100)] 
Merge pull request #11986 from poettering/util-split

some splitting up of util.[ch]

5 years agonetworkd: Add bridge port capabilities
Tobias Jungel [Sun, 10 Mar 2019 20:25:24 +0000 (21:25 +0100)] 
networkd: Add bridge port capabilities

This PR adds the configuration switches for multicast flooding, neighbor
suppression and learning of a bridge port.

5 years agologin: mark nomodeset fb devices as master-of-seat
Adam Jackson [Tue, 12 Mar 2019 19:22:13 +0000 (20:22 +0100)] 
login: mark nomodeset fb devices as master-of-seat

When 'nomodeset' is specified, there's no DRM driver to take over from
efifb. This means no device will be marked as a seat master, so gdm will
never find a sufficiently active seat to start on.

I'm not aware of an especially good way to detect this through a proper
kernel API, so check for the word 'nomodeset' on the command line and
allow fbdev devices to be seat masters if found.

For https://bugzilla.redhat.com/show_bug.cgi?id=1683197.

5 years agoutil: split out sorting related calls to new sort-util.[ch] 11986/head
Lennart Poettering [Wed, 13 Mar 2019 11:14:47 +0000 (12:14 +0100)] 
util: split out sorting related calls to new sort-util.[ch]

5 years agoutil: split out memcmp()/memset() related calls into memory-util.[ch]
Lennart Poettering [Wed, 13 Mar 2019 11:02:21 +0000 (12:02 +0100)] 
util: split out memcmp()/memset() related calls into memory-util.[ch]

Just some source rearranging.

5 years agoutil: split out some stuff into a new file limits-util.[ch]
Lennart Poettering [Wed, 13 Mar 2019 10:35:47 +0000 (11:35 +0100)] 
util: split out some stuff into a new file limits-util.[ch]

5 years agoutil: split out namespace related stuff into a new namespace-util.[ch] pair
Lennart Poettering [Wed, 13 Mar 2019 10:21:49 +0000 (11:21 +0100)] 
util: split out namespace related stuff into a new namespace-util.[ch] pair

Just some minor reorganiztion.

5 years agotest: don't overwrite TESTDIR if already set
Frantisek Sumsal [Tue, 12 Mar 2019 21:44:25 +0000 (22:44 +0100)] 
test: don't overwrite TESTDIR if already set

5 years agoMerge pull request #11861 from yuwata/network-verify-2
Lennart Poettering [Wed, 13 Mar 2019 09:15:27 +0000 (10:15 +0100)] 
Merge pull request #11861 from yuwata/network-verify-2

network: config parser updates and wireguard refactoring

5 years agoMerge pull request #11893 from yuwata/wait-online-take-operstate
Lennart Poettering [Wed, 13 Mar 2019 09:10:43 +0000 (10:10 +0100)] 
Merge pull request #11893 from yuwata/wait-online-take-operstate

wait-online: optionally take required minimum operational state

5 years agoMerge pull request #11283 from yuwata/fix-11276
Lennart Poettering [Wed, 13 Mar 2019 08:57:18 +0000 (09:57 +0100)] 
Merge pull request #11283 from yuwata/fix-11276

core/namespace: introduce new mount mode READWRITE_IMPLICIT

5 years agocryptsetup: add same-cpu-crypt and submit-from-crypt-cpus options
Yu Watanabe [Mon, 11 Mar 2019 05:04:06 +0000 (14:04 +0900)] 
cryptsetup: add same-cpu-crypt and submit-from-crypt-cpus options

Closes #11946.

5 years agoMerge pull request #11933 from keszybz/coverity
Lennart Poettering [Wed, 13 Mar 2019 08:36:57 +0000 (09:36 +0100)] 
Merge pull request #11933 from keszybz/coverity

Minor tweaks to boot/efi code inspired by coverity

5 years agowait-online: use log_link_debug() or friends 11893/head
Yu Watanabe [Wed, 6 Mar 2019 15:16:54 +0000 (00:16 +0900)] 
wait-online: use log_link_debug() or friends

5 years agonetwork: move log_link_debug() or friends to log-link.h
Yu Watanabe [Wed, 6 Mar 2019 14:54:57 +0000 (23:54 +0900)] 
network: move log_link_debug() or friends to log-link.h

5 years agoman: update wait-online and RequiredForOnline= setting
Yu Watanabe [Wed, 6 Mar 2019 14:47:29 +0000 (23:47 +0900)] 
man: update wait-online and RequiredForOnline= setting

5 years agowait-online: support $REQUIRED_OPER_STATE_FOR_ONLINE= in state file
Yu Watanabe [Wed, 6 Mar 2019 14:46:33 +0000 (23:46 +0900)] 
wait-online: support $REQUIRED_OPER_STATE_FOR_ONLINE= in state file

This also make wait-online optionally take operstate in -i option,
and adds '--operstate' option to wait-online which also takes operstate.

Also, this contains huge refactoring for wait-online.

5 years agosd-network: add sd_network_link_get_required_operstate_for_online()
Yu Watanabe [Wed, 6 Mar 2019 05:45:17 +0000 (14:45 +0900)] 
sd-network: add sd_network_link_get_required_operstate_for_online()

It reads $REQUIRED_OPER_STATE_FOR_ONLINE in serialized link data.

5 years agonetwork: make RequiredForOnline= also take operational state
Yu Watanabe [Wed, 6 Mar 2019 05:29:49 +0000 (14:29 +0900)] 
network: make RequiredForOnline= also take operational state

This will be used by systemd-networkd-wait-online.

5 years agohashmap: add hashmap_free_free_keyp and friend
Yu Watanabe [Tue, 5 Mar 2019 06:15:40 +0000 (15:15 +0900)] 
hashmap: add hashmap_free_free_keyp and friend

5 years agonetwork: introduce 'degraded-carrier' operstate to order all states
Yu Watanabe [Tue, 5 Mar 2019 05:41:56 +0000 (14:41 +0900)] 
network: introduce 'degraded-carrier' operstate to order all states

Previously, 'degraded' state is ambiguous for bonding or bridge master:
1. one or more slave interfaces does not have carrier,
2. no link local address is assigned to the master,
3. combination of the above two.

This makes the above case 1 and 3 are in the new 'degraded-carrier'
state, and makes 'degraded' state as all slaves are active but no
link local address on master.

5 years agonetwork: move LinkOperationalState and relevant functions to network-util.[ch]
Yu Watanabe [Tue, 5 Mar 2019 05:39:57 +0000 (14:39 +0900)] 
network: move LinkOperationalState and relevant functions to network-util.[ch]

5 years agotest-network: wait more and fix wrong operational state
Yu Watanabe [Wed, 13 Mar 2019 05:26:38 +0000 (14:26 +0900)] 
test-network: wait more and fix wrong operational state

Closes #11977.

5 years agotest-network: add test for WireGuard.PrivateKeyFile= 11861/head
Yu Watanabe [Mon, 4 Mar 2019 05:42:03 +0000 (14:42 +0900)] 
test-network: add test for WireGuard.PrivateKeyFile=

5 years agowireguard: add PrivateKeyFile= option
Yu Watanabe [Mon, 4 Mar 2019 05:19:21 +0000 (14:19 +0900)] 
wireguard: add PrivateKeyFile= option

Closes #11878.

5 years agowireguard: check whether PrivateKey= and PublicKey= are set
Yu Watanabe [Mon, 4 Mar 2019 05:31:36 +0000 (14:31 +0900)] 
wireguard: check whether PrivateKey= and PublicKey= are set

5 years agowireguard: drop unused arguments and rename parse_wireguard_key()
Yu Watanabe [Tue, 5 Mar 2019 03:35:43 +0000 (12:35 +0900)] 
wireguard: drop unused arguments and rename parse_wireguard_key()

5 years agowireguard: do not log wireguard key
Yu Watanabe [Mon, 4 Mar 2019 05:12:03 +0000 (14:12 +0900)] 
wireguard: do not log wireguard key

It may be PrivateKey=.

5 years agowireguard: reuse sd_event_source object
Yu Watanabe [Fri, 1 Mar 2019 06:41:47 +0000 (15:41 +0900)] 
wireguard: reuse sd_event_source object

5 years agowireguard: use NetworkConfigSection to manage [WireGuardPeer] sections
Yu Watanabe [Thu, 28 Feb 2019 08:12:02 +0000 (17:12 +0900)] 
wireguard: use NetworkConfigSection to manage [WireGuardPeer] sections

This also contains huge refactoring of wireguard support.

5 years agotest-network: add tests for invalid Address sections
Yu Watanabe [Fri, 1 Mar 2019 06:21:22 +0000 (15:21 +0900)] 
test-network: add tests for invalid Address sections

5 years agotest: make network_verify() public and use it in test-networkd-conf
Yu Watanabe [Fri, 1 Mar 2019 08:39:45 +0000 (17:39 +0900)] 
test: make network_verify() public and use it in test-networkd-conf

5 years agonetwork: drop sections contain invalid settings in network_verify()
Yu Watanabe [Fri, 1 Mar 2019 04:27:47 +0000 (13:27 +0900)] 
network: drop sections contain invalid settings in network_verify()

If e.g., an [Address] section has an invalid setting, then
previously assigned settings in the section is freed, and
only later settings are stored. That may cause partially broken
section stored in Network object.

This makes if an invalid setting is found, then set 'invalid' flag
instead of freeing it. And invalid sections are dropped later by
network_verify().

5 years agonetwork: make all xxx_new_static() static
Yu Watanabe [Fri, 1 Mar 2019 04:19:53 +0000 (13:19 +0900)] 
network: make all xxx_new_static() static

These functions are called from only config parsers, and the parsers are
in the same files. So, let's make them static.

5 years agonetwork: add IPv4LL route right after .network file is parsed
Yu Watanabe [Tue, 5 Mar 2019 01:51:57 +0000 (10:51 +0900)] 
network: add IPv4LL route right after .network file is parsed

Previously, the route is added when the .network config is assigned
to a Link. So, if multiple links match the .network file, the route
entry becomes duplicated in the corresponding Network object.

5 years agonetwork: move NetworkConfigSection and related functions to networkd-util.[ch]
Yu Watanabe [Thu, 28 Feb 2019 07:30:14 +0000 (16:30 +0900)] 
network: move NetworkConfigSection and related functions to networkd-util.[ch]

5 years agonetwork: use ltype to determine netdev kind in config_parse_stacked_netdev()
Yu Watanabe [Thu, 28 Feb 2019 07:18:57 +0000 (16:18 +0900)] 
network: use ltype to determine netdev kind in config_parse_stacked_netdev()

5 years agotest: add a testcase for ProtectHome=tmpfs vs ProtectSystem=strict 11283/head
Yu Watanabe [Fri, 28 Dec 2018 07:30:21 +0000 (16:30 +0900)] 
test: add a testcase for ProtectHome=tmpfs vs ProtectSystem=strict

5 years agocore/namespace: logs mount mode when the entry is dropped
Yu Watanabe [Sat, 29 Dec 2018 10:59:15 +0000 (19:59 +0900)] 
core/namespace: logs mount mode when the entry is dropped

5 years agocore/namespace: introduce new mount mode READWRITE_IMPLICIT
Yu Watanabe [Fri, 28 Dec 2018 07:11:52 +0000 (16:11 +0900)] 
core/namespace: introduce new mount mode READWRITE_IMPLICIT

ProtectSystem=strict or ProtectKernelTunable=yes create implicit
read-write mounts, but they are not overridable by TemporaryFileSystem=.
This makes such implicit read-write mounts use the new mount mode.
So, they can be override by TemproraryFileSystem= now.
A typical usecase is that ProtectSystem=strict and ProtectHome=tmpfs.

Fixes #11276.

5 years agoMerge pull request #11919 from poettering/login-simplify
Lennart Poettering [Tue, 12 Mar 2019 17:33:14 +0000 (18:33 +0100)] 
Merge pull request #11919 from poettering/login-simplify

various fixes to $HOME and $SHELL validation

5 years agoupdate TODO 11919/head
Lennart Poettering [Tue, 12 Mar 2019 14:53:05 +0000 (15:53 +0100)] 
update TODO

5 years agologin: drop redundant newline
Lennart Poettering [Mon, 11 Mar 2019 17:28:06 +0000 (18:28 +0100)] 
login: drop redundant newline

5 years agouser-util: extra paranoia, make sure $SHELL can't be fucked with in suid programs
Lennart Poettering [Tue, 12 Mar 2019 14:52:06 +0000 (15:52 +0100)] 
user-util: extra paranoia, make sure $SHELL can't be fucked with in suid programs

It's better to be safe than sorry, let's not allow overriding of the
user shell in suid binaries. Similar for $USER.

5 years agoexecute: no need to synthesize $HOME for uid==0 again, get_home_dir() already does...
Lennart Poettering [Thu, 7 Mar 2019 10:00:40 +0000 (11:00 +0100)] 
execute: no need to synthesize $HOME for uid==0 again, get_home_dir() already does that

5 years agoexecute: simplify paths we set as HOME/SHELL for invoked programs
Lennart Poettering [Thu, 7 Mar 2019 10:00:13 +0000 (11:00 +0100)] 
execute: simplify paths we set as HOME/SHELL for invoked programs