]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agonetwork: replace NDISC -> NDisc in log messages 16505/head
Yu Watanabe [Fri, 17 Jul 2020 20:46:53 +0000 (05:46 +0900)] 
network: replace NDISC -> NDisc in log messages

3 years agonetwork: introduce address_exists() helper function
Yu Watanabe [Fri, 17 Jul 2020 20:42:59 +0000 (05:42 +0900)] 
network: introduce address_exists() helper function

3 years agonetwork: update debug log when foreign routes are received with ManageForeignRoutes=no
Yu Watanabe [Fri, 17 Jul 2020 20:17:31 +0000 (05:17 +0900)] 
network: update debug log when foreign routes are received with ManageForeignRoutes=no

3 years agonetwork: do not enumerate routes if ManageForeignRoutes=no
Yu Watanabe [Fri, 17 Jul 2020 20:12:33 +0000 (05:12 +0900)] 
network: do not enumerate routes if ManageForeignRoutes=no

3 years agoMerge pull request #16490 from yuwata/network-radv-ndisc-cleanups
Yu Watanabe [Fri, 17 Jul 2020 06:12:53 +0000 (15:12 +0900)] 
Merge pull request #16490 from yuwata/network-radv-ndisc-cleanups

network: cleanups for radv and ndisc

3 years agoMerge pull request #16491 from keszybz/udev-logging
Zbigniew Jędrzejewski-Szmek [Fri, 17 Jul 2020 05:12:58 +0000 (07:12 +0200)] 
Merge pull request #16491 from keszybz/udev-logging

Improvements to udev logging and related code

3 years agotree-wide: use SYNTHETIC_ERRNO with log_device_* in more places 16491/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 16:04:45 +0000 (18:04 +0200)] 
tree-wide: use SYNTHETIC_ERRNO with log_device_* in more places

3 years agosd-device: use LOG_PRI() in log_device_full()
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 14:23:57 +0000 (16:23 +0200)] 
sd-device: use LOG_PRI() in log_device_full()

We use LOG_PRI() in all log_*() functions, so let's do that here too for
consistency. Effectively this doesn't change anything since we only use
LOG_{INFO,DEBUG,...} as the argument.

3 years agoanalyze: CAP_RAWIO -> CAP_SYS_RAWIO
Anita Zhang [Thu, 16 Jul 2020 18:36:28 +0000 (11:36 -0700)] 
analyze: CAP_RAWIO -> CAP_SYS_RAWIO

Fixes #16489

3 years agoudev: don't complain when udev_watch_end() is called without udev_watch_init()
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 14:12:42 +0000 (16:12 +0200)] 
udev: don't complain when udev_watch_end() is called without udev_watch_init()

E.g. udevadm test prints "Invalid inotify descriptor." which is
meaningless without any context. I think it should be OK to call udev_watch_end()
from a cleanup path without any warning (even at debug level).

3 years agobasic/string-table: reduce variable scope
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 13:57:36 +0000 (15:57 +0200)] 
basic/string-table: reduce variable scope

3 years agoudevadm: use STR_IN_SET(), add comment
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 13:55:10 +0000 (15:55 +0200)] 
udevadm: use STR_IN_SET(), add comment

3 years agosd-device: use strjoin instead of asprintf
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 13:20:57 +0000 (15:20 +0200)] 
sd-device: use strjoin instead of asprintf

strjoin should be faster for string concatenation.
Also drop "_"-prefix from function prototypes.

3 years agoudev: tweak debug logs for udev rules
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 13:04:21 +0000 (15:04 +0200)] 
udev: tweak debug logs for udev rules

We shouldn't say "ignoring" when running a program because the result is used for
the match/nomatch result of the rule.

3 years agoman: add more details for IMPORT, PROGRAM and RUN keys
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 12:56:16 +0000 (14:56 +0200)] 
man: add more details for IMPORT, PROGRAM and RUN keys

967de8faceaa83c11a1215515cb135d7a8c0c32c added a note that I found very hard
to understand. Reword it, and also describe how IMPORT and PROGRAM are different
from RUN.

Minor markup adjustements too.

3 years agoudev: accept OPTIONS+= without any fuss
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 14:04:35 +0000 (16:04 +0200)] 
udev: accept OPTIONS+= without any fuss

There is no reason to consider this wrong. In fact one could argue that +=
is more appropriate, because we always add to options, and not replace previous
assignments. If we output a debug message, we implicitly ask people to "fix" this,
and we shouldn't.

Also, all our rules use += right now.

3 years agoudev: accept IMPORT{}= without any fuss
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 11:56:57 +0000 (13:56 +0200)] 
udev: accept IMPORT{}= without any fuss

Udev logs are full of messages about wrong operator type:
...
Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:54 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:57 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:60 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:63 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:66 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:67 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:93 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:107 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:110 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:113 IMPORT key takes '==' or '!=' operator, assuming '=='.
Reading rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
/usr/lib/udev/rules.d/60-persistent-v4l.rules:7 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-v4l.rules:9 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-v4l.rules:16 IMPORT key takes '==' or '!=' operator, assuming '=='.
...

The warning was downgraded in f0beb6f816035e438d684cc52ae76fc4a44fc197, but I
think it should be removed altogether. IMPORT{program}="asdf" seems like an
obvious way to write this, and people don't expect to have to write "==".
So let's just allow any operator.

3 years agonetwork: ndisc: any failures in processing event make the link in failed state 16490/head
Yu Watanabe [Thu, 16 Jul 2020 16:13:17 +0000 (01:13 +0900)] 
network: ndisc: any failures in processing event make the link in failed state

Also adjust log levels.

3 years agonetwork: radv: clean up conf parsers
Yu Watanabe [Thu, 16 Jul 2020 10:12:40 +0000 (19:12 +0900)] 
network: radv: clean up conf parsers

3 years agonetwork: downgrade log level in conf parsers
Yu Watanabe [Thu, 16 Jul 2020 05:48:08 +0000 (14:48 +0900)] 
network: downgrade log level in conf parsers

3 years agoMerge pull request #16485 from bluca/nspawn_os_release_mounts
Lennart Poettering [Thu, 16 Jul 2020 13:09:35 +0000 (15:09 +0200)] 
Merge pull request #16485 from bluca/nspawn_os_release_mounts

Follow-up for comments on #15891

3 years agoMerge pull request #16482 from poettering/coverity-246
Yu Watanabe [Thu, 16 Jul 2020 11:23:23 +0000 (20:23 +0900)] 
Merge pull request #16482 from poettering/coverity-246

two coverity fixes

3 years agonspawn: mount os-release in two steps to make it read-only 16485/head
Luca Boccassi [Thu, 16 Jul 2020 08:47:16 +0000 (09:47 +0100)] 
nspawn: mount os-release in two steps to make it read-only

The kernel interface requires setting up read-only bind-mounts in
two steps, the bind first and then a read-only remount.
Fix nspawn-mount, and cover this case in the integration test.

Fixes #16484

3 years agonspawn: use access/F_OK instead of stat to check for file existence
Luca Boccassi [Thu, 16 Jul 2020 08:46:16 +0000 (09:46 +0100)] 
nspawn: use access/F_OK instead of stat to check for file existence

3 years agoshared/os-util: fix comment style to follow guidelines
Luca Boccassi [Thu, 16 Jul 2020 08:45:44 +0000 (09:45 +0100)] 
shared/os-util: fix comment style to follow guidelines

3 years agobasic/mkdir: use uid_is_valid instead of manual check
Luca Boccassi [Thu, 16 Jul 2020 08:45:22 +0000 (09:45 +0100)] 
basic/mkdir: use uid_is_valid instead of manual check

3 years agoMerge pull request #16483 from poettering/man-env-d-no-session
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 08:06:35 +0000 (10:06 +0200)] 
Merge pull request #16483 from poettering/man-env-d-no-session

man: three minor fixes to environment.d/ man page

3 years agoMerge pull request #16480 from yuwata/network-fix-dhcp4-races
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jul 2020 08:04:05 +0000 (10:04 +0200)] 
Merge pull request #16480 from yuwata/network-fix-dhcp4-races

network: fix two minor races in DHCP4 handling

3 years agoman: configuration files contain assignments, no directories 16483/head
Lennart Poettering [Thu, 16 Jul 2020 07:26:55 +0000 (09:26 +0200)] 
man: configuration files contain assignments, no directories

3 years agoman: GNOME is usually capitalized
Lennart Poettering [Thu, 16 Jul 2020 07:26:38 +0000 (09:26 +0200)] 
man: GNOME is usually capitalized

3 years agoman: don't claim environment.d/ was about sessions
Lennart Poettering [Thu, 16 Jul 2020 07:25:22 +0000 (09:25 +0200)] 
man: don't claim environment.d/ was about sessions

This only sets the environment for user *services*, it has no effect on
sessions, as those get an env block set up by whatever program sets them
up and not systemd.

3 years agoRevert "selinux: cache enforced status and treat retrieve failure as enforced mode"
Lennart Poettering [Tue, 14 Jul 2020 13:18:10 +0000 (15:18 +0200)] 
Revert "selinux: cache enforced status and treat retrieve failure as enforced mode"

This reverts commit 257188f80ce1a083e3a88b679b898a73fecab53b.

3 years agomachine: fix if check 16482/head
Lennart Poettering [Thu, 16 Jul 2020 06:32:23 +0000 (08:32 +0200)] 
machine: fix if check

Fixes: coverity 1430462
3 years agoexecute: fix if check
Lennart Poettering [Thu, 16 Jul 2020 06:32:15 +0000 (08:32 +0200)] 
execute: fix if check

Fixes: coverity 1430459
3 years agodhcp4: only renewing lease when the client already has a lease
Yu Watanabe [Wed, 15 Jul 2020 10:25:55 +0000 (19:25 +0900)] 
dhcp4: only renewing lease when the client already has a lease

Follow-up for ceaec54a3c8366e81863a7d0d9c1f1d9f09960e1.

Hopefully fixes #16299.

3 years agoload-fragment: downgrade log messages we ignore to LOG_WARNING
Lennart Poettering [Wed, 15 Jul 2020 15:44:03 +0000 (17:44 +0200)] 
load-fragment: downgrade log messages we ignore to LOG_WARNING

We typically don't log above LOG_WARNING about issues we then go on to
ignore. Do so here, too

3 years agomountpoint-util: fix error handling
Lennart Poettering [Wed, 15 Jul 2020 15:43:10 +0000 (17:43 +0200)] 
mountpoint-util: fix error handling

3 years agonetwork: dhcp4: add two warnings 16480/head
Yu Watanabe [Thu, 16 Jul 2020 01:43:49 +0000 (10:43 +0900)] 
network: dhcp4: add two warnings

3 years agonetwork: dhcp4: fix another race with SendDecline=yes
Yu Watanabe [Thu, 16 Jul 2020 01:31:49 +0000 (10:31 +0900)] 
network: dhcp4: fix another race with SendDecline=yes

If the SD_IPV4ACD_EVENT_BIND event happens before all routes are
assigned, then the link stuck in configuring state.

3 years agonetwork: dhcp4: also release old lease in dhcp_lease_lost()
Yu Watanabe [Thu, 16 Jul 2020 01:12:18 +0000 (10:12 +0900)] 
network: dhcp4: also release old lease in dhcp_lease_lost()

The lease lost may happen during renewing address. If it happens,
assertion hits in dhcp4_release_old_lease().

3 years agocore: fix invalid assertion
Lennart Poettering [Wed, 15 Jul 2020 16:49:08 +0000 (18:49 +0200)] 
core: fix invalid assertion

We miscounted here, and would hit an assert once too early.

3 years agonetwork: fix typo
Christian Göttsche [Wed, 15 Jul 2020 15:09:11 +0000 (17:09 +0200)] 
network: fix typo

3 years agoupdate TODO
Lennart Poettering [Wed, 15 Jul 2020 15:41:34 +0000 (17:41 +0200)] 
update TODO

3 years agoMerge pull request #16396 from yuwata/network-configured-flag
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jul 2020 13:45:38 +0000 (15:45 +0200)] 
Merge pull request #16396 from yuwata/network-configured-flag

network: about xxx_configured flags

3 years agoMerge pull request #16468 from keszybz/two-unrelated-patches
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jul 2020 11:40:22 +0000 (13:40 +0200)] 
Merge pull request #16468 from keszybz/two-unrelated-patches

Two unrelated patches

3 years agonetwork: drop doubled white space 16396/head
Yu Watanabe [Tue, 14 Jul 2020 18:40:26 +0000 (03:40 +0900)] 
network: drop doubled white space

3 years agonetwork: free address when it is removed
Yu Watanabe [Tue, 14 Jul 2020 17:00:06 +0000 (02:00 +0900)] 
network: free address when it is removed

3 years agonetwork: dhcp4: do not assign new address before old one is not removed
Yu Watanabe [Tue, 14 Jul 2020 16:30:09 +0000 (01:30 +0900)] 
network: dhcp4: do not assign new address before old one is not removed

If DHCP4 client lost a lease, and then soon acquire new lease, then
the removal of the old address may not be completed. If that happens,
and the new and old addresses are the same, then the new address will be
considered as a foreign address. Such a situation can occur when the
DHCP4 server is restarted.

This makes networkd wait for the removal of the old address when a new
lease is acquired.

This also makes the link in configuring state when renewing address.

3 years agonetwork: do not call link_check_ready() in link_request_set_routing_policy_rule()
Yu Watanabe [Tue, 14 Jul 2020 03:48:02 +0000 (12:48 +0900)] 
network: do not call link_check_ready() in link_request_set_routing_policy_rule()

It will be called in link_request_set_nexthop() or serveral handlers().

3 years agonetwork: make link_request_set_nexthop() called from link_request_set_routes() or...
Yu Watanabe [Sun, 12 Jul 2020 18:12:11 +0000 (03:12 +0900)] 
network: make link_request_set_nexthop() called from link_request_set_routes() or route_handler()

Then we can drop static_routes_ready() flag.

3 years agonetwork: do not make link in configured state when no address is assigned
Yu Watanabe [Sun, 12 Jul 2020 05:57:45 +0000 (14:57 +0900)] 
network: do not make link in configured state when no address is assigned

When DHCP6 and RA are enabled, and RA does not provide any addresses,
then link may become configured state even if no address is assigned,
due to the time-lag between RA completion and DHCP reply.
This makes if DHCP is explicitly enabled, then link must have at least
one valid address to be in the configured state.

3 years agonetwork: ndisc: split ndisc_configured flag into for addresses and routes
Yu Watanabe [Sun, 12 Jul 2020 04:55:44 +0000 (13:55 +0900)] 
network: ndisc: split ndisc_configured flag into for addresses and routes

3 years agonetwork: ndisc: do not ignore remaining addresses
Yu Watanabe [Sun, 12 Jul 2020 04:26:53 +0000 (13:26 +0900)] 
network: ndisc: do not ignore remaining addresses

Follow-up for c24c83dc67a63c88b0a537f4fa7f605b1fcbac39.

3 years agotest-network: wait for addresses are not in tentative state
Yu Watanabe [Sun, 12 Jul 2020 00:28:53 +0000 (09:28 +0900)] 
test-network: wait for addresses are not in tentative state

3 years agonetwork: add debugging log why link is not in configured state yet
Yu Watanabe [Sat, 11 Jul 2020 23:23:19 +0000 (08:23 +0900)] 
network: add debugging log why link is not in configured state yet

3 years agotest-network: check assigned address is not tentative state
Yu Watanabe [Sat, 11 Jul 2020 21:26:34 +0000 (06:26 +0900)] 
test-network: check assigned address is not tentative state

3 years agotest-network: set IPv6AcceptRA=no if no dynamic addresses are not required
Yu Watanabe [Wed, 8 Jul 2020 06:56:47 +0000 (15:56 +0900)] 
test-network: set IPv6AcceptRA=no if no dynamic addresses are not required

3 years agonetwork: make link_request_set_nexthop() static
Yu Watanabe [Fri, 10 Jul 2020 15:36:38 +0000 (00:36 +0900)] 
network: make link_request_set_nexthop() static

3 years agonetwork: add a debugging log
Yu Watanabe [Sat, 11 Jul 2020 20:08:57 +0000 (05:08 +0900)] 
network: add a debugging log

3 years agonetwork: include error code in the log message
Yu Watanabe [Sat, 11 Jul 2020 20:13:43 +0000 (05:13 +0900)] 
network: include error code in the log message

3 years agonetwork: set dhcp6_xxx_configured flag after routes/addresses are assigned
Yu Watanabe [Wed, 8 Jul 2020 02:19:13 +0000 (11:19 +0900)] 
network: set dhcp6_xxx_configured flag after routes/addresses are assigned

3 years agologs: when embedding catalog info in log output use a dash of color and unicode
Lennart Poettering [Tue, 14 Jul 2020 09:25:18 +0000 (11:25 +0200)] 
logs: when embedding catalog info in log output use a dash of color and unicode

let's separate things out a bit, to make it easier to discern log output
and catalog data.

catalog data is now colored green (which is a color we don't use for log
data currently), and prefixed with a block shade.

3 years agoMerge pull request #16398 from poettering/machined-varlink
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jul 2020 07:24:49 +0000 (09:24 +0200)] 
Merge pull request #16398 from poettering/machined-varlink

machined: move UID/GID resolution logic to userdb, i.e. from nss-mymachines to nss-systemd

3 years agotimer: Adjust calendar timers based on monotonic timer instead of realtime
Filipe Brandenburger [Fri, 10 Jul 2020 21:24:00 +0000 (14:24 -0700)] 
timer: Adjust calendar timers based on monotonic timer instead of realtime

When the RTC time at boot is off in the future by a few days, OnCalendar=
timers will be scheduled based on the time at boot. But if the time has been
adjusted since boot, the timers will end up scheduled way in the future, which
may cause them not to fire as shortly or often as expected.

Update the logic so that the time will be adjusted based on monotonic time.
We do that by calculating the adjusted manager startup realtime from the
monotonic time stored at that time, by comparing that time with the realtime
and monotonic time of the current time.

Added a test case to validate this works as expected. The test case creates a
QEMU virtual machine with the clock 3 days in the future. Then we adjust the
clock back 3 days, and test creating a timer with an OnCalendar= for every 15
minutes. We also check the manager startup timestamp from both `systemd-analyze
dump` and from D-Bus.

Test output without the corresponding code changes that fix the issue:

  Timer elapse outside of the expected 20 minute window.
    next_elapsed=1594686119
    now=1594426921
    time_delta=259198

With the code changes in, the test passes as expected.

3 years agoRevert "ci: turn off the "upstream-systemd-ci" ppa"
Evgeny Vereshchagin [Tue, 14 Jul 2020 21:47:43 +0000 (00:47 +0300)] 
Revert "ci: turn off the "upstream-systemd-ci" ppa"

This reverts commit d4ff79bbe1f33fb17e7add3bd520c08f405a79b1.

3 years agotest: Add "finish" rule to .PHONY
Filipe Brandenburger [Tue, 14 Jul 2020 21:05:17 +0000 (14:05 -0700)] 
test: Add "finish" rule to .PHONY

3 years agoMerge pull request #16462 from keszybz/rpm-macro-warnings
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jul 2020 06:56:28 +0000 (08:56 +0200)] 
Merge pull request #16462 from keszybz/rpm-macro-warnings

Emit better errors for rpm macro misuse

3 years agotest-fs-util: use log_info instead of printf 16468/head
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jul 2020 20:18:38 +0000 (22:18 +0200)] 
test-fs-util: use log_info instead of printf

The test is failing in koji, and the line from printf() does not end up
in the logs for some reason. log_info() works fine, so let's just use
that here too.

3 years agoci: turn off the "upstream-systemd-ci" ppa
Evgeny Vereshchagin [Tue, 14 Jul 2020 04:03:32 +0000 (04:03 +0000)] 
ci: turn off the "upstream-systemd-ci" ppa

Judging by https://launchpad.net/~upstream-systemd-ci/+archive/ubuntu/systemd-ci/+packages,
it got updated about 15 hours ago and the "build check" action has been
failing with
```
The following packages have unmet dependencies:
 kbd : Depends: console-setup but it is not going to be installed or
E: Unable to correct problems, you have held broken packages.
                console-setup-mini but it is not going to be installed
```
since then

3 years agoMerge pull request #16340 from keszybz/var-tmp-readonly
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jul 2020 17:59:48 +0000 (19:59 +0200)] 
Merge pull request #16340 from keszybz/var-tmp-readonly

Create ro private /var/tmp dir when /var/tmp is read-only

3 years agopid1: create ro private tmp dirs when /tmp or /var/tmp is read-only 16340/head
Zbigniew Jędrzejewski-Szmek [Sun, 28 Jun 2020 17:54:49 +0000 (19:54 +0200)] 
pid1: create ro private tmp dirs when /tmp or /var/tmp is read-only

Read-only /var/tmp is more likely, because it's backed by a real device. /tmp
is (by default) backed by tmpfs, but it doesn't have to be. In both cases the
same consideration applies.

If we boot with read-only /var/tmp, any unit with PrivateTmp=yes would fail
because we cannot create the subdir under /var/tmp to mount the private directory.
But many services actually don't require /var/tmp (either because they only use
it occasionally, or because they only use /tmp, or even because they don't use the
temporary directories at all, and PrivateTmp=yes is used to isolate them from
the rest of the system).

To handle both cases let's create a read-only directory under /run/systemd and
mount it as the private /tmp or /var/tmp. (Read-only to not fool the service into
dumping too much data in /run.)

$ sudo systemd-run -t -p PrivateTmp=yes bash
Running as unit: run-u14.service
Press ^] three times within 1s to disconnect TTY.
[root@workstation /]# ls -l /tmp/
total 0
[root@workstation /]# ls -l /var/tmp/
total 0
[root@workstation /]# touch /tmp/f
[root@workstation /]# touch /var/tmp/f
touch: cannot touch '/var/tmp/f': Read-only file system

This commit has more changes than I like to put in one commit, but it's touching all
the same paths so it's hard to split.
exec_runtime_make() was using the wrong cleanup function, so the directory would be
left behind on error.

3 years agoman: document F1 in sd-boot too
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jul 2020 17:31:21 +0000 (19:31 +0200)] 
man: document F1 in sd-boot too

As suggested in https://github.com/systemd/systemd/issues/15125#issuecomment-658114524.

3 years agorpm: include macro name in errors for two args macros too 16462/head
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jul 2020 14:30:46 +0000 (16:30 +0200)] 
rpm: include macro name in errors for two args macros too

3 years agorpm: adjust various macros to print macro name in the error message
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jul 2020 14:25:32 +0000 (16:25 +0200)] 
rpm: adjust various macros to print macro name in the error message

Based on initial patch by Jan Engelhardt <jengelh@inai.de>.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1856122.

3 years agoMerge pull request #16430 from mikhailnov/fix-rpm-create-package-macros
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jul 2020 17:02:09 +0000 (19:02 +0200)] 
Merge pull request #16430 from mikhailnov/fix-rpm-create-package-macros

Fix RPM *_create_package macros

3 years agoupdate TODO 16398/head
Lennart Poettering [Tue, 7 Jul 2020 10:00:41 +0000 (12:00 +0200)] 
update TODO

3 years agonss-mymachines: drop support for UID/GID resolving
Lennart Poettering [Tue, 7 Jul 2020 19:58:12 +0000 (21:58 +0200)] 
nss-mymachines: drop support for UID/GID resolving

Now that we make the user/group name resolving available via userdb and
thus nss-systemd, we do not need the UID/GID resolving support in
nss-mymachines anymore. Let's drop it hence.

We keep the module around, since besides UID/GID resolving it also does
hostname resolving, which we care about. (One of those days we should
replace that by some Varlink logic between
nss-resolve/systemd-resolved.service too)

The hooks are kept in the NSS module, but they do not resolve anything
anymore, in order to keep compat at a maximum.

3 years agoman: document new varlink service
Lennart Poettering [Tue, 7 Jul 2020 19:29:21 +0000 (21:29 +0200)] 
man: document new varlink service

3 years agomachined: implement user/group lookup varlink API in machined too
Lennart Poettering [Tue, 7 Jul 2020 09:59:10 +0000 (11:59 +0200)] 
machined: implement user/group lookup varlink API in machined too

Let's natively support our own API in machined too.

This allows us to remove half of nss-mymachines in a later commit.

3 years agomachined: refactor UID/GID machine translation
Lennart Poettering [Tue, 7 Jul 2020 09:58:06 +0000 (11:58 +0200)] 
machined: refactor UID/GID machine translation

Let's move the heavy lifting out of the bus call implemntations, and
into generic code.

This allows us to expose them easily via Varlink too in a later commit.

3 years agoprocess-util: make sure procfs_file_alloca() works for non-literal field names too
Lennart Poettering [Tue, 14 Jul 2020 14:59:22 +0000 (16:59 +0200)] 
process-util: make sure procfs_file_alloca() works for non-literal field names too

3 years agodocs: permit user/group services that do not support enumeration
Lennart Poettering [Tue, 7 Jul 2020 09:55:21 +0000 (11:55 +0200)] 
docs: permit user/group services that do not support enumeration

sssd people don't like enumeration and for some other cases it's not
nice to support either, in particular when synthesizing records for
container/userns UID/GID ranges.

Hence, let's make enumeration optional.

3 years agoupdate TODO
Lennart Poettering [Tue, 14 Jul 2020 13:06:29 +0000 (15:06 +0200)] 
update TODO

3 years agoanalyze: make testing ConditionPathExistsGlob= work
Lennart Poettering [Tue, 14 Jul 2020 10:21:47 +0000 (12:21 +0200)] 
analyze: make testing ConditionPathExistsGlob= work

Fixes: #16439
Alternative-To: #16440
3 years agoupdate TODO
Lennart Poettering [Fri, 10 Jul 2020 07:53:26 +0000 (09:53 +0200)] 
update TODO

3 years agoudevadm: beef up deprecation log warning
Lennart Poettering [Wed, 8 Jul 2020 15:51:55 +0000 (17:51 +0200)] 
udevadm: beef up deprecation log warning

Let's add a catalog entry explaining further details.

Most importantly though: talk to PID 1 directly, via the private D-Bus
socket, so that this actually works correctly during early boot, where
D-Bus is not around.

3 years agomeson: do not install testdata when -Dinstall-tests=false
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jul 2020 09:35:29 +0000 (11:35 +0200)] 
meson: do not install testdata when -Dinstall-tests=false

Fixes #16447.

3 years agoUpdate .clang-format
szb512 [Mon, 13 Jul 2020 15:58:09 +0000 (11:58 -0400)] 
Update .clang-format

3 years agoMake the instructions slightly easier to read
szb512 [Thu, 9 Jul 2020 13:23:32 +0000 (09:23 -0400)] 
Make the instructions slightly easier to read

3 years agoMerge pull request #16437 from systemd/coverity-gcc-10
Evgeny Vereshchagin [Sun, 12 Jul 2020 22:42:39 +0000 (01:42 +0300)] 
Merge pull request #16437 from systemd/coverity-gcc-10

coverity: switch back to Fedora 31

3 years agocoverity: install systemd 16437/head
Evgeny Vereshchagin [Sun, 12 Jul 2020 22:17:50 +0000 (22:17 +0000)] 
coverity: install systemd

Apparently systemd is no longer installed in fedora containers
by default

```
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348:
starting container process caused "exec: \"/sbin/init\": stat /sbin/init: no such file or directory": unknown.
The command "$CI_MANAGERS/fedora.sh SETUP" failed and exited with 127 during .
```

3 years agocoverity: switch back to Fedora 31
Evgeny Vereshchagin [Sun, 12 Jul 2020 22:00:16 +0000 (22:00 +0000)] 
coverity: switch back to Fedora 31

Apparently 6 days ago fedora:latest started to point to fedora:32,
which comes with gcc-10. Coverity doesn't support it yet.

3 years agorepart: include more relevant information in the warning message, fix test
Zbigniew Jędrzejewski-Szmek [Sat, 11 Jul 2020 14:19:03 +0000 (16:19 +0200)] 
repart: include more relevant information in the warning message, fix test

The test would always fail with a long uname. In F33 this is right
now "5.8.0-0.rc2.20200622git625d3449788f.1.fc33.x86_64" which caused the
test to always fail.

3 years agoMerge pull request #16435 from gaoyi1988/master
Yu Watanabe [Sun, 12 Jul 2020 12:46:22 +0000 (21:46 +0900)] 
Merge pull request #16435 from gaoyi1988/master

fix multi matches when use "||"

3 years agoNEWS: mention source mode for MACVLAN or MACVTAP
Yu Watanabe [Sun, 12 Jul 2020 08:13:57 +0000 (17:13 +0900)] 
NEWS: mention source mode for MACVLAN or MACVTAP

3 years agoMerge pull request #16432 from cgzones/selinux_err_fix
Zbigniew Jędrzejewski-Szmek [Sun, 12 Jul 2020 09:55:44 +0000 (11:55 +0200)] 
Merge pull request #16432 from cgzones/selinux_err_fix

SELlinux followup error/logging fixes

3 years agotest: add test case for multi matches when use "||" 16435/head
gaoyi [Sun, 12 Jul 2020 07:27:45 +0000 (03:27 -0400)] 
test: add test case for multi matches when use "||"

Signed-off-by: gaoyi <ymuemc@163.com>
3 years agoudev: specify the end of value
gaoyi [Sun, 12 Jul 2020 07:24:42 +0000 (03:24 -0400)] 
udev: specify the end of value

NULSTR_FOREACH may read the illegal match

Signed-off-by: gaoyi <ymuemc@163.com>
3 years agobus: use bus_log_parse_error to print message
fangxiuning [Sat, 11 Jul 2020 10:13:01 +0000 (18:13 +0800)] 
bus: use bus_log_parse_error to print message

3 years agonamespace: unify logging in mount_tmpfs 16432/head
Christian Göttsche [Sat, 11 Jul 2020 19:12:55 +0000 (21:12 +0200)] 
namespace: unify logging in mount_tmpfs

Fixes: abad72be4df9d5a13ceecd5b4d073adb370882b7
Follow up: #16426