]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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 agotests: install "head" in the image
Zbigniew Jędrzejewski-Szmek [Wed, 13 Mar 2019 15:07:43 +0000 (16:07 +0100)] 
tests: install "head" in the image

For #11915.

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 agofuzz: limit the maximum size of test inputs for a few parsers 11975/head
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 16:48:06 +0000 (17:48 +0100)] 
fuzz: limit the maximum size of test inputs for a few parsers

We have a few cases or reported issues which are about a timeout to parse
the input in 25 s. In all cases, the input is a few hundred kb. We don't really
care if the config parsers are super efficent, so let's set a limit on the input
size to avoid triggering such issues. The parsers often contain quadratic
algorithms. This is OK, because the numbers of elements are almost always very
small in real use. Rewriting the code to use more complicated data structures
to speed this up would not only complicate the code, but also pessimize behaviour
for the overwhelmingly common case of small samples. Note that in all those
cases, the input data is trusted. We care about memory correctness, and not
not so much about efficiency.

The size checks are done twice: using options for libfuzzer, and using an
internal check for afl. Those should be changed together. I didn't use a define,
because there is no easy mechanism to share the define between the two files.

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 agonspawn: fix memleak uncovered by fuzzer
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 16:44:01 +0000 (17:44 +0100)] 
nspawn: fix memleak uncovered by fuzzer

This is almost the same as 0e636bf51a. I looked through the code,
and I don't see any more instances of this pattern, so hopefully this
will be the last one.

https://oss-fuzz.com/issue/5660094128193536/13691.

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

5 years agouser-util: simplify paths retrieved from $HOME and $SHELL
Lennart Poettering [Thu, 7 Mar 2019 09:54:11 +0000 (10:54 +0100)] 
user-util: simplify paths retrieved from $HOME and $SHELL

Let's add some extra paranoia, after #11910

5 years agouser-util: be more strict when reading $HOME and $SHELL
Lennart Poettering [Thu, 7 Mar 2019 09:53:23 +0000 (10:53 +0100)] 
user-util: be more strict when reading $HOME and $SHELL

5 years agouser-util: paranoia — add overflow check on ERANGE loop
Lennart Poettering [Thu, 7 Mar 2019 09:52:35 +0000 (10:52 +0100)] 
user-util: paranoia — add overflow check on ERANGE loop

5 years agouser-util: use SYNTHETIC_ERRNO() where we can
Lennart Poettering [Thu, 7 Mar 2019 09:45:14 +0000 (10:45 +0100)] 
user-util: use SYNTHETIC_ERRNO() where we can

5 years agopath-util: minimize variable scope
Lennart Poettering [Thu, 7 Mar 2019 09:44:59 +0000 (10:44 +0100)] 
path-util: minimize variable scope

5 years agopath-util: check validity before normalization in path_simplify_and_warn()
Lennart Poettering [Thu, 7 Mar 2019 09:37:04 +0000 (10:37 +0100)] 
path-util: check validity before normalization in path_simplify_and_warn()

As the normalization check includes a validation check the order
matters.

5 years agouser-util: filter out invalid user record data a bit more thorougly
Lennart Poettering [Thu, 7 Mar 2019 09:32:48 +0000 (10:32 +0100)] 
user-util: filter out invalid user record data a bit more thorougly

5 years agologind: normalize home path when creating user object
Lennart Poettering [Thu, 7 Mar 2019 09:31:26 +0000 (10:31 +0100)] 
logind: normalize home path when creating user object

Triggered by: #11910

5 years agoMerge pull request #11964 from mrc0mmand/even-more-fuzzers
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 14:08:20 +0000 (15:08 +0100)] 
Merge pull request #11964 from mrc0mmand/even-more-fuzzers

fuzz: add fuzzers for calendar & time expressions

5 years agomeson: scope more git invocations with current_source_dir()
Davide Cavalca [Wed, 27 Feb 2019 16:19:07 +0000 (11:19 -0500)] 
meson: scope more git invocations with current_source_dir()

5 years agoMerge pull request #11927 from poettering/network-namespace-path
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 13:29:14 +0000 (14:29 +0100)] 
Merge pull request #11927 from poettering/network-namespace-path

Add NetworkNamespacePath= to unit files

5 years agopo: update French translation
Sylvain Plantefève [Thu, 7 Mar 2019 22:10:46 +0000 (23:10 +0100)] 
po: update French translation

5 years agoshared/bootspec: avoid going through -1 when calculating array index 11933/head
Zbigniew Jędrzejewski-Szmek [Fri, 8 Mar 2019 13:37:26 +0000 (14:37 +0100)] 
shared/bootspec: avoid going through -1 when calculating array index

Coverity was complaining in CID#1399407 that config->entries might be used
while NULL. Let's add an assert to make sure it's not.

Also, let's quit early if we have no entries to loop through. The code was
not incorrect, but it's cleaner to avoid any negative indices.

5 years agoboot: avoid 32-bit calculation for a 64-bit lvalue
Zbigniew Jędrzejewski-Szmek [Fri, 8 Mar 2019 13:16:40 +0000 (14:16 +0100)] 
boot: avoid 32-bit calculation for a 64-bit lvalue

Coverity CID#1399116:
> Potentially overflowing expression
> gpt_header_buffer.gpt_header.SizeOfPartitionEntry * gpt_header_buffer.gpt_header.NumberOfPartitionEntries
> with type unsigned int (32 bits, unsigned) is evaluated using 32-bit
> arithmetic, and then used in a context that expects an expression of type
> UINTN (64 bits, unsigned).

Let's import the ALIGN_TO macro to sd-boot and use it to avoid the issue.

5 years agoMerge pull request #11943 from yuwata/device-action-seqnum-cleanups
Zbigniew Jędrzejewski-Szmek [Tue, 12 Mar 2019 12:17:33 +0000 (13:17 +0100)] 
Merge pull request #11943 from yuwata/device-action-seqnum-cleanups

sd-device: store parsed SEQNUM and ACTION string