1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
Commit Graph

51395 Commits

Author SHA1 Message Date
Lennart Poettering
a6383f1e93
Merge pull request #19676 from bluca/coverity
Fix two new coverity issues
2021-05-21 17:52:36 +02:00
Lennart Poettering
2c80660557
Merge pull request #19672 from yuwata/strextend
tree-wide: introduce strextendf_with_separator() and use strextend() or freinds
2021-05-21 17:52:14 +02:00
Lennart Poettering
674d8dcc47
Merge pull request #19647 from ddstreet/test-oomd-failure
handle lack of kernel support for some cgroup files
2021-05-21 16:35:16 +02:00
Yu Watanabe
e8f99f4e24 network: fix an infinite loop
Fixes #19467.
2021-05-21 12:03:01 +09:00
asavah
670427a4d4 man: prevent race condition when generating systemd.directives.xml 2021-05-20 20:49:50 +01:00
Dan Streetman
135400276c oom: log one-time warning if kernel doesn't provide memory.swap.current
The kernel can be compiled without support for any memory.swap.* files, or
it can be disabled at boot time with the 'swapaccount=0' boot parameter,
so if the file doesn't exist log warning indicating the kernel doesn't
support the file and the user may need to try using the 'swapaccount=1'
boot param.

Note that the actual error from the call to fopen() is ENOENT, but
that is translated into ENODATA in cg_get_attribute_as_uint64()
2021-05-20 15:40:29 -04:00
Dan Streetman
0de2fd1870 psi: update is_pressure_supported to read file
The kernel still provides the /proc and cgroup pressure files even
if its psi support is disabled, so we need to actually read the files
to verify they don't return -EOPNOTSUPP
2021-05-20 15:40:21 -04:00
Dan Streetman
264f0afe0d log: add log_once() and log_once_errno() macros
These macros will log a message at the specified level only the first time
they are called. On all later calls, if the specified level is debug, the
logs will be suppressed; otherwise the message will be logged at debug.
2021-05-20 15:39:15 -04:00
Dan Streetman
ea42da3825 macro: add ONCE macro that evaluates to 1 one time
Every location that this macro is used, it will be true the first
time it's checked, then false each time after that.

This can be useful for things such as one-time logging.
2021-05-20 15:39:15 -04:00
Lennart Poettering
f267c3142a fileio: make return parameters of read_virtual_file() optional
Prompted by: #19647
2021-05-20 15:39:03 -04:00
Lennart Poettering
9d54c9a3d9
Merge pull request #19551 from cgzones/fix_reload
selinux: reload label db on policy load with libselinux 3.2
2021-05-20 21:37:59 +02:00
Lennart Poettering
f9e60ff9ad
Merge pull request #19605 from yuwata/network-fdb-outgoing-interface
network: bridge-fdb: add support to specify outgoing interface
2021-05-20 21:33:14 +02:00
Yu Watanabe
e6655fbe40 man: mention that drop-in files are merged in alphanumeric order
This addresses the request in https://github.com/systemd/systemd/issues/19467#issuecomment-829332877.
2021-05-20 21:20:51 +02:00
Yu Watanabe
580bf61304 sysv-generator: use strextend_with_separator() 2021-05-20 21:57:09 +09:00
Yu Watanabe
742a011a3a systemctl: use strextend_with_separator() 2021-05-20 21:57:09 +09:00
Yu Watanabe
eda397c966 run: use strextend_with_separator() 2021-05-20 21:57:09 +09:00
Yu Watanabe
cfea7618f2 nspawn: use strextendf_with_separator() 2021-05-20 21:57:04 +09:00
Luca Boccassi
f09e336b3a resolved: check return value of gcrypt APIs
Coverity complains about missing error check.

CID #1453234
2021-05-20 10:47:41 +01:00
Luca Boccassi
06a368e819 journal: fix uninitialized variable use
If the journal file being processed is archivied, seqnum_id will not be
initialized before being passed on, and coverity complains.
Initialize it to zero.

CID #1453235
2021-05-20 10:47:41 +01:00
Yu Watanabe
db5486b450 test-network: add a testcase for OutgoingInterface= in [BridgeFDB] 2021-05-20 18:23:15 +09:00
Susant Sahani
af99cdf4d4 network: bridge-fdb: add support to specify outgoing interface 2021-05-20 18:23:15 +09:00
Yu Watanabe
e5b35bf6c2 network: use queue to configure bridge FDB 2021-05-20 18:23:15 +09:00
Yu Watanabe
9671ae9d51 network: bridgeFDB: rename FdbEntry -> BridgeFDB 2021-05-20 18:23:15 +09:00
Yu Watanabe
4ff6ff9a91 networkctl: use strextend() 2021-05-20 18:18:56 +09:00
Yu Watanabe
03c324c578 sd-bus: use strextend() 2021-05-20 18:18:56 +09:00
Yu Watanabe
f8abe13f32 escape: use strextend() 2021-05-20 18:18:56 +09:00
Yu Watanabe
a2a7b77260 pid1: use strextend_with_separator() 2021-05-20 18:18:56 +09:00
Yu Watanabe
2b070200f1 env-util: use strextend() 2021-05-20 18:18:56 +09:00
Yu Watanabe
4304f68d15 network: route: make log_route_debug() show weight for multipath route 2021-05-20 18:18:52 +09:00
Yu Watanabe
6b13ca8ada string-util: introduce strextendf_with_separator() 2021-05-20 18:16:51 +09:00
Luca Boccassi
f144f6faa9
Merge pull request #19669 from mrc0mmand/ci-mkosi-arch
ci: work around #19442 to make CI happy again
2021-05-20 10:14:30 +01:00
Yu Watanabe
354dadb30f nspawn: fix build failure
This fixes a conflict between #19555 and #19653.
2021-05-20 10:04:14 +02:00
Anita Zhang
1539124b39 man: document default rlimits
Fixes #19645
2021-05-20 09:58:48 +02:00
Zbigniew Jędrzejewski-Szmek
f78ad5f046 test: enable fuzz regression tests by default
This ensures that the fuzz test code is also built by default.
It also increases the test coverage a bit. Compiling the tests
*with* sanitizers is painfully slow, so this is not enabled. But
just compiling them sauté is hardly noticable. Running the tests
increases the test count and runtime:
  622 tests, 26 s
to
  922 tests, 35 s
I think this is acceptable.
2021-05-20 09:30:43 +02:00
Lennart Poettering
d99c2df2df
Merge pull request #19555 from poettering/nspawn-bind-user
nspawn: add --bind-user= feature for binding  host user+homedir into a container
2021-05-20 07:33:51 +02:00
Lennart Poettering
48b4a760c9
Merge pull request #19591 from poettering/terminal-fixes
five terminal handling fixes
2021-05-20 07:33:21 +02:00
Luca Boccassi
2d4efd1dba build tests: check that Github pages can be built successfully 2021-05-19 23:25:34 +02:00
Lennart Poettering
2adcf6f4f7
Merge pull request #19662 from yuwata/memdup
util: make memdup() or friends safer
2021-05-19 23:24:55 +02:00
Lennart Poettering
ed056c560b
Merge pull request #19653 from poettering/greedy-realloc-more
malloc_usable_size() tweaks
2021-05-19 23:22:44 +02:00
Frantisek Sumsal
27b4d60678 ci: skip root tty login
We use the `autologin` mkosi option (see
mkosi.default.d/10-systemd.conf), so the pexpect root login throws
a (harmless) error:

```
Arch Linux (built from systemd tree)
Kernel 5.4.0-1047-azure on an x86_64 (console)

image login: root (automatic login)

root
root
[root@image ~]# systemctl poweroff
root
-bash: root: command not found
[root@image ~]# systemctl poweroff
```
2021-05-19 23:07:25 +02:00
Frantisek Sumsal
715a273b10 ci: show image summary 2021-05-19 23:07:25 +02:00
Frantisek Sumsal
48a3cf58d5 ci: work around #19442 to make CI happy again
Let's introduce a somewhat ugly workaround for #19442 and retry
the systemd-nspawn image boot test up to three times in case it dies
with the dissect timeout. Since this issue occurs only in the Arch job,
limit the workaround to this job only.
2021-05-19 23:07:19 +02:00
Lennart Poettering
374c80df67
Merge pull request #19603 from yuwata/network-link-get-by-name
network: introduce link_get_by_name() and use it in resolving interface name specifier in MultiPathRoute=
2021-05-19 21:35:48 +02:00
Lennart Poettering
aa4d11a4eb
Merge pull request #19656 from yuwata/network-trivial-cleanups
network: several trivial cleanups
2021-05-19 21:34:59 +02:00
Franck Bui
0495728429 kbd-model-map: add mapping 'es-dvorak'
And update test-keymap-util accordingly.

While at it, make sure to use tabs everywhere.
2021-05-19 21:34:40 +02:00
Yu Watanabe
834f3ba1a0 test: reduce debugging logs in test-event
The logs mostly give no information, but fill CI results.
2021-05-19 21:34:17 +02:00
Lennart Poettering
1d406dceb7 systemctl: re-align colon in status output 2021-05-19 21:33:59 +02:00
Lennart Poettering
11f3c130aa terminal: don't hardcode major number of PTYs
Hardcoding major numbers sucks. And we generally don't do it, except
when determining whether something is a PTY. Thing though is that we
don't actually need to do that here either, hence don#t.
2021-05-19 17:58:01 +02:00
Lennart Poettering
a06c9ac277 man: document new nspawn --bind-user= feature 2021-05-19 17:46:59 +02:00
Lennart Poettering
2f89304490 nspawn: add new --bind-user= option for binding a host user into the container
This new option does three things for a host user specified via
--bind-user=:

1. Bind mount the home directory from the host directory into
   /run/host/home/<username>

2. Install an additional user namepace UID/GID mapping mapping the host
   UID/GID of the host user to an unused one from the container in the range
   60514…60577.

3. Synthesize a user/group record for the user/group under the same name
   as on the host, with minimized information, and the UID/GID set to
   the mapped UID/GID. This data is written to /run/host/userdb/ where
   nss-system will pick it up.

This should make sharing users and home directories from host into the
container pretty seamless, under some conditions:

1. User namespacing must be used.

2. The host UID/GID of the user/group cannot be in the range assigned to
   the container (kernel already refuses this, as this would mean two
   host UIDs/GIDs might end up being mapped to the same continer
   UID/GID.

3. There's a free UID/GID in the aforementioned range in the container,
   and the name of the user/group is not used in the container.

4. Container payload is new enough to include an nss-systemd version
   that picks up records from /run/host/userdb/
2021-05-19 17:46:59 +02:00