Lennart Poettering
333a2ad649
filesystems: add ceph to network file systems group
2021-11-15 22:43:03 +01:00
Lennart Poettering
2867cb392a
filesystems: slightly update common block device groups
2021-11-15 22:43:03 +01:00
Lennart Poettering
73e7576e3b
filesystems: add two new filesystem groups
...
1. @anonymous → for file systems that aren't real file systems but
simply the backing for sockets, pipes and other "anonymous" fds.
2. @security → for the various MAC security file systems.
2021-11-15 22:43:03 +01:00
Lennart Poettering
fe0777fb94
Merge pull request #21320 from poettering/namespace-mkdir-umask
...
make pid1 namespace code independent of umask
2021-11-12 22:12:58 +01:00
Lennart Poettering
52f05ef21d
umask-util: add helper that resets umask until end of current code block
2021-11-12 16:01:40 +01:00
Zbigniew Jędrzejewski-Szmek
a456086b37
basic/utf8: inline some iterator variables
2021-11-12 15:51:26 +01:00
Yu Watanabe
847f1ea69e
ether-addr-util: fix ether_addr_is_local() and add one more helper
...
Follow-up for 1f86a3fe52 .
2021-11-12 20:00:29 +09:00
Lennart Poettering
371264b6c6
Merge pull request #21302 from yuwata/udev-drop-colon-from-ID_NET_NAME_MAC
...
udev: drop colon from ID_NET_NAME_MAC
2021-11-11 14:36:28 +01:00
Lennart Poettering
126c02a8fd
Merge pull request #21304 from poettering/chain-ssh-auth-keys
...
userdbctl: add support for chaining other ssh-authorized-keys commands from userdbctl
2021-11-11 14:35:48 +01:00
Yu Watanabe
e44cd43788
ether-addr-util: introduce hw_addr_to_string_full()
2021-11-11 18:29:52 +09:00
Lennart Poettering
7d0cede04f
escape: return unused memory in quote_command_line()
2021-11-11 10:06:31 +01:00
Lennart Poettering
5e659ffcb0
process-util: use quote_command_line() at one more place
2021-11-11 10:06:26 +01:00
Lennart Poettering
4ef15008cc
escape: add flags argument to quote_command_line()
...
That way, we can reuse the call at one more place (see later patch).
2021-11-11 10:05:46 +01:00
Yu Watanabe
ca7d208367
ether-addr-util: expose hw_addr_hash_func()
2021-11-11 12:49:42 +09:00
Lennart Poettering
3299c293db
architecture: drop __riscv__ checks, it's obsolete since 2018
2021-11-10 12:38:32 +01:00
Yu Watanabe
5ff3c71af8
Merge pull request #21276 from yuwata/ether-addr-util
...
ether-addr-util: introduce parse_hw_addr() and related conf parsers
2021-11-10 09:22:01 +09:00
Yu Watanabe
c6df73ca72
ether-addr-util: introduce {hw,ether}_addr_hash_ops_free
2021-11-09 21:39:09 +09:00
Yu Watanabe
227e9ce255
ether-addr-util: replace ether_addr_from_string() with parse_ether_addr()
2021-11-09 21:39:09 +09:00
Yu Watanabe
02160bc909
ether-addr-util: introduce parse_ether_addr()
2021-11-09 21:39:09 +09:00
Yu Watanabe
76a5d3dee2
ether-addr-util: introduce parse_hw_addr()
2021-11-09 21:39:05 +09:00
Lennart Poettering
3777940ab2
inotify-util: improve reported error codes when inotify_add_watch() fails
2021-11-09 12:52:07 +01:00
Zbigniew Jędrzejewski-Szmek
7368e69bc7
Merge pull request #21271 from yuwata/ether-addr-util-helper-functions
...
ether-addr-util: introduce several helper functions
2021-11-09 10:02:55 +01:00
Yu Watanabe
91961fff43
arphrd-util: introduce arphrd_to_hw_addr_len()
2021-11-09 08:24:10 +09:00
Yu Watanabe
f09d20256a
arphrd-util: rename arphrd-list.[ch] -> arphrd-util.[ch]
2021-11-09 08:24:10 +09:00
Yu Watanabe
de0f157984
ether-addr-util: make hw_addr_is_null() return true also for all zero address
...
This fixes the following error:
---
systemd-networkd[1449490]: ip6tnl0: Saved hardware address: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
systemd-networkd[1449490]: ip6tnl0: Failed to manage link by its new hardware address, ignoring: File exists
---
2021-11-09 08:20:51 +09:00
Yu Watanabe
1f86a3fe52
ether-addr-util: introduce several helper functions
2021-11-09 08:20:51 +09:00
Daan De Meyer
51462135fb
exec: Add TTYRows and TTYColumns properties to set TTY dimensions
2021-11-05 21:32:14 +00:00
Zbigniew Jędrzejewski-Szmek
7f9521d5e1
Merge pull request #21225 from medhefgo/boot-cleanup
...
Boot cleanup
2021-11-05 14:53:47 +01:00
Luca Boccassi
fac2c3e97d
basic/mountpoint-util: detect erofs as a read-only FS
2021-11-05 14:02:04 +01:00
Jan Janssen
a8a7723ba9
sd-boot: Move flags helpers to macro-fundamental.h
2021-11-04 18:37:07 +01:00
Yu Watanabe
829b86bc0f
Merge pull request #21217 from keszybz/debug-test-process-util
...
procfs-util: fix confusion wrt. quantity limit and maximum value
2021-11-04 04:03:56 +09:00
Lennart Poettering
883946f0d2
process-util: rework TAKE_PID() to be side-effect free
2021-11-03 15:57:02 +01:00
Lennart Poettering
2c1612100d
process-util: wait for processes we killed even if killing failed
...
The processes might be zombies in which case killing will fail, but
reaping them still matters.
2021-11-03 15:57:02 +01:00
Lennart Poettering
90d59676b3
fd-util: make TAKE_FD free of double evaluation
...
Better be safe than sorry.
2021-11-03 15:22:18 +01:00
Zbigniew Jędrzejewski-Szmek
c3dead53d5
procfs-util: fix confusion wrt. quantity limit and maximum value
...
From packit/rawhide-arm64 logs:
Assertion 'limit >= INT_MAX || get_process_ppid(limit+1, NULL) == -ESRCH' failed at src/test/test-process-util.c:855, function test_get_process_ppid(). Aborting.
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
The kernel has a few different limits. In particular kernel.threads-max can be
set to some lower value, and kernel.pid_max can be set to a higher value. This
is nice because it reduces PID reuse, even if the number of threads that is
allowed is limited. But the tests assumed that we cannot have a thread with
PID above MIN(kernel.threads-max, kernel.pid_max-1), which is not valid.
So let's rework the whole thing: let's expose the helpers to read
kernel.threads-max and kernel.pid_max, and print what they return in tests.
procfs_tasks_get_limit() was something that is only used in tests, and wasn't
very well defined, so let's drop it.
Fixes #21193 .
2021-11-03 09:36:08 +01:00
Lennart Poettering
2f2cdd7250
percent-util: clamp percent range before converting to 2^32 scale
...
Let#s better be safe than sorry and clamp the input, so that we don't
hit overflow issues.
2021-11-03 12:41:17 +09:00
Lennart Poettering
4768cc450d
missing: add missing header inclusions
...
These headers should work without any manual header inclusion.
2021-11-03 12:41:01 +09:00
Lennart Poettering
16d41892c3
Merge pull request #20609 from DaanDeMeyer/recursive-template
...
core: Try to prevent infinite recursive template instantiation
2021-10-28 19:23:17 +02:00
Daan De Meyer
88022148c4
core: Try to prevent infinite recursive template instantiation
...
To prevent situations like in #17602 from happening, let's drop
direct recursive template dependencies. These will almost certainly
lead to infinite recursion so let's drop them immediately to avoid
instantiating potentially thousands of irrelevant units.
Example of a template that would lead to infinite recursion which
is caught by this check:
notify@.service:
```
[Unit]
Wants=notify@%n.service
```
2021-10-28 11:42:21 +01:00
Lennart Poettering
68def5a975
fs-util: add helper that can split CIFS services names
2021-10-27 22:37:56 +02:00
Lennart Poettering
73fc0cbc87
fd-util: export get_max_fd() so that we can use it in tests
2021-10-27 17:56:36 +02:00
Lennart Poettering
ab27b2fe56
exec-util: use close_all_fds_without_malloc() from freeze()
2021-10-27 17:56:36 +02:00
Lennart Poettering
5cfa0798ba
fd-util: split out close_all_fds() special case handling and call it from close_all_fds_without_malloc(), too
...
The optimization is useful there too.
2021-10-27 17:56:36 +02:00
Lennart Poettering
1f6639eac7
fd-util: close_all() check d_type
...
Tiny optimization: check dirent's d_type before trying to parse
/proc/self/fd/ filenames, given we have that anyway.
2021-10-27 17:56:36 +02:00
Lennart Poettering
c844f0a924
fd-util: always return 0 on success in close_all_fds()
...
We never make use of the return value, and in case of close_range() we
don't even know how many fds got closed, hence don't pretend we knew.
2021-10-27 17:56:36 +02:00
Lennart Poettering
f498720a34
fd-util: special case invocation of close_all_fds() with single exception fd
...
Add special case optimization for a single exception fd. It's a
pretty common case in our codebase, and the optimization is simple
and means we don't need to copy/sort the exception array, so do it.
2021-10-27 17:56:36 +02:00
Lennart Poettering
11966552a8
fd-util: split out inner fallback loop of close_all_fds() as close_all_fds_without_malloc()
2021-10-27 17:56:36 +02:00
Lennart Poettering
c85cb3bc7f
Revert "basic/fd-util: sort the 'except' array in place"
...
This reverts commit 9c46228b7d .
2021-10-27 17:56:36 +02:00
Lennart Poettering
e7e7c07c50
Revert "Add variant of close_all_fds() that does not allocate and use it in freeze()"
...
This reverts commit cbcf371abc .
2021-10-27 17:56:36 +02:00
Daan De Meyer
11e9347bc6
basic: Make ret_names param to unit_file_find_fragment() optional
2021-10-27 16:03:43 +01:00