1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00
Commit Graph

51704 Commits

Author SHA1 Message Date
Yu Watanabe
a23624846f network: show address flag in debugging logs 2021-06-07 23:02:56 +09:00
Franck Bui
b2c7d1bbc2 pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes
We support that tmp.mount being masked, and this should not be considered an
error.
2021-06-07 14:10:56 +02:00
Sebastian Blunt
2cbca51a71 Rename crypttab opt silent to password-echo
Use the option name 'password-echo' instead of the generic term
'silent'.

Make the option take an argument for better control over echoing
behavior.

Related discussion in https://github.com/systemd/systemd/pull/19619
2021-06-07 10:35:28 +02:00
Luca Boccassi
3745355764
Merge pull request #19793 from keszybz/tmpfiles-autofs-and-globs
tmpfiles: better handling of autofs and globs
2021-06-07 09:14:27 +01:00
Yu Watanabe
33f2de7b64 conf-parser: make config_parse_tristate() accept an empty string
Fixes #19822.
2021-06-04 22:51:26 +02:00
Yu Watanabe
efe76b273a shell-completion: udevadm: support --uuid option
Follow-up for 730b9c1e14.
2021-06-04 15:00:11 +02:00
Yu Watanabe
16f9036471
Merge pull request #19796 from yuwata/udev-node-cleanups
udev: several cleanups about creating device symlink
2021-06-04 21:46:43 +09:00
Kai-Heng Feng
a7161e0288 hwdb: Add ProBook to use micmute hotkey
Like HP EliteBooks and ZBooks, all ProBooks use the same micmute
scancode.
2021-06-04 14:00:25 +02:00
Lennart Poettering
d414f41535 test: don't expect that clone() always makes it to the kernel
We might get EPERM on certain clone() flag combinations. Apparently in
Docker for example.

Prompted by: https://github.com/systemd/systemd/pull/19800#issuecomment-854196491
2021-06-04 13:38:00 +02:00
Zbigniew Jędrzejewski-Szmek
ba405b2200 TODO: coalesce entries for tmpfiles 2021-06-04 12:21:19 +02:00
Zbigniew Jędrzejewski-Szmek
bd6d28f21a tmpfiles: do not check if unresolved globs are autofs paths
With the previous commit, we would not complain about the not-found path, but
the check is still not useful. We use a libc function to resolve the glob, and
it has no notion of treating autofs specially. So we can't avoid touching
autofs when resolving globs. But usually the glob is found in the last
component of the path, so if we strip the glob part, we can still do a useful
check in many cases. (E.g. if /var/tmp is on autofs, something like
"/var/tmp/<glob>" is much more likely than "/var/<glob-that-matches-tmp>/<something>".)

With the system config in F34, we check the following prefixes:

/var/tmp/abrt/* → /var/tmp/abrt/
/run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/*.journal* → /run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/
/var/lib/systemd/coredump/.#core*.21e5c6c28c5747e6a4c7c28af9560a3d* → /var/lib/systemd/coredump/
/tmp/podman-run-* → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /tmp/
/tmp/containers-user-* → /tmp/
/var/tmp/beakerlib-* → /var/tmp/
/var/tmp/dnf*/locks/* → /var/tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /var/tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /var/tmp/
/var/tmp/abrt/* → /var/tmp/abrt/
/var/tmp/beakerlib-* → /var/tmp/
/var/tmp/dnf*/locks/* → /var/tmp/
/tmp/podman-run-* → /tmp/
/tmp/containers-user-* → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /var/tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /var/tmp/
/var/lib/systemd/coredump/.#core*.21e5c6c28c5747e6a4c7c28af9560a3d* → /var/lib/systemd/coredump/
/run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/*.journal* → /run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/
2021-06-04 12:21:19 +02:00
Zbigniew Jędrzejewski-Szmek
1e472a6ce4 basic/glob-util: add helper to strip the glob part from a glob 2021-06-04 12:21:19 +02:00
Zbigniew Jędrzejewski-Szmek
19c79550b4 tools/analyze-dump-sort: a helper to compare two 'systemd-analyze dump' outputs
Lines in the dumps are ordered by some pseudo-random hashmap entry order, which
makes it hard to diff two outputs. This sort the entries alphabetically, and
also sorts items within the entries, and supresses timestamps and other fields
which always vary.

We could sort the output inside of systemd itself, but it'd make things more
complex, and we probably don't need output to be sorted in most cases. It also
wouldn't be enough, because timestamps and such would still need to be ignored
to do a nice diff. So I think doing the sorting and suppression in a python
helper is a better approach.
2021-06-04 12:09:58 +02:00
Zbigniew Jędrzejewski-Szmek
771bdb6aae docs/ARCHITECTURE: more markup and unicode 2021-06-04 10:51:19 +02:00
Zbigniew Jędrzejewski-Szmek
287079696c NEWS: adjust grammar and other small changes 2021-06-04 10:51:19 +02:00
Yu Watanabe
4076ad9daf fix typo 2021-06-04 10:37:40 +02:00
Lennart Poettering
00d06c996d docs: use uppercase letters in title
We usually do it that way, do so here, too.
2021-06-04 10:34:56 +02:00
Lennart Poettering
99c2a9552b more 249 NEWS work 2021-06-04 10:34:02 +02:00
Yu Watanabe
78d8eae9a5 util: drop DEV_NUM_PATH_MAX and xsprintf_dev_num_path() 2021-06-04 15:51:39 +09:00
Yu Watanabe
902b4c677e util: move device-node.[ch] to shared 2021-06-04 15:51:39 +09:00
Yu Watanabe
ebb0a0155d udev: warn and propagate error in creating device symlink
Also, this makes the file in /run/udev/links/ is kept on failure, as the
target of the symbolic link may be belonging to another device.
2021-06-04 15:51:39 +09:00
Yu Watanabe
c891389a16 udev: try to create device symlink directly only when the link does not exist yet 2021-06-04 15:51:39 +09:00
Yu Watanabe
5802d4ea03 udev: extract same logic of creating device symlink
This also limits the number of trial.
2021-06-04 15:51:39 +09:00
Yu Watanabe
1ddfb6cf29 udev: use path_extract_directory() and path_equal() 2021-06-04 15:51:39 +09:00
Yu Watanabe
f3b393e951 udev: refuse to create device symlink when a non-symlink file already exists 2021-06-04 15:51:39 +09:00
Yu Watanabe
d2b50631fb udev: make link_find_prioritized() return 0, 1, or negative errno 2021-06-04 15:51:39 +09:00
Yu Watanabe
e7f3b33e70 udev: slightly update log message and adjust log level 2021-06-04 15:51:39 +09:00
Yu Watanabe
a33dc87e42 udev: logs if failed to remove devlink 2021-06-04 15:51:39 +09:00
Yu Watanabe
e91454231b udev: do not try to remove /dev 2021-06-04 15:51:39 +09:00
Yu Watanabe
5733bd4862 udev: use touch_file() and limit the number of trial 2021-06-04 15:51:39 +09:00
Yu Watanabe
286bedd7a4 udev: logs when failed to remove saved info about devlink 2021-06-04 15:51:39 +09:00
Yu Watanabe
be322ecafb udev: refuse unsafe device symbolic link 2021-06-04 15:51:39 +09:00
Yu Watanabe
52fde28014 test: add tests for udev_node_escape_path() 2021-06-04 15:51:39 +09:00
Yu Watanabe
e64943363a udev: use hashed path as a filename to save devlink 2021-06-04 15:51:31 +09:00
Lennart Poettering
5f94ac5435 NEWS: more preparation for v249 2021-06-03 23:36:28 +02:00
Luca Boccassi
2ecce1f1a8 docs: add ARCHITECTURE.md with code map
Initial and coarse version of a code map, useful for people getting
started and looking at the repository for the first time.
2021-06-03 22:14:19 +02:00
adrian5
d0fd114929 man: fix typo 2021-06-03 22:10:36 +02:00
Yu Watanabe
130298ba10 util: expose urlsafe_base64char() 2021-06-04 01:48:50 +09:00
Lennart Poettering
92ca7e052d
Merge pull request #19801 from poettering/device-unit-name-length
pid1: reduce amount of warnings about sysfs device paths we cannot convert into device unit names
2021-06-03 18:08:07 +02:00
Lennart Poettering
f973aea740 NEWS: start putting together NEWS for v249 2021-06-03 17:57:27 +02:00
Lennart Poettering
51df483846
Merge pull request #19806 from poettering/ask-pw-asterisk
systemd-ask-password: make pw echo fully configurable
2021-06-03 16:09:43 +02:00
Lennart Poettering
e82c6e8b62 pid1: don't choke on overly long device paths
This mimics what we do for device units: if there's a device we cannot
synthesize a good swap unit name for, then proceed without failure.
2021-06-03 15:01:05 +02:00
Lennart Poettering
6aeb8c89ba pid1: make swap_process_new() void
This matches device_process_new(): this function should not fail, since
it just reacts to external events.
2021-06-03 15:01:05 +02:00
Lennart Poettering
4d94c74fae pid1: downgrade if we can't make sense of the old device on MOVE uevent
If the name of the old device didn#t work for us, we don't have to clean
anything up, since we know for sure that there won't be a device unit
for it. hence downgrade log message about it.
2021-06-03 15:01:05 +02:00
Lennart Poettering
68695ce4d6 pid1: eat up errors in device_update_found_by_name()
We eat up all errors in the caller already, and rightly so.
2021-06-03 15:01:05 +02:00
Lennart Poettering
9951c8df1e pid1: properly propagate errors from device_setup_unit()
We want to propagate errors here, since we want to make dependent on the
success of creating the main device unit the creation of the auxiliary
device units. Thus if we suppress errors here we might end up in exotic
corner cases in a situation were we create the auxiliary ("following")
device units without the primary one.
2021-06-03 15:01:05 +02:00
Lennart Poettering
ad172d19d5 pid1: reduce log noise generated by devices with overly long sysfs paths
This basically does what 2c905207db did
for mount units

Fixes: #16161
2021-06-03 15:01:05 +02:00
Lennart Poettering
c8ad151a58 pid1: make return value of device_remove_old() void too 2021-06-03 15:01:05 +02:00
Lennart Poettering
e41db484c3 pid1: shorten code a bit 2021-06-03 15:01:05 +02:00
Lennart Poettering
75a50eb0dd pid1: make device_process_new() return void
We never use the return value, and we really shouldn't, hence let's drop
it.
2021-06-03 15:01:05 +02:00